Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Harden scanner/relaunch exec paths against command and argument injection #49063
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
Uh oh!
There was an error while loading. Please reload this page.
Harden scanner/relaunch exec paths against command and argument injection #49063
Changes from all commits
dd61103d284fce0b06d93164b57116de51426b202ea0794adcf7d683a0412d6a8eed6d65f46e5079742a3d0dc4be924ffaFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
[/tdd] The test for
buildDockerVolumeMountdoes not cover a container path containing a colon or control characters, so the gap noted in thevalidateContainerMountPathcheck would not be caught by CI even after a fix.💡 Suggested additional test cases
Similarly,
TestBuildDockerReadonlyFileMountshould cover an invalid container path (control chars / colon) to ensure the validation is exercised end-to-end through both helpers.@copilot please address this.
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.
[/tdd]
TestGrantRunOnImageRejectsInvalidImageRefcallsgrantRunOnImagewith a non-existent policy file path (/tmp/policy.yaml). The test may fail or pass for the wrong reason depending on whether that file exists on the runner, and it doesn't test the NUL-byte or empty-string cases either.💡 Suggested approach
Create a temp policy file in the test and add separate sub-tests for each rejection condition:
@copilot please address this.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.