/agentic-awesome-skills:client-secret-exposure-auditfrom agentic-awesome-skills
Audits a deployed web app for secrets exposed to the browser: hardcoded API keys/tokens in JS, secrets in HTML meta/attributes/comments, publicly reachable source/config/deploy files, and header/CORS misconfigurations.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Modern web apps ship a lot of code and config to the browser. When credentials
leak into that client-visible surface — hardcoded in JavaScript, tucked into HTML
meta/data-* attributes or comments, or served as raw source/config/deploy
files that were never meant to be public — anyone can read them with curl and a
browser. This skill is a defensive, read-only workflow for finding that class
of exposure on a web app you are authorized to assess.
It maps to OWASP A02:2021 Cryptographic Failures (sensitive data exposure), A05:2021 Security Misconfiguration, and CWE-798 (hardcoded credentials), CWE-200 (sensitive information exposure), CWE-540 (source code in a production build). It only fetches resources the server already hands to any anonymous visitor — it does not exploit, brute-force, or mutate anything.
Set the target once. Every command below reads only what the server serves publicly.
BASE="https://TARGET.example" # authorized target, no trailing path
umask 077
WORK="$(mktemp -d)" || exit 1
cd "$WORK" || exit 1
curl --silent --show-error --connect-timeout 5 --max-time 20 \
--max-filesize 1048576 --proto '=https' -D headers.txt -o body.html "$BASE/"
# Inspect locally; redact Set-Cookie and credential-bearing values before sharing.
Flag on the headers:
access-control-allow-origin: * can be appropriate for public assets. Browsers
reject wildcard origins for credentialed reads; assess actual sensitive endpoint
responses and credential mode before claiming a CORS vulnerability.Content-Security-Policy, X-Frame-Options/frame-ancestors,
X-Content-Type-Options: nosniff, Referrer-Policy, Permissions-Policy.Strict-Transport-Security.Server/framework version banners that fingerprint the stack.Use a local parser/scanner to report only file paths, line numbers, candidate types and redacted fingerprints. Do not print matching lines or whole HTML comments/meta tags into terminal/model output: they may contain the very secrets being audited. Pattern matches are candidates, not proof of valid credentials; public/publishable keys and placeholders require contextual classification.
Do not automatically fetch discovered URLs. Extract candidates as inert data with an HTML parser and URL parser, resolve against the authorized base, and reject any scheme other than HTTPS, embedded credentials, unexpected ports or origins. Before a request, verify all resolved destination addresses are public (not loopback, link-local, private, multicast, reserved or unspecified), pin the approved address for that connection to prevent DNS rebinding, and disable redirects. A redirect or additional origin requires separate scope validation. Use a trusted network client that enforces these checks, or stop at an inventory of candidate scripts. Never follow require/import paths or sourcemaps without the same validation. Store responses privately and redact secret values before terminal or model output.
Also scan any sourcemaps (*.js.map) — they can rebuild original source with
comments intact.
SPAs often have a catch-all rewrite that returns index.html for unknown paths,
so compare status, content type and normalized content against multiple nonexistent
paths. Different sizes alone do not prove a file: dynamic error/SPA pages vary.
FALLBACK=$(curl --silent --show-error --connect-timeout 5 --max-time 20 --max-filesize 1048576 "$BASE/____nope____$RANDOM" | wc -c) # SPA fallback size
for p in /.env /.env.local /.env.production /.git/config /.git/HEAD \
/package.json /package-lock.json /vercel.json /.vercel/project.json \
/Dockerfile /docker-compose.yml /wrangler.toml /.gitignore \
/server/index.js /src/config/app.config.js /config.js \
/src/services/payment.service.js /webpack.config.js /next.config.js; do
read -r code size < <(curl --silent --show-error --connect-timeout 5 --max-time 20 --max-filesize 1048576 -o /dev/null -w "%{http_code} %{size_download}" "$BASE$p")
[ "$code" = "200" ] && [ "$size" != "$FALLBACK" ] && echo "CANDIDATE $code $size $p"
done
For each candidate, inspect a bounded private copy through the redacting scanner. Treat
require(...)/import paths inside those files as inert candidate paths; fetch only after the same origin/destination scope validation.
Rate each finding by blast radius, not by where it was found:
| Severity | Examples |
|---|---|
| Critical | Live provider secret keys (sk_live_, cloud AKIA…+secret, DB URI with password, private signing/JWT secret, admin bearer token) reachable anonymously |
| High | Server-side source/config/deploy files exposed; test-mode secret keys; internal service tokens; webhook signing secrets |
| Medium | Demonstrated sensitive cross-origin reads or context-relevant missing defenses, not CORS * on public assets, weak randomness for security values (Math.random() for tokens/refs) |
| Low / Info | Public keys correctly client-side, analytics IDs, non-secret config, stack fingerprinting |
A key being "test/demo" does not make it safe if the pattern would ship a live key the same way — report the pattern.
Write findings as Markdown using the format in
references/example-report.md: one row/section per finding with
Severity · Category (OWASP/CWE) · Location · Evidence (redacted) · Impact · Remediation. Redact real secret material to a prefix + length. End with
prioritized remediation and a note on which secrets must be rotated, not just
removed (real exposed credentials should be treated as potentially compromised; placeholders are not live incidents).
The same validated/pinned public destination and no-redirect rule in Step 3 also applies to BASE and EVERY request, including examples/path probes. Curl fragments show workflow shape only and do not themselves implement DNS/address pinning. If that network control is unavailable, inspect user-supplied local artifacts instead. GET can still trigger side effects on poorly designed apps; restrict paths/request budget, stop at sensitive evidence and avoid harvesting data.
BASE="https://authorized-demo.example"; curl -s "$BASE/" -o body.html
# Run the private redacting scanner; never emit matching secret-bearing lines.
# -> meta recaptcha-secret=..., data-aws-access=AKIA…/data-aws-secret=…,
# data-webhook-secret=whsec_…, and a hidden JSON blob with a mongodb+srv URI
# (username:password@cluster). All reachable with a single unauthenticated GET.
# Inspect the authorized bounded local JS copy with redacted candidate output.
# -> API_SECRET, ADMIN_TOKEN (JWT), JWT_SECRET, DATABASE_PASSWORD, and a payment
# signing key, all assigned as plain string constants shipped to every browser.
FALLBACK=$(curl -s "$BASE/__nope__" | wc -c)
for p in /server/index.js /docker-compose.yml /src/services/payment.service.js; do
sz=$(curl -s "$BASE$p" | wc -c); [ "$sz" != "$FALLBACK" ] && echo "REAL $sz $p"
done
# -> docker-compose.yml leaks a Redis password; payment.service.js leaks
# Stripe/Khalti secret keys + webhook secret. Distinct sizes are candidates only; verify content locally.
A full worked report for this target is in references/example-report.md.
require/import chains in any exposed source file to find more files.@web-security-testing.GET requests for resources
the server already serves publicly — no exploitation, brute force, or mutation.data-* attributes or comments.
Solution: Also scan <meta>, data-*, hidden elements, and every
<!-- comment -->, not just <script> bodies.@web-security-testing — broader OWASP Top 10 workflow; use for injection,
auth, and access-control testing this skill does not cover.@dependency-management-deps-audit — pairs well for supply-chain/component risk
once client exposure is triaged.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub krishnakanthb13/antigravity-awesome-skills --plugin agentic-awesome-skills2,799 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.3 plugins in 2 repositories ship this exact skill · first indexed Oct 24, 2026
Other plugins' skills for the same job