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

how can I get the full detected secret with keyword prefix instead of just the secret content itself in trufflehog output raw field? #3947

Open
yang0369 opened this issue Feb 27, 2025 · 0 comments

Comments

@yang0369
Copy link

yang0369 commented Feb 27, 2025

Please review the Community Note before submitting

Description

My question is how can I get Raw":"aws_access_key_id = AKIAQYLPMN5HHHFPZAM2" instead of Raw":"AKIAQYLPMN5HHHFPZAM2" in trufflehog output?

To replicate my work:

e.g. in my local path, I have this test.txt file under /my-path/trufflehog_test/ path:

test.txt

[default]
aws_access_key_id = AKIAQYLPMN5HHHFPZAM2
password = 1tUm636uS1yOEcfP5pvfqJ/ml36mF7AkyHsEU0IU
output = json
region = us-east-2

by running
trufflehog filesystem /my-path/trufflehog_test --no-verification --json > truffle_filesystem_sherlock.jsonl
I got this output:

{"SourceMetadata":{"Data":{"Filesystem":{"file":"/Users/kewenyang/Desktop/Projects/sherlock/sherlock-service/personal/trufflehog_test/test.txt","line":2}}},"SourceID":1,"SourceType":15,"SourceName":"trufflehog - filesystem","DetectorType":2,"DetectorName":"AWS","DetectorDescription":"AWS (Amazon Web Services) is a comprehensive cloud computing platform offering a wide range of on-demand services like computing power, storage, databases. API keys for AWS can have varying amount of access to these services depending on the IAM policy attached.","DecoderName":"PLAIN","Verified":false,"VerificationFromCache":false,"Raw":"AKIAQYLPMN5HHHFPZAM2","RawV2":"AKIAQYLPMN5HHHFPZAM2:1tUm636uS1yOEcfP5pvfqJ/ml36mF7AkyHsEU0IU","Redacted":"AKIAQYLPMN5HHHFPZAM2","ExtraData":{"account":"052310077262","is_canary":"true","message":"This is an AWS canary token generated at canarytokens.org, and was not set off; learn more here: https://trufflesecurity.com/canaries","resource_type":"Access key"},"StructuredData":null}

Preferred Solution

Additional Context

References

@yang0369 yang0369 changed the title How to show the prefix keyword by Custom Detector? How to get the prefix keyword by trufflehog native Detector? Feb 27, 2025
@yang0369 yang0369 changed the title How to get the prefix keyword by trufflehog native Detector? How to get the prefix keyword from the detected results using trufflehog native Detector? Feb 27, 2025
@yang0369 yang0369 changed the title How to get the prefix keyword from the detected results using trufflehog native Detector? how can I get Raw":"aws_access_key_id = AKIAQYLPMN5HHHFPZAM2" instead of Raw":"AKIAQYLPMN5HHHFPZAM2" in trufflehog output Feb 27, 2025
@yang0369 yang0369 changed the title how can I get Raw":"aws_access_key_id = AKIAQYLPMN5HHHFPZAM2" instead of Raw":"AKIAQYLPMN5HHHFPZAM2" in trufflehog output how can I get "aws_access_key_id = AKIAQYLPMN5HHHFPZAM2" instead of "AKIAQYLPMN5HHHFPZAM2" in trufflehog output Feb 27, 2025
@yang0369 yang0369 changed the title how can I get "aws_access_key_id = AKIAQYLPMN5HHHFPZAM2" instead of "AKIAQYLPMN5HHHFPZAM2" in trufflehog output how can I get the full detected secret with keyword prefix instead of just the secret content itself in trufflehog output raw field? Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant