1001Ferramentas
🕵️ Security

Source Code Secret Scanner

Finds API keys, tokens, passwords and private keys pasted from code or .env files, by known pattern and by high entropy.

The scan runs inside this page. Your code is never uploaded, and every value found is shown masked, never in full.

What the scanner looks for

Two passes run over each line. The first matches known credential shapes: AWS key ids and secrets, GitHub and Slack tokens, Google API keys, Stripe live keys, JSON Web Tokens, private key headers, passwords inside connection URLs and generic assignments such as api_key = value.

The second measures Shannon entropy per character on tokens of 20 characters or more. Random credentials sit above 4 bits per character while ordinary words stay near 3, so the 3.5 default separates them without drowning you in noise. Placeholders like ${DB_PASS} and os.environ lookups are skipped on purpose.

Find API keys before you commit

Keys almost always leak the same way: someone pastes a block of config into an example file, forgets the database line and pushes. Pasting that same block here points at the problem in seconds. The scanner marks the line, names the credential type and shows only a fragment of the value, with the middle replaced by asterisks, so the review itself does not become a second leak.

Each line goes through two passes. The first matches known shapes: AKIA followed by sixteen capitals is an AWS key id, ghp_ plus thirty six characters is a GitHub token, sk_live_ is a Stripe production key, and three dot separated blocks starting with eyJ form a JSON Web Token. The second pass measures the Shannon entropy of every token twenty characters or longer.

That entropy figure is what separates noise from credentials. A random 32 character password sits near 5 bits per character, while the word configuration stays below 3.3. The 3.5 default catches hashes and keys without flagging every long variable name. Drop the threshold to 3.2 for an aggressive sweep before making a repository public, and raise it to 4.2 when false positives bury the real findings.

Frequently asked questions

Is the pasted code sent to a server?
No. The whole scan runs in JavaScript inside this tab, with no network request at all. Open the network panel in your developer tools before clicking scan and watch: nothing leaves. That is exactly why this works for material you would never paste into a search box.
Does a clean result mean my code has no secrets?
It means no known pattern matched and no token crossed the entropy threshold. A short password such as vault2026 triggers nothing, and a credential using your company's own internal format will not match either. Read an empty result as absence of signal, not as a certificate.
I found an exposed key. Is amending the commit enough?
It is not. Rewriting history does not erase what was already cloned, indexed by bots or cached by mirrors. The right order is to revoke the credential at the provider, issue a new one, move it into a secrets manager, and only then clean up the repository history.

Related Tools