M3 — Scanner quality, reconnaissance & asset intelligence
SCAN — Existing scanner evolution [P1]
- Preserve the existing DSL, crawler, signature engine, matcher and extractor implementations.The engines are kept and guarded by tests: matchers (status, word, regex, negative, DSL) and extractors (JSON, regex, header) against the scan lab, every built-in signature compiled and run against it, the crawler in scan runs (
test_scan_benchmark.py,test_signature_fields.py,test_scan_history.py). - Inventory supported template fields, matcher types, extractors, execution semantics and limits.
docs/reference/signatures/(requests, matchers, extractors, variables, attacks, examples, how a scan runs signatures) with a Supported fields table matching the lists the compiler enforces (app/core/signatures/fields.py). - Document exactly which signature syntax the engine supports; reject unsupported fields clearly.Every key outside the supported lists is refused when a signature is saved, with where it is and, for keys known from other engines, why; request-level
redirectsandmax-redirectsare honoured instead of ignored; every built-in signature passes, and one that used an ignoredmetadatablock now usesinfo(test_signature_fields.py). - Provide template schema validation, versioning, author metadata, tags and provenance.The compiler validates every template and refuses unsupported keys; signatures carry version, author, tags, references, source (built-in path or custom) and, now, a history of replaced templates with version, SHA-256, origin and actor, restorable into custom signatures (migration
c4f7a2b5d9e3,test_signature_revisions.py,test_signature_fields.py). - Implement real scan configuration, scheduling options, resource budgets, progress, cancellation and result persistence.Engines, crawl depth and pages, concurrency, timeouts, redirects, headers and history recording per scan; schedules repeating a scan on an interval; budgets as page, request (5,000 history entries) and timeout bounds; live progress, cancellation, and persisted summaries, observations and logs (
test_scan_schedules.py,test_scan_compare.py,test_scan_history.py). - Add signed or trusted template repository support with pinned versions and change review; never execute arbitrary imported code by default.HTTPS bundles of YAML signatures pinned by SHA-256 (optionally an expected digest given up front); every fetch is reviewed (added, changed, removed, invalid, id conflicts) and only that exact digest can be approved; changed signatures keep history, removed ones are turned off, managed ones are read-only; templates are compiled as YAML, never run (
app/core/signatures/repository.py,app/services/template_repositories.py,test_template_repositories.py). - Create deterministic test fixtures and lab benchmarks for detection coverage, false positives, false negatives, resource use and regression behavior.A deterministic lab in hardened and vulnerable modes: zero false positives across all built-in signatures, the known weaknesses found (XSS three ways, error-based SQL injection, SSRF), a request budget, run on every CI build; it found and led to fixing four false-positive signatures (
tests/scan_lab.py,test_scan_benchmark.py). - Add controlled authenticated and browser-aware crawling tests; verify SPA discovery and API metadata ingestion in owned labs.A local crawl lab (SPA shell whose routes and API calls live only in its script, an OpenAPI document with a GET and a POST operation, an account area behind a session cookie) checks that the crawler finds script paths and GET parameters, never follows templates, other hosts or non-GET operations, and reaches the account area only with the session it was given (
app/core/scanners/discovery.py,tests/crawl_lab.py,test_crawl_lab.py). - Distinguish observed evidence, suspected findings and validated findings; retain scanner limitations and confidence.Observations stay in history and the asset inventory, findings move from
suspectedthroughvalidated, each has a confidence, and a signature'sinfo.confidenceandinfo.limitationsreach the findings it produces (built-ins say what they cannot tell, shown in the Evidence tab) (test_signature_confidence.py,test_finding_normalization.py). - Provide incremental result comparison, safe rerun of a recorded assessment and exportable diagnostics.Scans keep every issue observed; Compare lists new, persisting and no-longer-observed issues against the previous scan of the target; Re-run queues the same scan with scope, engagement rules and the emergency stop checked again; Diagnostics downloads configuration, timings, summary, observations and log (
app/services/scan_compare.py,test_scan_compare.py). - Evaluate integrations with approved external scanners through adapter contracts; preserve source attribution and authorization boundaries.Read-only adapters for Nuclei JSON lines and ZAP JSON reports map results into the finding import (
app/core/findings/formats/scanners.py); each finding keeps its tool as source (import:nuclei,import:zap) and names the template, matcher or rule; results outside the vault scope are refused; Phantom never runs the tools (test_scanner_imports.py).
ASSET — Inventory & reconnaissance [P1/P2]
- Normalize domains, subdomains, IP addresses, services, URLs, APIs, repositories and technology observations as typed assets.Progress (backend,
c58c34e): 13 typed assets per vault (research_assets, migrationb7e5c3a9d2f8) with canonical keys: lower-case IDNA hosts, compressed IPv6,host:port/protocolservices,METHOD scheme://host:port/{id}endpoint templates, APIs, header-fingerprinted technologies, certificates, e-mail, repositories (docs/guides/assets.md,test_assets_keys.py,test_assets_fingerprints.py). Interface: the Assets page lists them by type with filters and counts (views/AssetsView.vue,docs/guides/assets.md). - Import owned inventory from CSV, JSON, DNS records, OpenAPI, GraphQL schemas and authorized scanner outputs.CSV / JSON inventories and OpenAPI 3 / Swagger 2 (
c58c34e), now GraphQL introspection (API, endpoint and operation names), DNS zone records (A, AAAA, CNAME, MX, NS withresolves_to) and nmap XML (addresses, names, open services with product and version; entities refused), all previewed before applying (app/core/assets/imports/records.py,test_assets_imports_records.py); findings from Nuclei and ZAP come through the finding import (test_scanner_imports.py). - Integrate permitted passive data providers with credential isolation, attribution and quotas.Certificate transparency (crt.sh) and SecurityTrails adapters; lookups only for in-scope domains, a daily quota per provider, keys encrypted with the configuration key and sent only to their provider, results discovered and attributed to the provider and lookup, user only (
app/core/assets/providers.py,app/services/assets/providers.py,test_asset_providers.py). - Record asset provenance, first/last observed timestamps, confidence and ownership verification status.Observations per source record with confidence, first / last seen, counts and aggregated confidence (
c58c34e); ownership as unverified, verified, disputed or not owned with method, note and time, recorded by the user only and kept in the asset history (migrationd2a6b8e4f1c9,test_asset_ownership.py). - Keep discovery separate from testing permission; support manual review of newly discovered assets.Progress (backend,
c58c34e): reviewdiscovered/accepted/ignored(user-only, bulk), scope state computed from the vault scope and recomputed on scope change; agents only propose (test_assets_api.py,test_mcp_assets.py). Interface: the Assets page opens on the discovered queue, with accept and ignore per row, per selection and in the inspector; scope is shown, never set there. - Track historical asset changes, DNS changes, service changes and approved technology observations.Bounded per-asset history (created, observed, reviewed, scoped, edited, removed, restored) with technology versions per host (
c58c34e); a known host resolving somewhere new and a service whose product or version changes are recorded aschangedwith the previous value (app/services/assets/edges.py,attributes.py,test_asset_changes.py). - Provide asset search, deduplication, tags, custom fields and scoped inventory exports.Progress (backend,
c58c34e): filters (type, review, scope, tag, source, search, seen since, findings, host) with keyset paging, dedup per (vault, type, key), tags / notes / bookmarks via annotations (kindasset), custom fields, JSON / CSV export under the export redaction policy (test_assets_export.py). Interface: search, bookmark, tags, note and custom fields in the inspector, and Export of the filtered inventory (assetExport.spec.ts). - Link assets to findings, HTTP evidence, scans, notes and bounty scope records.
affected_byfindings,belongs_totargets, flow and scan observations,[[asset:id]]note references and backlink counts (c58c34e,test_assets_isolation.py); asset details list the scope items of the vault's bug bounty program that name the host (URL, wildcard, CIDR; exclusions shown), read live from the latest snapshot (app/core/bounty/match.py,test_asset_program_scope.py).
GRAPH — Attack surface visualization [P2]
- Provide interactive relationship graphs with domain, host, service, endpoint and finding nodes.Progress (backend,
c58c34e): graph endpoint andasset_graph: focus walk (depth ≤ 3) or filtered view, finding and target nodes, level and group hints (test_assets_graph.py). Interface open. Interface: the Assets page Graph view draws them on a force layout with findings and targets optional (components/assets/PAssetGraph.vue,assetGraph.spec.ts). - Show typed edges, provenance, confidence, timestamps and relationship direction.Progress (backend,
c58c34e): edges carry relation, direction, origin, per-source counts, confidence, first / last seen and details. Interface: hovering a node lists its relations with direction, peer, confidence, the sources that saw them and when last, strongest first (edgesOf,assetGraph.spec.ts). - Add pan/zoom, layout selection, grouping, filtering and graph search.Pan, zoom and fit; Force, By domain (clustered by registrable domain) and Rings (by distance from a focused asset) layouts; the page filters plus findings and targets toggles; highlight search (
useForceGraph.ts,assetGraph.spec.ts). - Expand from existing authorized research data; never start active testing merely by expanding a node.Progress (backend,
c58c34e): graph reads stored relations only; a test asserts no outbound connection. Interface: Shift+click focuses the graph on an asset with depth 1 to 3, reading stored relations only. - Support saved graph views and exportable investigation snapshots.Named views per vault keep the graph state (filters, focus and depth, findings and targets, layout, highlight); Snapshot downloads the graph with its parameters and time as JSON, masked under the export redaction policy (
app/services/assets/graph_views.py,test_asset_graph_views.py). - Add large-graph virtualization or clustering and reproducible layout tests.The canvas draws only what the camera shows (nodes, relations and labels culled outside the view), the server bounds graphs (500 nodes, 2,000 edges,
truncated) withgroupscluster hints used by the By domain layout, and layout tests check that each mode settles the same graph identically, keeps groups apart, orders rings by level and settles 1,000 nodes in budget (utils/forceLayout.ts,forceLayout.spec.ts).
MONITOR — Continuous authorized monitoring [P2]
- Schedule passive inventory refreshes and separately authorized periodic assessments.The asset inventory syncs from recorded research every hour (
PHANTOM_ASSET_SYNC_MINUTES, passive, nothing sent;test_asset_schedule.py); periodic assessments are scan schedules authorised at every run (test_scan_schedules.py); watched bug bounty programs refresh their scope on a schedule (test_bounty_schedule.py). - Notify about meaningful changes, newly observed assets, scope changes and confirmed regressions.In-app notifications for new findings, regressions (resolved findings observed again, not reopened automatically), failed scans, watched program scope changes and assets found by the scheduled sync; bell on the rail with unread count, deep links into the right vault (
app/services/notifications.py,scan_notices.py,test_notifications.py). - Deduplicate recurring observations; support notification throttling and maintenance windows.Repeats of the same change within an hour fold into one notification with a count; findings are deduplicated per target, signature, title and URL; a pause and a daily maintenance window in the user's time zone hold notifications until they end (
app/core/notifications/quiet.py,test_notifications.py). - Revalidate authorization and program policy before each scheduled execution.Every scheduled scan run is created through the same path as a new scan, so scope, engagement rules and the emergency stop are checked when it runs; refusals are recorded and retried at the next interval; watched program refreshes skip refused accounts and widening scope changes wait for adoption (
test_scan_schedules.py,test_bounty_schedule.py). - Provide job history, change summaries and user-configurable retention.Scan history with logs and diagnostics, Compare as the change summary against the previous scan, and a retention policy (forever, or days after a scan ended, keeping the newest of each target; findings stay) applied on change and every six hours (
app/services/scan_retention.py,test_scan_retention.py,test_scan_compare.py).
Exit gate: Publish a repeatable benchmark in controlled test environments. Report results honestly rather than claiming quality based on checklist completion.