artifact-leak-hunter
Skill1 starsChanged 15 days agoMITView on GitHub
Verify what an application actually ships, not just what its source says. Cross-references credentials found in source against the built bundle, inspects source maps, and audits .apk/.aab/.ipa packages for bundled config files, signing state, debuggable and cleartext flags, and embedded credentials. Use before publishing a web build or uploading a mobile release.
- Reads credentials
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Before deploying a web build, or uploading an .apk / .aab / .ipa to a store
- Very specific: line 58
Read the source findings first (SEC-01, SEC-01B, SEC-01C).
- Distinctive: line 60
Server-only: - must never appear in any client bundle or mobile package
- Distinctive: line 96
If a credential reached a published bundle or an uploaded package, it is already public.
- Distinctive: line 98
Always give this order, and never let a fix stop at step 2:
- Distinctive: line 103
Check provider access logs for use of the old credential
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Artifact Leak Hunter - Verify What You Actually Ship
Reading source code tells you what you wrote. Reading the build output tells you what your users actually receive. Those are not the same thing, and the gap between them is where real leaks live.
A credential can be absent from the source you reviewed and still end up in the deployed bundle through a build-time inline, a bundler define, a committed .env that the build copied, or a dependency that embeds it. Equally, a mobile release can be published debuggable, unsigned, or carrying an .env file inside its assets.
When to Trigger
- Before deploying a web build, or uploading an
.apk/.aab/.ipato a store - The user asks "did my API key leak?", "is my key in the bundle?", "check my build", "check my APK"
- As Stage 1.5 of the master
vibe-aegisloop, after the source scan and before the Referee stage
Why This Finds What Source Scanning Cannot
The scanner reads your source first, so it knows which specific credential to hunt for in the build output. That turns a guess into proof:
A generic scanner says "this bundle contains something that looks like a key." This skill says "the key at
.env.local:3is indist/assets/index-abc.js— every visitor can read it."
That cross-reference is rule ART-01, and it is the only finding in the whole framework that is confirmed by construction rather than inferred.
Run The Deterministic Stage First
# Auto-detect dist/, build/, out/, .next/, .output/, .svelte-kit/
python3 .aegis/scripts/aegis_scan.py . --artifact
# Or point at an explicit build directory or mobile package
python3 .aegis/scripts/aegis_scan.py . --artifact dist/
python3 .aegis/scripts/aegis_scan.py . --artifact app/build/outputs/apk/release/app-release.apk
# Everything: source + git history + dependencies + artifacts
python3 .aegis/scripts/aegis_scan.py . --all --output .aegis/scan-report.jsonRule Reference
| Rule | Severity | What it proves |
ART-01 | Critical | Confirmed leak. A credential found in your source is present in the shipped bundle |
ART-02 | Medium / Low | A source map is in the build output. With sourcesContent, your original unminified source ships to every visitor |
ART-03 | Critical–Medium | A provider-format credential found directly in shipped JavaScript, HTML or JSON |
ART-11 | High | Mobile package has no signature block under META-INF/ |
ART-12 | Critical | A config file (.env, id_rsa, service-account.json, .npmrc) is bundled inside the app package |
ART-13 | Medium | Manifest references cleartext traffic |
ART-14 | High | Manifest may mark the app debuggable |
ART-15 | Critical–Medium | A credential is embedded in packaged assets, resources or code sections |
Investigation Protocol
1. Establish what should be secret
Read the source findings first (SEC-01, SEC-01B, SEC-01C). List every credential the app holds and classify each:
- Server-only - must never appear in any client bundle or mobile package
- Publishable - designed to be public (a Supabase anon key, a Stripe publishable key, a Firebase web config). These are not leaks, but confirm the protection they rely on actually exists: anon keys are only safe when Row-Level Security is enabled and enforced.
This classification step matters. Flagging a publishable key as a breach destroys trust in every other finding you report.
2. Confirm the build is current
A stale dist/ proves nothing about what is live. Check the build output is newer than the source, or rebuild before trusting a clean result. State plainly in your report when the build timestamp predates the latest source change.
3. Trace every confirmed leak to its cause
For each ART-01 or ART-03, find how it got there. The fix depends entirely on the mechanism:
| Cause | Fix |
NEXT_PUBLIC_ / VITE_ / EXPO_PUBLIC_ prefix | Drop the prefix, access it only in a server route or Server Action |
| Imported into a client component | Move the call behind an API route; the browser never sees the key |
Bundler define / env injection | Remove it from the bundler config |
Committed .env copied by the build | Remove from the image or package, add to .gitignore and .dockerignore |
4. Mobile package specifics
An .apk or .aab is a zip archive that anyone can download from the store and unpack. Treat everything inside it as public:
- Confirm the release is signed with the correct upload key
- Confirm
android:debuggableis absent or false — a debuggable release lets anyone inspect memory and data - Confirm
android:usesCleartextTraffic="false"and that a network security config requires HTTPS - Confirm no
.env, keystore, service-account JSON or private key is inassets/orres/ - Any key that must reach the device should be short-lived and server-issued, never static in the package
5. Report honestly
Every ART-01 is CONFIRMED — the value is demonstrably in both places; do not downgrade it. ART-13 and ART-14 are derived from strings inside binary XML, so report them as MANUAL_REVIEW unless you can decode the manifest properly. Never state a leak is exploited; state it is exposed.
The Rotation Rule
If a credential reached a published bundle or an uploaded package, it is already public. Removing it from the next build does not undo that — anyone could have copied it, and bundles get cached, mirrored and archived.
Always give this order, and never let a fix stop at step 2:
- Rotate the credential now at the provider
- Change the architecture so it cannot re-enter the client build
- Rebuild and re-scan to prove the new build is clean
- Check provider access logs for use of the old credential
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- ai-llm-security-shieldSkill
- architecture-threat-modelSkill
- backend-reliability-scaleSkill
- payments-logic-auditorSkill
- production-preflight-gateSkill
- security-redteam-loopSkill
- ui-ux-bug-finderSkill
- vibe-aegisSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

