Files
Beenu Arora 351626d994 feat: agentic vulnerability intelligence that configures no sources (#2086)
Vulnerability and exploit intelligence that collects itself: no source
list, no feed registration, no API key. The seed is data the platform
already holds — every CVE record carries references naming the vendor
advisory, the patch note and often the proof-of-concept repository — and
the crawler follows them outward, expanding through links and
publisher-advertised feeds.

## The loop is a loop

Both LangGraph pipelines in this tree are fixed linear DAGs. Neither has
an edge that goes backwards: `_should_continue` exists in
`graph/workflow.py` and is wired into nothing, and two `max_iterations`
fields are read by no code. The one real plan-act-observe construct
re-plans only inside a single model conversation, so what it learned is
gone when it returns.

This adds the missing edge, plus a durable task store so work the
controller decided to do later survives the process. **Termination is a
stated criterion, not exhaustion** — frontier empty,
iteration/fetch/time/host budget spent, progress stalled, or an operator
cancellation kept distinct from a limit the loop set itself. A runaway
control whose actor always finds more proves the bound is what ends it.

## Extraction never uses a model, and a gate enforces it

The documents read here are written by the people being read about. This
product publishes its injection guard's measured efficacy: **7.1% on
held-out payloads** against 98.1% on its tuned corpus, and scraped
content is held-out data by construction. So the defence is not
detection — a fetched page is data all the way through. Code parses; a
model only ever sees fields code produced; the planner is deterministic,
because if a model chose the next URL then a page could choose it.

`scripts/check_crawl_extraction_is_deterministic.py` walks the crawl
package with an AST and fails the build if any module imports or calls
into an LLM, or if anything under `extract/` imports a network client —
a parser that can fetch can be told where to go by the document it is
parsing. It self-tests, and refuses a tree with no crawl package rather
than passing vacuously.

## Open reachability, intact perimeter

There is deliberately **no source allow-list**: any public host is
reachable, which is the point. What stays is the perimeter, which is a
different thing — the SSRF guard runs on every request **and every
redirect hop**, refusing loopback, RFC1918, link-local and
cloud-metadata addresses. Redirects are followed rather than refused
(HTTP-to-HTTPS and canonical redirects are ordinary, and refusing them
loses advisories) but each hop is re-guarded. The size cap counts bytes
actually read, because `Content-Length` is a claim by the server being
fetched. `robots.txt` and a per-host interval are honoured so the
deployment's egress address does not get blocked. Air-gapped mode
refuses at request time, there being no registration step to hook.

XML feeds refuse any document declaring a DOCTYPE or ENTITY **before
parsing**, removing the billion-laughs family outright rather than
mitigating it — with real billion-laughs, external-entity and
external-DTD payloads in the suite.

## Three columns that never had a writer

`asset_vulnerabilities.epss_score` has existed since migration 013 and
nothing has ever populated it. The entire weaponisation model is one
boolean only CISA KEV sets, which every finding-producing connector
hardcodes false. Reference lists are published by every vulnerability
format and the one client extracting them had no reader. All three now
have exactly one writer.

Intelligence reaches a tenant's own findings **only where that tenant
already has a finding for that CVE** — knowing a CVE is exploited is not
evidence of exposure to it, and writing an exposure row from
intelligence alone would manufacture one. `is_exploited` flips on
in-the-wild or ransomware evidence and never on a public proof of
concept, because that column feeds the alert-priority multiplier.

## Measured live, 2026-11-28

One run against the real internet, labelled as an observation rather
than a benchmark:

- NVD record for CVE-2021-44228: HTTP 200, 87,139 bytes, parsed to CVSS
10.0 / critical, 4 CWEs, **103 references**, 40 exploit-tagged signals.
- A frontier of 103 readable candidates across **21 distinct hosts**,
none configured by anyone.
- Six fetched and parsed; EPSS daily file at 2,872,544 bytes; 7.74 s
including politeness delays.
- Perimeter probes: cloud metadata, loopback, RFC1918 and
`metadata.google.internal` each refused in **0 ms**, before any socket;
public control fetched in 317 ms.

**Not measured, and said so:** model cost per CVE (extraction places no
model calls at all, and correlation spend depends on the deployment's
provider) and sustained throughput (the run is short).

## Verification

136 crawl tests, 12 live PostgreSQL tests against the shipped migration,
19 correlation and wiring tests, 10 endpoint tests, 167 MCP tests, full
fusion suite 1,324 passed. Migration 182 applies on a real chain, is
idempotent, preserves data on re-run, and its tenant isolation was
proven under a `NOBYPASSRLS` role in both directions against a control
showing the hidden rows exist.

**Negative controls, recorded:** removing the redirect re-guard, the
pre-flight SSRF guard, the byte counter, robots, or the host interval
each fail their own tests; removing the XML entity guard, defaulting a
malformed EPSS row to zero, letting script content become prose, or
dropping the private-address filter each fail theirs; removing the
loop-back edge, the no-progress stop, or counting refused fetches as
free each fail theirs; removing `vulnintel` from fusion's source tuple
fails three wiring tests.

**Two controls did not bite, and both are reported rather than quietly
dropped.** Dropping the frontier prune left the suite green — the cycle
guard is `plan()`'s `already_seen` refusal, so the prune is a memory
bound and the comment now says that instead of claiming a safety
property it does not carry. And a promotion test proved vacuous: with no
rows in `asset_vulnerabilities` a broken CVE predicate still matched
nothing, so it was replaced with a case where the tenant has a finding
for one CVE and the intelligence is about another.

**Could not verify locally:** the full API suite. The shared `/tmp` venv
lost `greenlet` mid-session to the periodic tmp cleaner and `uv` cannot
repair it because the dist-info metadata was stripped too. Clean
`origin/main` under the same venv fails identically — 34 failed, 252
errors, every one tracing to that import — while this branch adds 10
passing tests and no new failures. CI is the authority for that suite.
2026-11-28 15:09:21 -08:00
..