feat: add configurable file count, depth, and more link support#1350
Merged
egibs merged 6 commits intochainguard-dev:mainfrom Feb 3, 2026
Merged
feat: add configurable file count, depth, and more link support#1350egibs merged 6 commits intochainguard-dev:mainfrom
egibs merged 6 commits intochainguard-dev:mainfrom
Conversation
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
stevebeattie
reviewed
Feb 3, 2026
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
c330b4d to
3a3509a
Compare
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
3a3509a to
9da18fa
Compare
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
stevebeattie
approved these changes
Feb 3, 2026
Member
stevebeattie
left a comment
There was a problem hiding this comment.
Nice, thanks, really appreciate the added testcases in addition to the rest of the improvements,
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.
This PR adds two new flags to configure the maximum number of files to scan along with the maximum depth allowed when recursively extracting archives. Both values can be unlimited but have defaults which should cover most requirements.
This PR also adds some gating around the UPX binary we use and doesn't just automatically use the first result from PATH. Instead, a known path can be provided via
MALCONTENT_UPX_PATH. For example, the Makefile uses this to automatically source the local UPX binary for sample testdata refreshes. If this is an empty string, we'll use/usr/bin/upxwhich is the default Wolfi location.Finally, this PR adds additional symlink validations in
handleSymlink, general hardlink/symlink support, and uses thefile.GetContentsfunction to read existing report content indiff.gowhich is how we retrieve file contents everywhere else. We didn't have any test coverage for the less common archive types, so I added four new samples and tests for Deb, RPM, Zlib, and Zstd extractions as well.