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

CWE-830 Polyfill.io #16882

Closed
wants to merge 1 commit into from
Closed

CWE-830 Polyfill.io #16882

wants to merge 1 commit into from

Conversation

ropwareJB
Copy link
Contributor

Creates a simple Javascript query js/cwe-830/polyfill-io to alert on instances where users import from polyfill.io, a compromised domain utilized in Supply Chain Attacks: https://sansec.io/research/polyfill-supply-chain-attack

@ropwareJB ropwareJB requested a review from a team as a code owner July 1, 2024 02:22
@github-actions github-actions bot added the JS label Jul 1, 2024
Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but some more work is needed here.
Let me know if you want me to do any of the below.

I took at look at some compromised websites and polyfill.io is mainly used like:

<script src=https://cdn.polyfill.io/v2/polyfill.min.js></script>

Can you add support for that pattern, and add test-cases for both patterns.

Additionally, the format-check is failing, you can use codeql query format -i <path-to-ql-file> to run the autoformatter.

@aegilops
Copy link
Contributor

aegilops commented Jul 1, 2024

I've raised an alernative PR, which abstracts an existing library out from an existing CWE-830 query: #16886

@erik-krogh
Copy link
Contributor

erik-krogh commented Jul 1, 2024

Hmm. See my comment on the other PR. It seems the issue is no longer relevant, as the domain no longer exists.

@ropwareJB
Copy link
Contributor Author

Closing as @aegilops' PR is a lot more comprehensive + Namecheap has shut down the domain

@ropwareJB ropwareJB closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants