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

Add CodeQL suppression for tar extraction code #2006

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

ambarve
Copy link
Contributor

@ambarve ambarve commented Jan 23, 2024

CodeQL is generating a warning for tar extraction code suggesting that the tar file entries are used in an unsanitized way and that could lead to file system traversal attacks. However, during tar extraction all the files are written to the disk using the internal/safefile package which ensures all the filesystem operations during layer extraction happen under the layer root directory. So this warning can be safely suppressed.

CodeQL is generating a warning for tar extraction code suggesting that the tar file entries are used in an
unsanitized way and that could lead to file system traversal attacks. However, during tar extraction all the
files are written to the disk using the `internal/safefile` package which ensures all the filesystem
operations during layer extraction happen under the layer root directory. So this warning can be safely
suppressed.

Signed-off-by: Amit Barve <ambarve@microsoft.com>
@ambarve ambarve requested a review from a team as a code owner January 23, 2024 19:30
@kevpar
Copy link
Member

kevpar commented Jan 23, 2024

Just curious, what does the alert from CodeQL look like? Does it have a recommended solution?

@ambarve
Copy link
Contributor Author

ambarve commented Jan 23, 2024

Just curious, what does the alert from CodeQL look like? Does it have a recommended solution?

If you go to the Security tab on this repo and the look under the Code Scanning section on the left-hand side, you will see 3 alerts related to this with the relevant details.

@kevpar kevpar self-assigned this Jan 24, 2024
@helsaawy helsaawy self-assigned this Jan 25, 2024
@ambarve ambarve merged commit d4494c7 into microsoft:main Jan 25, 2024
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants