Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating the NOAA endpoint with HTTPS #260

Merged
merged 1 commit into from
Sep 6, 2020

Conversation

daghan
Copy link
Contributor

@daghan daghan commented Jan 2, 2020

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).

@johnwheeler johnwheeler merged commit 8654a63 into johnwheeler:master Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants