Skip to content

Conversation

JarLob
Copy link
Contributor

@JarLob JarLob commented Mar 6, 2021

No description provided.

@JarLob JarLob requested a review from a team as a code owner March 6, 2021 08:30
@JarLob
Copy link
Contributor Author

JarLob commented Mar 6, 2021

Initially developed by @adityasharad I have made few improvements.

@erik-krogh erik-krogh self-assigned this Mar 8, 2021
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.

Nice work.

I think it should be possible to make these queries more precise.
E.g. looking for a build step that executes code in pull_request_target.ql.
But that's for another time, the queries look good for experimental as they are.

The autoformatter is failing on pull_request_target.ql.
(I can probably fix that for you if you want).

JarLob and others added 4 commits March 15, 2021 18:14
Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
@JarLob
Copy link
Contributor Author

JarLob commented Mar 15, 2021

The autoformatter is failing on pull_request_target.ql.
(I can probably fix that for you if you want).

Tried the format command, but it doesn't change anything in the document, please check.

Co-authored-by: Erik Krogh Kristensen <erik-krogh@github.com>
@JarLob
Copy link
Contributor Author

JarLob commented Mar 15, 2021

I see it fails on a test complaining about regex. Interestingly it works fine locally when I run jus these two tests. Any idea how to fix?

JarLob and others added 2 commits March 17, 2021 19:49
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.

I think we are good to go for merging into experimental.

Could you give me a ping when you get CVEs from these queries (I didn't find CVEs in your published advisories, but I also didn't look very hard).
Because such CVEs could be helpful for improving the queries, and from there get the queries into the default suite.

@JarLob
Copy link
Contributor Author

JarLob commented Mar 18, 2021

We decided not to request CVEs because these queries find vulnerabilities in CI/CD configuration, but not in a final product. Since there is no immediate action a consumer would need to take, like upgrade to the new version, it made no sense to request CVEs.

Theses articles may be useful to improve the queries in the future:
https://securitylab.github.com/research/github-actions-preventing-pwn-requests
https://securitylab.github.com/research/github-actions-untrusted-input

If you want to examine real world occurrences look here https://securitylab.github.com/advisories At the moment there are ~100 workflow related reports.

@erik-krogh erik-krogh merged commit 6bab41c into github:main Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants