dom-xss-hunt
Extract DOM sinks and event handlers via mock_extract and probe hot chains for reachability with mock_run. Run after chain-triage. Filters chains/hot.jsonl down to chains/dom_reachable.jsonl — the cha
SKILL.md.claude/skills/dom-xss-hunt/SKILL.md
GitHubdom-xss-hunt
Purpose
Eliminate dead chains before spending Opus tokens. A chain that looks plausible statically but never executes in a real page won't be a bug, no matter how much Opus thinks about it. Headless mock execution is the cheapest way to know.
Inputs
targets/<name>/chains/hot.jsonltargets/<name>/sources/**
Steps
- Call
mock_extract(target_folder="targets/<name>/sources/")→ returns{routes: [...], dom_scaffold: {...}}. - Call
mock_run(target_folder, chain_ids=[ids from hot.jsonl])→ batch-confirm in a single Playwright pass. Each chain gets a synthetic taint payload injected at its declared source and observed at its declared sink. - Partition chains into:
- reachable → fired the sink with payload visible.
- unreachable → no sink event.
- errored → mock couldn't boot a route for this chain.
- Write
chains/dom_reachable.jsonlandchains/dom_unreachable.jsonl. - Update
status.json.phases.dom_hunt.
Outputs
targets/<name>/chains/dom_reachable.jsonltargets/<name>/chains/dom_unreachable.jsonl
Failure modes
- mock_extract returns empty routes → the analyzer didn't detect routes for this framework. File a fallback: route every chain to the literal page URL from the source map, if available.
- Mock can't render due to missing assets → some chunks weren't
exploded. Re-run
sourcemap-explodewith--include-nomap(the helper supports passing nomap chunks through unmodified).
Result block
"phases": { "dom_hunt": { "status": "done", "ts": "<iso>",
"reachable": N, "unreachable": M, "errored": K } }