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

does trufflehog verify the detected secrets by sending them to API endpoints for local filesystem run? #3448

Open
yang0369 opened this issue Oct 17, 2024 · 0 comments

Comments

@yang0369
Copy link

yang0369 commented Oct 17, 2024

Hi,
I am exploring TruffleHog's secret detection and verification process for local filesystem scans. After reading about TruffleHog's ability to verify secrets via API calls referring to how-trufflehog-verifies-secrets
, I conducted an experiment:

  1. ran TruffleHog on a local file:
trufflehog --no-update --local-dev --json --config trufflehog_generic.yaml filesystem test.py

  2. The output I received (partially shown) indicated a detection based on a custom regex rule, but it wasn't verified:
    e.g. one of the detected output:
    {"SourceMetadata":{"Data":{"Filesystem":{"file":"secret.py","line":5}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":904,"DetectorName":"CustomRegex","DecoderName":"PLAIN","Verified":false,"Raw":"secret is identified as positive.\"\n","RawV2":"","Redacted":"","ExtraData":{"name":"generic-api-key"},"StructuredData":null}

  3. I also noticed that TruffleHog's detections were solely based on the regex rules in trufflehog_generic.yaml file. When I removed all regex from this file, no secrets were detected anymore.

Given these observations, I am wondering:

  1. How can I enable truffleHog to verify the detected secrets?
  2. how can I enable the live API verification feature in my scans?


Thanks.

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

No branches or pull requests

1 participant