Offline Secret Leak Scanner
Find API keys and secrets locally without uploading your files
About
A deterministic, privacy-first Gitleaks-style scanner with embedded AWS, GitHub, Google, Slack, OpenAI, Stripe, JWT, private-key, and entropy rules. Findings include file, line, rule, and a masked match.
Examples
AWS key caught and masked
scanSecretLeaks([{ name: "deploy.sh", content: "export KEY=AKIAIOSFODNN7EXAMPLE" }]){ findings: [{ file: "deploy.sh", rule: "AWS access key", line: 1, match: "AKIA********" }] }The AKIA pattern matches and mask() keeps the first 4 characters with the rest starred.
Low-entropy password ignored
scanSecretLeaks([{ name: "app.env", content: 'password="aaaaaaaaaaaa"' }]){ findings: [] } (shannonEntropy is 0)A zero-entropy value sits far below the default threshold of 4, so the generic rule stays silent.
About this tool
Offline Secret Leak Scanner sweeps file contents with scanSecretLeaks(files, options): eight provider rules (AWS access keys, GitHub tokens, Google API keys, Slack tokens, OpenAI keys, Stripe live keys, JWTs, private-key headers) match first, then a generic high-entropy assignment rule catches api_key/secret/token/password/auth/credential values of 12+ characters.
Generic findings are gated by Shannon entropy via shannonEntropy(value): values at or above entropyThreshold (default 4, clamped at 0) are reported with their entropy to three decimals, while known provider matches are masked and reported regardless of entropy and excluded from double-counting.
Output stays private and deterministic: matches are masked to the first 4 characters plus up to 8 asterisks, duplicate findings are deduplicated, every finding carries file, rule, and 1-based line, and the result reports filesScanned plus the effective threshold.
How to use this tool
Feed files
Pass { name, content } entries to scanSecretLeaks — empty content scans clean and every input counts toward filesScanned.
Tune the threshold
Set entropyThreshold low (0) to catch everything the generic rule sees, or raise it toward 10 to silence low-entropy passwords.
Read findings
Each finding gives file, rule, line, masked match, and entropy for generic hits — provider hits never show raw secrets.
Use cases
Pre-commit secret sweep
Scan staged config and env files for provider keys before they reach version control.
Paste hygiene check
Verify shared snippets and support bundles contain no masked-match findings.
Threshold tuning review
Compare loose versus strict entropyThreshold runs to balance noise against missed leaks.
Common mistakes
Mistake:Expecting short passwords to be flagged.
Fix:The generic rule needs 12+ characters meeting the entropy threshold — short or repetitive values are ignored by design.
Mistake:Reading masked matches as the real secret.
Fix:Only the first 4 characters are shown; rotate the full credential at its source instead of reconstructing it.
Frequently asked questions
What does this tool do?
It scans file contents with scanSecretLeaks for eight provider patterns (AWS, GitHub, Google, Slack, OpenAI, Stripe, JWT, private keys) plus a generic high-entropy assignment rule, returning masked findings with file, rule, and line.
How does the entropy threshold work?
Generic api_key/secret/token/password values of 12+ characters report only at or above entropyThreshold (default 4) — threshold 0 catches everything while 10 silences nearly all generic hits.
Is my code uploaded or stored?
No. Pattern matching, entropy math, and masking run entirely in your browser.
Why was a value masked, or a password ignored?
Matches show only the first 4 characters plus asterisks by design, and low-entropy values like aaaaaaaaaaaa fall below the threshold so the generic rule skips them.
Related guides
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML