Secret Scanner for Code and Config
Operator: Abdulla Al Fahad. How tools are built and checked
Most leaked credentials are not stolen; they are pasted. An AWS key lands in a Slack message, a database URL is committed in a sample config, a JWT is copied into a bug report. This scanner is for the moment before that happens: paste the text, or pick the files, the folder or the ZIP you are about to share, and it reports every line that looks like a credential, with the file, the line, the column and a severity.
It runs entirely in your browser. That matters more here than for most tools, because the thing being searched for is exactly what you would not want to upload. The results never show a whole secret: previews are masked, the exports contain only the masked value and a short fingerprint, and there is no reveal button. You find the line, open the file yourself, and rotate the key.
Key features
- Twenty-three rules covering AWS, GitHub, GitLab, Stripe, Slack, Google, Twilio, SendGrid, OpenAI, Anthropic, Hugging Face, npm and Shopify credentials, private key blocks, JWTs, database and password-bearing URLs, and secret-named assignments
- Shannon-entropy check on generic assignments, and an optional noisy mode that flags any long high-entropy quoted string
- Input by pasting, by choosing files, by choosing a whole folder, or by choosing a ZIP
- File, line and column for each finding, a severity from critical to low, and a masked preview of the line
- Export as JSON, CSV or SARIF 2.1.0 for GitHub code scanning and similar dashboards
- Never displays a full secret, and never sends one anywhere
The rules, the entropy check and what the exports contain
Each rule is a pattern plus, for some, a check. Provider rules match a distinctive prefix and length, for example AKIA followed by sixteen capitals and digits for an AWS access key ID, ghp_ or github_pat_ for GitHub, sk_live_ for a Stripe live key, xoxb- for Slack, AIza and thirty-five characters for a Google API key, SG. with two base64url parts for SendGrid, and sk-ant- for Anthropic. An AWS secret access key is only reported when a forty-character value sits next to a name containing aws and key and passes an entropy test, because forty random-looking characters alone are too common to flag.
Private key blocks are found by their BEGIN line (RSA, EC, DSA, OpenSSH, PGP, encrypted or plain PKCS#8) and reported as critical; the preview shows only the header. A JWT must have three base64url parts whose first part decodes to JSON containing an alg field, which removes most false hits. Database URLs for postgres, mysql, mongodb, redis, amqp and mssql, and ordinary http URLs of the form user:password@host, are reported with the password as the secret unless it looks like a placeholder.
The generic rule looks for a name that contains secret, token, password, passwd, pwd, api key, access key, auth key, private key, client secret or credential, followed by an equals sign, colon or arrow and a value of at least twelve characters. The value must reach 3.2 bits of Shannon entropy per character, must not look like a placeholder (changeme, your_key_here, xxxx, a repeated character, an angle-bracket or ${...} template), and must not start like a variable reference such as process.env. or os.getenv. Low-entropy strings such as plain words and camelCase identifiers are dropped. The optional noisy mode adds any quoted string of 24 to 120 characters at 4.3 bits or more, skipping all-letter strings and long hex digests.
When two rules match the same characters, the more specific one wins: an AWS key inside an assignment named aws_key is one AWS finding, not two. A line's context preview masks every finding on that line, so a second secret on the same line is not printed in the clear next to the first. The masked form keeps up to four leading characters and the last two with asterisks between, and the fingerprint is a short non-cryptographic hash of the secret, kept so the same value can be spotted across files without storing it.
How it works
Text is split into lines and every rule runs over each line, so a secret split across two lines is not found; the only multi-line pattern, the private key block, is recognised by its header line. Files are read one at a time and decoded as UTF-8. A file with a zero byte in its first 8 KB, or a name ending in an image, archive, font, document or lock-file extension, is skipped as binary, and folders such as node_modules, .git, dist, build and vendor are skipped altogether.
A ZIP is opened with the same library other tools on this site use, and each file inside is treated like a file you picked, reported under a path such as release.zip!/config/prod.env. The scan yields to the browser regularly so a progress line updates and Cancel works. Findings are sorted by severity, then file, then line.
When to run it
- Checking a zipped project folder for a live payment key and a database password before sending it to a contractor
- Scanning a pasted log excerpt for bearer tokens before attaching it to a public issue
- Producing a SARIF file so findings from a one-off check appear in a code-scanning dashboard
- Checking a directory of dotfiles and sample configs on a laptop before pushing them to a public repository
Running a check
- Paste text into the box, or choose files, a .zip, or a folder.
- Leave the noisy entropy option off unless you are hunting for unusual tokens that no rule knows.
- Wait for the scan to finish; use Cancel for a very large folder.
- Filter by severity or file name, and read the file, line and masked preview of each finding.
- Open each file at the stated line, rotate the real credential, and remove it from the history if it was committed.
- Download JSON, CSV or SARIF for a record or a dashboard.
Example
A sample .env pasted into the box
AWS_ACCESS_KEY_ID=AKIAIOSFODNN7ABCDEFG
aws_secret_access_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzXaBcDeFgH"
DATABASE_URL=postgres://admin:S3cr3tP4ssw0rd!@db.internal:5432/app
password = "changeme"Findings (the placeholder is ignored)
high AWS access key ID pasted-text:1:19 AKI***************FG
critical AWS secret access key pasted-text:2:26 wJal****************gH
high Database connection string with password
pasted-text:3:31 S3***********d!
password = "changeme" is not reportedTips for best results
- Treat every critical or high finding as exposed the moment it appeared in the file, whether or not anyone has seen it, and rotate it.
- Run the scan on the folder you plan to share, not on a copy of one file; a key often hides in a sample config three levels down.
- Use the SARIF export when you need results in a dashboard that reads it; the line and column are included for every result.
- A medium finding on a variable named token with a random-looking value deserves a look even when it is not a real provider key.
- If a rule keeps flagging a test fixture, note the file in your own process; this page has no allow list and does not remember anything between visits.
Limits
A clean result is not proof of a clean project. Secrets in formats no rule recognises, in binary files, split across lines, encoded in base64 or held in a skipped folder are not found.
Entropy checks produce false positives (hashes, ids, generated fixtures) and false negatives (short or low-entropy passwords such as Summer2026!). Passwords chosen by people are the most likely thing to slip through.
Only the current files are scanned. A secret removed in an earlier commit is still in the repository history, which this page cannot see.
The fingerprint is a short non-cryptographic hash. It lets you match repeats; it is not a secure digest and should not be treated as one.
Common errors and how to fix them
- A file is listed under skipped files
- It is binary, inside a skipped folder, over 5 MB, or past the 5,000-file or 250 MB limit. Scan it separately as pasted text if it is text.
- "not a readable ZIP archive"
- The archive is damaged or is not a ZIP (7z, RAR and tar.gz are not supported). Extract it and choose the folder instead.
- Findings stop at 500 for one file
- The per-file cap was reached, usually on a minified bundle or a data dump. Fix the first findings and scan again, or split the file.
- Nothing is found but you know a key is there
- Check whether the line contains the value split by concatenation, or a format with a different prefix. Try the noisy entropy option, or search for the prefix by hand.
Best practices
- Scan before you share, then rotate anything found; deleting a key from a file does not revoke it.
- Keep real credentials in environment variables or a secret manager so that no file you would share contains one.
- Pair this check with a server-side or commit-time scanner for repositories; a one-off scan only covers the moment you run it.
What the exports contain
The JSON file lists each finding with its rule, severity, file, line, column, length, masked preview, context line, entropy and fingerprint, plus counts of files scanned and skipped. The CSV has the same columns. Neither contains a full secret.
The SARIF 2.1.0 file has one run with this tool as the driver, one rule entry per rule that fired with its severity and a security-severity score, and one result per finding with its physical location (file path, start line, start column and end column) and the fingerprint as a partial fingerprint. Critical and high map to the error level, medium to warning and low to note.
Frequently asked questions
What do the severities mean?
Critical and high are credentials that give direct access, such as live payment keys, cloud secrets and private keys. Medium covers tokens and values that need your judgement, and low covers test keys and the noisy entropy mode. Treat every finding as exposed until you have checked it.
Why can't I see the whole secret?
To avoid copying live credentials into screenshots, tickets and exports. The file name, line and column tell you where to look in your own copy.
Is this a replacement for TruffleHog or GitGuardian?
No. Those watch repositories and history continuously. This is a quick local check of the files in front of you.
Will it scan a whole git repository?
It scans the working-tree files in a folder you choose and skips the .git directory, so it does not read history.