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

[Fall 2021] Step 2: Coverage Improvement - Expand XSS regex to cover javascript: URLs #53

Open
onionymous opened this issue Sep 20, 2021 · 0 comments
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

Comments

@onionymous
Copy link
Collaborator

onionymous commented Sep 20, 2021

Pysa supports string literals as implicit sources/sinks.

We currently look for strings with <> in them to detect potential HTML injection sinks (see https://github.com/facebook/pyre-check/blob/d82759a1f1ce5467aa2250708b226790c046f207/stubs/taint/core_privacy_security/taint.config#L652) and have a rule for UserControlled data going to these implicit sinks.

Sometimes in Python code we also see the javascript: pseudo-protocol URLs which can also be an XSS sink.

The goal is to improve this regex and add detection for javascript: URLs, as well as any other improvements you can think of!

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:

black && usort format . && flake8

To install the linters, you can run the following command:

pip install flake8 usort black==21.4b2
@onionymous onionymous added 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 1 Level 1 project for MLH Fall 2021 step 2 Level 2 project for MLH Fall 2021 and removed step 1 Level 1 project for MLH Fall 2021 labels Sep 20, 2021
@onionymous onionymous changed the title [Fall 2021] Step 1: Coverage Improvement - Expand XSS regex to cover javascript: URLs [Fall 2021] Step 2: Coverage Improvement - Expand XSS regex to cover javascript: URLs Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant