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

[Request] Scan the Commit Metadata (email, name and commit message) for secrets #2683

Closed
bugbaba opened this issue Apr 7, 2024 · 0 comments · Fixed by #2713
Closed

[Request] Scan the Commit Metadata (email, name and commit message) for secrets #2683

bugbaba opened this issue Apr 7, 2024 · 0 comments · Fixed by #2713

Comments

@bugbaba
Copy link

bugbaba commented Apr 7, 2024

Hi Team,

Description

Had read a blog were the author mentioned that user's might have secrets set in their git commit configurations. So I started logging the commit metadata for public repositories and found two instance of credentials being configured in the Commit email address. What looks like its occurs mainly due to mistake made while copy pasting the commands during git configuration.

One of the findings that I found in the wild
image

To replicate the same, I have set the hugginface API key in the email field which doesn't gets detected by the trufflehog https://github.com/bugbaba/testwa54321/commit/6819bdd07fba20de2a1249bc8bf5341530b53d4a.patch

image

Preferred Solution

While parsing the git commits saved the commit metadata to a file which is later scanned for secrets.

--
Regards,
@bugbaba

@rgmz rgmz mentioned this issue Apr 18, 2024
2 tasks
rosecodym pushed a commit that referenced this issue Apr 25, 2024
This fixes #2683. It scans the commit author, committer (which is typically GitHub <noreply@github.com> for GitHub, but can be different), and message.

It also scans Git notes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant