Public repository without secret scanning
Secret scanning looks for committed API keys, tokens and credentials. On a public repository without it, a leaked secret is scraped and abused almost immediately.
Why it matters
Bots watch public commits in real time for AWS keys, database URLs and provider tokens. A key pushed by mistake can be used within minutes.
Push protection goes further and blocks the secret before it's ever committed, so the mistake never reaches history.
How to check for it
- GitHub → repository (or organization) → Settings → Code security and analysis shows whether secret scanning and push protection are on.
- Secret scanning is free for public repositories; for private repos it needs GitHub Advanced Security.
How to fix it
- Turn on secret scanning and push protection (Settings → Code security and analysis), ideally at the organization level so new repos inherit it.
- If a secret already leaked, rotate it immediately — removing the commit is not enough, it's already been seen.
SkyShield checks this automatically
Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.
FAQ
- If I delete the commit, is the secret safe?
- No. Assume any secret ever pushed to a public repo is compromised and rotate it. Deleting the commit doesn't undo the seconds it was public.