trufflesecurity / trufflehog

Find, verify, and analyze leaked credentials
https://trufflesecurity.com
GNU Affero General Public License v3.0
15.56k stars 1.62k forks source link

Recursive path metadata for archives #1549

Open mcastorina opened 1 year ago

mcastorina commented 1 year ago

Community Note

Description

Add path metadata to archive unpacking.

Problem to be Addressed

TruffleHog supports scanning archives, but it doesn't report which file in an archive the secret was found in. It would be great to include that location information, especially for nested structures.

Description of the Preferred Solution

Add the decoded archive path to the chunk metadata. This metadata should be printed when a secret is found.

Additional Context

Archive unpacking is done in the archive handler.

mcastorina commented 1 year ago

POC PR: https://github.com/trufflesecurity/trufflehog/pull/1551