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

Remove unnecessary archive code; fix .tar.xz support #214

Merged
merged 1 commit into from
May 10, 2024

Conversation

egibs
Copy link
Member

@egibs egibs commented May 10, 2024

I was running a scan on the go1.22.2.linux-arm64.tar.gz archive which contains nested .tar and .zip files.

The recursive extraction logic in each of the extract functions was indeed incorrect, not needed, and broke extraction for this type of archive.

Removing this logic 1) fixed the issue with that archive and 2) was proven unnecessary for .gem files:

❯ ls -hal /var/folders/3g/88131l9j11x995ppjbxsvhbh0000gn/T/cocoapods-fixbugs-plugin-0.1.0.gem2017939464
Permissions Size User  Date Modified Name
.rw-r--r--@   76 egibs 10 May 16:27  .travis.yml
drwxr-xr-x@    - egibs 10 May 16:27  bin
.rw-r--r--@  418 egibs 10 May 16:27  checksums.yaml
.rw-r--r--@  991 egibs 10 May 16:27  cocoapods-fixbugs-plugin.gemspec
.rw-r--r--@  109 egibs 10 May 16:27  Gemfile
drwxr-xr-x@    - egibs 10 May 16:27  lib
.rw-r--r--@ 1.1k egibs 10 May 16:27  LICENSE.txt
.rw-r--r--@ 2.2k egibs 10 May 16:27  metadata
.rw-r--r--@   28 egibs 10 May 16:27  Rakefile
.rw-r--r--@ 1.4k egibs 10 May 16:27  README.md

@egibs egibs requested a review from tstromberg May 10, 2024 21:32
@egibs egibs force-pushed the more-archive-fixes branch from a08efd5 to d487059 Compare May 10, 2024 21:41
Copy link
Collaborator

@tstromberg tstromberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simpler is good!

once we are able to stabilize the output of an archive scan, we're going to want tests!

@tstromberg tstromberg merged commit 684ff03 into chainguard-dev:main May 10, 2024
7 of 8 checks passed
@egibs egibs deleted the more-archive-fixes branch June 10, 2024 14:22
egibs pushed a commit to egibs/malcontent that referenced this pull request Aug 5, 2024
egibs pushed a commit to egibs/malcontent that referenced this pull request Sep 25, 2024
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.

2 participants