-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Python: Two new queries for URL and hostname sanitization (CWE-020). #820
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
Python: Two new queries for URL and hostname sanitization (CWE-020). #820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of small comments on the text, but the qhelp generally looks great.
| </p> | ||
| <p> | ||
| This vulnerability is addressed in the <code>safe</code> check, which | ||
| escapes the <code>.</code> and will reject <code>wwwXexample.com</code>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest: "The safe check closes this vulnerability by escaping the . so that URLs of the form wwwXexample.com are rejected."
python/ql/src/Security/CWE-020/IncompleteUrlSubstringSanitization.qhelp
Outdated
Show resolved
Hide resolved
python/ql/src/Security/CWE-020/examples/IncompleteUrlSubstringSanitization.py
Show resolved
Hide resolved
|
Thanks for the text updates. The text LGTM now. |
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for updating the JavaScript qhelp as well.
taus-semmle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Merging.
These two queries are a re-implementation of https://github.com/Semmle/ql/tree/master/javascript/ql/src/Security/CWE-020 for Python.