source-analysis
Frontend source code analysis for hidden routes, API endpoints, and secrets
by VigilOSS★ 35 GitHub stars
Install source-analysis in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Source Code Analysis
When to Activate
- After recon identifies target's web pages and JS/CSS files
- SPA framework detected (React, Vue, Angular)
- Directory fuzzing sparse — source analysis reveals paths fuzzing misses
- GraphQL/REST API schema discovery needed
- Browser execution needed to materialize dynamic imports, service-worker routes, client-side redirects, or API calls only visible at runtime
Tools
vigil assess gau js-endpoints— supported endpoint extraction over saved JavaScript bodiesvigil assess gau secrets— supported body-fetch and secret-discovery pipelinetrufflehog— scan saved JS/source-map artifacts throughvigil assess kali exec … -- trufflehog …(host-side installs aren't required; the runtime image ships trufflehog)curl,grep/sed/awk,jq— manual extraction and verification
Division of Labor
| Task | Agent |
|---|---|
| Fetch pages, fingerprint, fuzz dirs | recon-specialist |
| Analyze HTML/JS/CSS for hidden content | source-analyzer |
| Fuzz discovered params | fuzzer |
| Test endpoints for vulns | vulnerability-analyst |
Methodology
Go beyond inventory. Convert routes, config fragments, and client logic into hypotheses about backend behavior, trust boundaries, auth assumptions, and reachable follow-on attack paths.
1. Identify Source Files
List <script src>, <link stylesheet href>, inline <script> blocks, source map refs.
2. HTML Analysis
Extract: href/src/action values, hidden fields, data-url/data-api attributes,
HTML comments, meta tags (canonical, CSRF, API base), inline config (window.__CONFIG__).
3. JavaScript Analysis
Write the grep pattern to a temp file to avoid shell-quoting issues, then run via vigil assess kali exec:
# Host-side: write the extraction script to a file inside the engagement dir
cat > "$ENGAGEMENT_DIR/scans/js_grep.sh" << 'SCRIPT'
#!/bin/sh
curl -sL "$1" | grep -oE '["\x27](/[a-zA-Z0-9_/\-\.]+)["\x27]' | sort -u
SCRIPT
chmod +x "$ENGAGEMENT_DIR/scans/js_grep.sh"
# Run via audit-wrapped exec
vigil assess kali exec --technique DISCOVERY \
--intent "manual JS endpoint grep for inline route strings" \
--probe-kind fingerprint --phase recon --timeout 60 -- bash -c \
'/engagements/$ENGAGEMENT_KEY/scans/js_grep.sh <js-url>'
Automated JS Endpoint Extraction
# Build/reuse the historical corpus and fetch bodies, then extract JS routes.
vigil assess gau secrets TARGET
vigil assess gau js-endpoints TARGET --fetch-if-missing
Use the supported wrapper verbs as the primary extraction pass: they pair body
capture, route extraction, URL resolution, secret scanning, and ingestion without
depending on optional runtime scripts. Fall back to manual grep for edge cases
they miss (inline scripts, dynamically loaded chunks, non-standard patterns).
When scanning saved artifacts for secrets, invoke trufflehog filesystem via
vigil assess kali exec --technique INFO-DISCLOSURE --intent "secret scan on saved JS/source-map artifacts" --probe-kind fingerprint --phase recon --timeout 600 -- trufflehog filesystem ...
against /engagements/$ENGAGEMENT_KEY/... paths so the runtime-owned install is used consistently
and the run lands in the audit pipeline.
For code-analysis engagements, remember that vigil assess code-ingest skips generated/minified
build output by default while writing a skipped-artifacts manifest under
tools/analysis-state/skipped-artifacts/. If a browser-visible minified bundle is security-relevant,
prefer the source equivalent or source map for deep review; if neither exists, ask the operator to
rerun code-ingest with a targeted --include-path / --include-minified include so the bundle is
explicitly queued rather than silently absent from backend code/files.
- API calls: fetch(), axios, XHR, $.ajax patterns
- SPA routes: React
path="/...", Vue{ path: }, Angular{ path: } - Secrets: api_key, token, secret, password assignments; AWS
AKIA[A-Z0-9]{16}; JWTeyJ... - Webpack: chunk manifest, chunk URLs,
window.__INITIAL_STATE__ - Infer more than strings: auth role checks, feature flags, internal-only branches, tenant IDs, object naming patterns, callback routes, proxy base paths, and debugging toggles.
When static extraction finds route constructors, dynamic import paths, service-worker
fetch handlers, or client-side redirects that cannot be resolved from source alone,
load agent/skills/browser-semantic-analysis/SKILL.md. Runtime observation should
capture the generated request URLs and the baseline-vs-browser delta instead of
guessing paths from minified code.
4. CSS Analysis
Extract url() refs, @import paths, source map refs.
5. API Schema Discovery
Probe: /swagger.json, /openapi.json, /api-docs, /graphql (introspection), /application.wadl
If an OpenAPI / Swagger spec is accessible, ingest it into the canonical backend assessment state — the backend derives the work-buffer row from the same POST, in o
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the source-analysis skill do?
Frontend source code analysis for hidden routes, API endpoints, and secrets
How do I install the source-analysis skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the source-analysis skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…