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

Inconsistent treatment of default file archive scanning behaviour depending upon data source #2506

Open
0x736E opened this issue Feb 24, 2024 · 0 comments
Labels

Comments

@0x736E
Copy link

0x736E commented Feb 24, 2024

Please review the Community Note before submitting

TruffleHog Version

v3.63.7 and later

Trace Output

N/A

Expected Behavior

TruffleHog should treat all data sources equally; unless the data source does not intrinsicly support a given feature or behaviour, then the default behaviour should be common amongst all data sources.

Actual Behavior

TruffleHog treats data sources differently when scanning for file archives. When scanning, the 'archive' handler may or may not be enabled, depending upon the data source. This results in secrets being found in file archives for some data sources but not others. There is also no mechanism for the user to enable or disable this behaviour.

The default behaviour as of v3.63.7 is as follows:

Data Source skipArchives
CircleCI False
Docker False
FileSystem False
GCS False
Git True
GitHub False
GitLab False
S3 False
SysLog False
TravisCI False

When we compare findings when scanned with the 'filesystem' and 'git' data sources we can see that the filesystem datasource scans and produces findings for the 10 secrets located in the zip file, however in the results from the scan which used the git data source we do not see this:
results_screenshot

Steps to Reproduce

  1. Create a zip file containing some secrets
  2. Scan the folder containing the zip file with the filesystem data source configuration
  3. Scan the folder containing the zip file with the git data source configuration
  4. Compare the result

Environment

  • OS: All
  • Version v3.63.7 and above

Additional Context

Root cause analysis is located here:

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant