-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Actions: Fix Critical Artifact poisoning False Positive #19388
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
base: main
Are you sure you want to change the base?
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.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (1)
- actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll: Language not supported
Hi, I was pinged about it by Simon. @AdnaneKhan you need to add a change note, see https://github.com/github/codeql/pull/19085/files#diff-a654ec6cec8af7e22ef1dc59ec11f5095d05128d97d67cdb2cbfe98e0fec6210 for an example. @tausbn @asgerf, can we have a review to have tests run? I wonder if it breaks anything. It looks fishy to me that the original |
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.
See comments above.
actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll
Outdated
Show resolved
Hide resolved
Co-authored-by: Jaroslav Lobačevski <[email protected]>
Thanks - I added a change note and a test workflow file but I'm not sure how to specify the test - is the ArtifactPoisoningCritical.expected file an assertion on the state of the codeql graph? |
The artifact poisoning CodeQL query creates a Critical false-positive under the following scenario:
${{ runner.temp }}
I believe this PR will fix it because it unless the path extraction functionality in CodeQL resolves/sanitizes the context values in some way.
Below is an example that reproduces the false positive:
This is particularly a problem because the examples for a secure workflow specifically calls out this fix.