fix: handle all tarfile extract errors#1206
Merged
Merged
Conversation
behnazh-w
approved these changes
Oct 9, 2025
8c9c454 to
0a7a8b9
Compare
behnazh-w
approved these changes
Oct 9, 2025
Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
0a7a8b9 to
ad1bbcc
Compare
behnazh-w
approved these changes
Oct 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Addressing #1202, which occurred due to a
tarfile.SpecialFileError, this case happened as the provided package had uploaded what linux classes as a character file (like a device file). Instead of handling specificallytarfile.ReadError, thedownload_package_sourcecodefunction how handles alltarfileerrors usingtarfile.TarError, the base error class.Description of changes
In addition to those changes mentioned above, also included in this PR is modifying
DetectMaliciousMetadataCheck.analyze_sourceto returnSKIPinstead of raising aHeuristicAnalyzerValueErrorfrom aSourceCodeError. This means that the result of the metadata analysis is still preserved and the analysis result does not result inUNKNOWN.Related issues
Closes #1202.
Checklist
verifiedlabel should appear next to all of your commits on GitHub.