Extends ingest_scan_output with three formats:
- nuclei-jsonl: one tool_output fact per result and an asset for the
scanned target when it is valid; no automatic finding
- httpx-jsonl: one HTTP service asset and one fact per URL
- ffuf-json: one URL asset and one fact per result, read token by token
with encoding/json; a file cut short keeps the complete results
JSONL lines go through readJSONLines, taken from the bbot ingester
(64 KiB per line; longer lines and invalid JSON are skipped and
counted). bbot now uses the same reader, with no behaviour change.
One file yields at most 50000 assets and facts; records past the cap
are counted in over_cap and the result is marked truncated.
A worker can write nmap output with -oX and call ingest_scan_output with
the format and path. The file is parsed deterministically: assets go
through the insert_assets handler, each host becomes one tool_output
fact listing its open ports, and the model gets only counters and at
most 20 notable items per type.
- path is resolved under the run working directory; "..", an absolute
path outside it and a symlink leading outside are refused; 256 MiB cap
- the XML is streamed host by host with encoding/xml; a file cut short
keeps the complete hosts and returns truncated: true
- target text (banners, products, hostnames) is kept only as a
Go-quoted string in the fact detail
- re-ingesting a file upserts the same assets and skips identical facts
Worker-only, like ingest_bbot. nuclei, httpx and ffuf follow separately.