archive: add regression tests for tar path-traversal containment - #68
Merged
Conversation
thaJeztah
force-pushed
the
add_regression_tests
branch
from
July 22, 2026 16:35
e134c03 to
5f5319e
Compare
thaJeztah
force-pushed
the
add_regression_tests
branch
from
July 22, 2026 16:48
5f5319e to
6e7a78b
Compare
…pped)
Both tests fail against the previous (vulnerable) code and pass with the
hardening in this branch:
- TestUntarParentTraversalContained: entries named ".." / "../pwned" are
rejected and never write into the destination's parent.
- TestUntarSiblingPrefixContained: a hardlink whose target resolves to a
sibling sharing the destination's path prefix (dest "base/dest",
sibling "base/dest-evil") is rejected, rather than accepted by a
string HasPrefix check.
Windows-specific coverage (":" / "\" handling) needs Windows CI and
remains a follow-up.
Signed-off-by: Cesar Talledo <cesar.talledo@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah
force-pushed
the
add_regression_tests
branch
from
July 22, 2026 17:23
956297c to
216738e
Compare
thaJeztah
marked this pull request as ready for review
July 22, 2026 17:23
vvoland
approved these changes
Jul 22, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
==========================================
- Coverage 65.96% 65.81% -0.15%
==========================================
Files 42 42
Lines 2039 2039
==========================================
- Hits 1345 1342 -3
- Misses 517 519 +2
- Partials 177 178 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Both tests fail against the previous (vulnerable) code and pass with the hardening in this branch:
Windows-specific coverage (":" / "" handling) needs Windows CI and remains a follow-up.