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

Partially revert #2253 #2405

Closed
wants to merge 1 commit into from
Closed

Conversation

rgmz
Copy link
Contributor

@rgmz rgmz commented Feb 9, 2024

Description:

An optimization introduced in PR #2253 inadvertently broke scanning of nested zip archives.

Based on my testing, this fixes #2378. The changes to pkg/sources/git/git.go might also need to be reverted.
https://github.com/trufflesecurity/trufflehog/pull/2253/files#diff-c2efdfa2e124674a8eaf026fee883e72f19914e765c7a99b72e4ead288bd1104

Alternatively, it's possible that this could be fixed by writing nested archives to disk instead of memory.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@rgmz rgmz requested a review from a team as a code owner February 9, 2024 17:54
@bill-rich
Copy link
Collaborator

@ahrav How does this mesh with the #2253 changes?

@ahrav
Copy link
Collaborator

ahrav commented Feb 11, 2024

@ahrav How does this mesh with the #2253 changes?

I would've hoped it wouldn't affect it, but it appears it might. We might want to consider using our buffered file writer if we are writing large amount of data to memory otherwise we'll end up with OOM issues again.

@rgmz rgmz closed this Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

error unarchiving chunk: input type must be an io.ReaderAt and io.Seeker because of zip format constraints
3 participants