Repository navigation
v0.1.3 — agent_snapshot, bug-bounty verbs (repeat/probe/race), JS-intel, settle
Two big threads land in this release. ZeroDOM grows from a read-only perception
layer into one that can also act and verify — the repeat / probe / race
verbs send crafted requests, the JS-intel pass sees logic that lives in bundles,
and header posture is judged alongside the node graph. And a new agent_snapshot
makes the interaction graph a drop-in page representation for browser agents.
All new behaviour is additive or behind a new flag; existing reads and the graph
schema are unchanged. The one removal (form-without-csrf) has a direct
replacement — see Removed.
Added
For browser agents
agent_snapshot— a full-page interaction read for action agents.
ZeroDOM.agent_snapshot(page)(Python) /ZeroDOM.agentSnapshot(page)(JS)
returns the compact[NN]-ref listing plus aref_map/refMapkeyed to those
same refs, so an agent can resolve[03]straight to a selector to click or fill.
Defaults toviewport_only=False— an agent can scroll, so it needs the whole
interactive surface, not just what is on screen (thefrom_pagedefault stays the
on-screen view). Mirrored in the TypeScript port.ref_map()/refMap()on the graph. Keyed by the exact[NN]token
to_compact_text()prints (whereselector_map()keeps the fullnode_NNid),
so a ref-addressed consumer no longer silently misses the key.
Read reliability
- Reads wait for async DOM churn to settle.
ZeroDOM.from_pagenow watches the
DOM via aMutationObserverand serializes only once it has been quiet for a beat
(200 ms), bounded by a hard 1200 ms cap — so a read no longer lands on a page still
injecting nodes, hydrating panels or filling in labels. Observes structural/text
changes only, not attributes, so a CSS-animated carousel or spinner still lets the
page settle. On by default;settle=False(Python) /settle: false(JS) restores
read-exactly-now. Mirrored in the TypeScript port. Perpetual animations and
hydration slower than the cap remain a bounded ceiling — read as-of-cap, never hung.
JavaScript intelligence (scan --js, crawl)
- External JS bundles are now read.
scan --jsandcrawlfetch the page's
same-origin<script src>files (jsintel stays network-free; the CLI supplies the
bytes), so apps whose logic lives in a bundle are no longer invisible. - Callable API surface with method + body shape.
extract_endpointsparses
fetch/axios/ wrapper call sites;crawlrecords ajs_endpointsfield
(e.g.POST /api/cart/coupon body=[code]) distinct from the load-timeapi_calls,
andscan --jsreports them. - DOM-XSS sink detection with source reachability.
scan --jsflags unescaped
interpolations intoinnerHTML/document.write/eval/ … and ranks a sink
high only when it traces to an attacker-controllable source
(hash / URL / postMessage / storage), else low.
Request sending & verification (bug bounty)
zerodom repeat— send a request (optionally N times, shared session) with a
chosen method/body;--savewrites HAR /.httpevidence.zerodom probe— replay an endpoint with a tampered body (--tamper) and diff
vs baseline to flag mass assignment / price / privilege tampering.zerodom race— fire a concurrent burst (one body, or a mix of operations via
repeated--body) to flag a check-then-act race (TOCTOU). Two engines: stdlib
last-byte-sync (http1, always available) and HTTP/2 multiplexing (http2, the
optionalzerodom[race]extra);--engine autopicks per availability and the
report names the engine actually used.--rpsonzerodom sweepto stay under a program's rate limit;racenow
distinguishes a 429 rate-limit from dedup in its no-finding note.
Response-header posture (scan)
- Header posture rules via a declarative
header_rules:section in
surfaces.yaml: CSP absent /unsafe-inline, CORS*, andSet-Cookiewithout
SameSite/HttpOnly. csrf-posturecorrelation — fires on a cookie-authenticated state-changing
POST (a JS endpoint or a server-rendered<form>) that has noSameSiteand no
anti-CSRF token.
MCP parity
zerodom_scan,zerodom_repeat,zerodom_race,zerodom_probeexpose the
above to agents, driving the active authenticated session (race runs as the
browser's own multiplexed fetch). Tool count: 35 → 39.
Removed
- The broad
form-without-csrfsurface rule. It fired on every search and
newsletter box, which was almost all noise. Replaced by the precisecsrf-posture
correlation above; the targetedpassword-field-outside-form-tokenrule is kept.
Migration: if you matched onrule == "form-without-csrf", switch to
rule == "csrf-posture"(fires only on genuinely state-changing, cookie-auth'd,
token-less surfaces).