-
Notifications
You must be signed in to change notification settings - Fork 186
Fix unzipping JARs that symlink to other layers #1555
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
6c4443f
fix the unzip issue
zlav a6d929f
test in CI
zlav 22b9e74
confirm that the image has a symlink that breaks fossa analyze
zlav 34f5541
update jars
zlav 1822f03
break the logic again
zlav b55a9ca
fix zip scanning
zlav 1dc675f
address test
zlav 52cbaec
fix layer hashes
zlav 03e2d20
add seperators
zlav ea2b61f
change tests just to see what happens
zlav fef7983
switch hashes again
zlav 795ff9d
update nested jars
zlav a2d638b
change tests and validate that it works end to end
zlav 65760a5
flip tests to test
zlav 8422675
switch up tests
zlav 39b7e3f
fix tests to what we actually expect
zlav 456a54a
Merge branch 'master' into fix/symlink-unzip
zlav 0769bda
change log back to warn
zlav c3bae90
add docs
zlav 790af08
fix LFS files
spatten dde93d0
Update Changelog.md
zlav File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,29 @@ | ||
| # Making test/Container/testdata/nested-jar.tar | ||
| # Using this test suite | ||
|
|
||
| **If you make any changes to this suite ensure that you manually create the tar file. The test suite does not automatically create the image for testing.** | ||
|
|
||
| This test suite tests the CLI's capability to recursively unpack archived files in a container image for the purpose of JAR analysis. | ||
|
|
||
| ## Building the tar file | ||
|
|
||
| Running the following commands in order will create `nested_jars.tar` for the purpose of testing. | ||
|
|
||
| ``` | ||
| ./make-nested-jars | ||
| docker build -t nested_jars . | ||
| docker save nested_jars > ../nested_jars.tar | ||
| ``` | ||
|
|
||
| After this is run, ensure that you commit `nested_jars.tar` and any other files in this directory that you used to build it. | ||
|
|
||
| The existing assertions in the test files will likely need to be updated as well. | ||
|
|
||
| ## Notes on the tar file | ||
|
|
||
| You will end up with a container with a jar called top.jar in it | ||
| top.jar contains middle.jar | ||
| middle.jar contains deepest.jar | ||
| Running the make command results in a container with: | ||
| - jar called top.jar in it | ||
| - top.jar contains middle.jar | ||
| - middle.jar contains deepest.jar | ||
| - sym.jar symlinks to deepest.jar (for the sake of testing symlinks between layers) | ||
|
|
||
| These are not actual jar files. They're just zip files with a single text file in them. | ||
| These are not actual jar files. They're just zip files with a single text file in them. | ||
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
Git LFS file not shown
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.