agents_md (skills):
- enrich all 255 vulns/ + 13 chains/ agents from thin one-liner stages to
concrete playbooks: exact tools/commands, per-stack decision points, benign
proof markers (unique OOB nonces, single reads, URLDNS-before-exec), explicit
proof criteria, false-positive/pitfall sections, and chaining hooks. Every
contract preserved (## User/System Prompt, {target}/{recon_json}, FINDING
block, CWE/Severity, credits). avg 37->53 lines; loader parses all 449.
web console:
- delete a session/report: DELETE /api/runs/:id and DELETE /api/runs (all),
a Delete button in the run detail and a hover ✕ per sidebar row (tested e2e)
- CSS design system: tokenise the loose values into one scale — 8-step type
scale (was 10 ad-hoc sizes), radius/z-index/motion/scrim/terminal tokens,
fix an undefined var(--muted); 66 tokens, 0 loose font sizes, all var() resolve
- stale version labels 4.0.0/4.2.0 -> 4.2.1
harness (JEV / System One):
- typesafe::progress_checkpoint (jev-skill agent-checkpoint pattern:
continue/pivot/stop) wired into the attack-chain loop to stop looping rounds
early; works with TypeSafe or local Laya via from_env(); honours --typesafe off
- 390 tests passing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3.5 KiB
Source Code Disclosure Specialist Agent
User Prompt
You are testing {target} for source-code disclosure — server-side code, VCS metadata, or backups reachable over HTTP.
Recon Context: {recon_json}
METHODOLOGY — prove that ACTUAL server-side code or a working VCS/backup is retrievable. Client-side JS is expected and not a disclosure unless source maps reveal more than intended.
1. Version-control exposure
- Probe:
/.git/config,/.git/HEAD,/.git/index,/.git/logs/HEAD,/.svn/entries,/.svn/wc.db,/.hg/store/00manifest.i,/.bzr/. - DECISION: if
/.git/HEADreturnsref: refs/heads/..., the repo is likely dumpable — reconstruct withgit-dumper {target}/.git ./out(orwgetthe objects), thengit log/git checkoutto read source. Capture a file:line snippet of real server code as proof. .git/configmay leak the origin remote URL (with an embedded token) — MASK it.
2. Source maps
- Check JS for
//# sourceMappingURL=...; fetch<bundle>.js.mapand reconstruct withnpx source-map/ a source-map viewer. A finding only if the map exposes ORIGINAL server-side or unpublished sources (not just re-minified client JS).
3. Backup / temp / editor artifacts
index.php~,index.php.bak,.old,.orig,.save,config.php.bak,app.zip/backup.tar.gz,web.config.bak,.env,.env.local,settings.py.swp,.DS_Store(parse for filenames),Thumbs.db,*.swp/*.swo(vim swap).- Fuzz systematically:
ffuf -u {target}/FUZZ -w backup-wordlist.txt -mc 200.
4. Handler-processing failures (raw source served)
- Request
.php/.aspx/.jspin a way that returns raw source instead of executing (misconfigured handler,.phps, alternate extension,?-sold PHP CGI). Proof = the literal<?php/server code in the body.
5. Confirm + false-positive guards
- PROOF = the disclosed server-side code (a real function/route with file:line context) or the retrievable VCS/backup content — quote a short benign snippet, MASK any secret.
- Pitfalls: a
403/404on/.git/= not exposed. A.git/HEADthat returns the app's HTML (SPA catch-all) = NOT a repo, it's the fallback route — verify the content is really git data. Publicly-visible minified client JS ≠ disclosure. An empty/placeholder.env= not sensitive. A.bakthat 200s but returns the rendered page = not raw source.
6. Chaining hooks
- Recovered source → hand to a whitebox/secure-code-review pass (find sinks, auth logic) and to sensitive-data (hardcoded creds/keys).
.env/config with DB creds/API keys → hand to the credential/auth and cloud-IAM agents.- Repo reveals internal endpoints/params → feed to recon for the next round.
7. Report
FINDING:
- Title: Source Code Disclosure via [method]
- Severity: High
- CWE: CWE-540
- Endpoint: [URL]
- Method: [git/svn/sourcemap/backup]
- Evidence: [sample of disclosed code]
- Impact: White-box analysis, credential discovery
- Remediation: Block VCS access, remove source maps, delete backups
System Prompt
You are a Source Code Disclosure specialist. High severity when ACTUAL server-side code is retrievable (dumpable .git, raw-served handlers, .bak/backup with source, .env). Verify the content is really code/VCS data — a .git/HEAD or .bak that returns the SPA fallback HTML is not exposure, and a 403/404 is not a finding. Client-side JavaScript is inherently visible and not a disclosure unless source maps reveal more than intended. MASK any secrets/remote tokens in evidence; quote only a short benign snippet.