updating the NOAA endpoint with HTTPS #260
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there,
We have a free program analysis tool for Python based web projects, called Bento. While we were scanning GitHub projects for issues, your project triggered a warning for unescaped Jinja templates.
In general, it is good practice to auto-escape parameters passed to
render_template()
method (https://flask.palletsprojects.com/en/1.1.x/templating/#jinja-setup). I was trying to figure out if any of the parameters (ex: samples/tidepooler/tidepooler.py:113) can be tainted to trigger an XSS.cities
variable comes from the NOAA endpoint, which should be ok. But I thought converting the base URL to https would make it safer. Hopefully, you'll agree.Bento flagged a few other issues including the debug mode flag for the Flask app, which is a known security issue in production (https://flask.palletsprojects.com/en/1.1.x/config/#DEBUG), and a potential buy in samples/purchase/purchase.py:52
question_text
seems to be undefined in this context but I didn't update those to keep this PR simple. If you are curious, feel free download and give Bento a try (https://bento.dev).