Skip to content
Discussion options

You must be logged in to vote

Hi,

Great question — protecting secrets in a public repository is extremely important.

1️⃣ Is Secret Scanning automatically enabled?

Yes.
For public repositories, GitHub automatically enables Secret Scanning. It scans commits for known secret patterns (like API keys from AWS, Google, etc.).

For private repositories, Secret Scanning depends on your plan (GitHub Advanced Security required).

You can check it here:
Repository → Settings → Security & analysis

2️⃣ How to scan existing commits for exposed secrets?

GitHub automatically scans the entire commit history of public repositories.

If you want additional scanning:

Use tools like:

gitleaks

trufflehog

Run them locally to scan your full git…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by arlothehacker
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Security Build security into your GitHub workflow with features to keep your codebase secure Question Ask and answer questions about GitHub features and usage Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community!
3 participants