[Fall 2021] Step 2: Coverage Improvement - Cover Flask class based views #52
Labels
coverage improvement
Adds coverage improvement for missing model or rule in Pysa
Fall 2021
Issues related to the Pysa project for MLH Fellowship cohort of Fall 2021
step 2
Level 2 project for MLH Fall 2021
Flask is a popular open-source web framework written in Python. Pysa already has some models for Flask (see flask_sources_sinks.pysa), but we are missing some coverage.
A view function in Flask is code that responds to an application, which can take in user-controlled data and return a response. Flask also supports class-based views as an alternate way of defining views.
It looks like some functions on the
View
classes such as (but not limited to)get
/post
/other verbs as well asdispatch_request
can accept user-controlled data and return data to users. We should taint all the function parameters as being sources ofUserControlled
data and the functions as being returning data to users. Consider also looking into theas_view
function and how we might model that.The Pysa DSL might be useful for doing this.
Submitting a PR
We use the following linters internally, so to save everyone's time, please make sure you run the following linters locally and fix errors related to the files you modified before submitting a PR:
To install the linters, you can run the following command:
The text was updated successfully, but these errors were encountered: