1. Pick an input
Leaksweep takes three kinds of input. All three are processed in memory and dropped when the sweep ends. Source code is never stored.
- Paste. One file: a config, an env file, a source file. Free plan caps at 200 KB.
- Archive. A
.zip,.tar.gz, or.tgzof your repo. 1 MB on Free, 4 MB on Dev and Team. - Public repo URL. GitHub or GitLab, public only, default branch or a
/tree/branchURL. Dev and Team.
The cleanest way to make an archive is from git itself. It skips ignored files and the .git folder:
git archive --format=zip -o repo.zip HEAD
To sweep what is actually on disk, including untracked files such as a stray .env, zip the working tree instead:
zip -r repo.zip . -x "node_modules/*" ".git/*" "dist/*" ".next/*"
Leaksweep also skips node_modules, .git, vendored code, lockfiles, minified files, and binaries on its side.
2. Run the sweep
In the console, open New sweep, choose the input, confirm the code is yours (or public code you are reviewing defensively), and press SWEEP. Want to see it before creating an account? The live sweep on the homepage runs the same engine with no login.
What happens, in order:
- 29 detectors and entropy gates pull every credential-shaped candidate.
- Each candidate is masked at source: first four and last four characters survive. Shorter values keep less.
- The reasoning layer reads the masked context and returns a verdict, a severity, and the fix.
- Only the masked result is saved: masked value, keyed fingerprint, file and line, a redacted excerpt.
3. Read a finding
Every finding tile carries the same fields:
{
"kind": "Stripe live secret key",
"masked_secret": "sk_l••••••••••••YhJ9",
"location": { "file": ".env", "line": 5, "column": 19 },
"severity": "critical",
"verdict": "live_risk",
"confidence": 0.95,
"what_it_is": "...",
"attacker_impact": "...",
"remediation_steps": [
{ "title": "Roll the key in the Stripe dashboard", "detail": "...", "command": null },
{ "title": "Move the value to the environment", "detail": "...", "command": "..." }
]
}- verdict is
live_risk,likely_real, orfalse_positive. Noise is listed with its reason, never hidden, so you can overrule it. - severity reflects blast radius, not pattern type. An AWS key ID next to its secret is critical. The same ID alone is high.
- risk score is computed in code from severities and verdicts. The model never sets the number.
4. Rotate first
Step one on every live finding is rotation at the issuer. Do that before anything else. Removing the value from the file, or even from git history, does not un-leak it: it may already be in a clone, a fork, a CI log, or a scraper's database.
5. Re-sweep and confirm
After rotating and cleaning the code, open the sweep and press RE-SWEEP AFTER ROTATION. Findings are matched by keyed fingerprint, so the delta is exact: sealed (gone), still exposed, or new. Because source is never kept, paste and archive sweeps ask for the updated version. Repo sweeps re-fetch the URL. Re-sweeps do not count against the free tier.
6. Export and prevent
Export the report as Markdown on any plan, or JSON on Dev and Team. Then set up the prevention layer so the next key never reaches a commit: see CI integration.
API reference: the demo endpoint
The homepage demo is a plain HTTP endpoint. It is rate limited and size capped, and it is fine to call from a script.
curl -s https://leaksweep.net/api/sweep \
-H "content-type: application/json" \
-d '{"code": "DB_PASSWORD=<paste your file here>", "filename": ".env", "attest": true}'Limits: 60 KB of code or a 1 MB archive (multipart field 'file'), 10 requests per 10 minutes per IP. Results are cached for 10 minutes by content hash. 'attest: true' confirms the code is yours or already public.
Responses: 200 with { findings, summary, preview }, 400 invalid input, 413 too large, 429 rate limited.