ARTEX/intercept
BaaRai 374c985d06 agent: add ingest_scan_output for nmap XML files
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.
2026-11-13 16:22:37 +01:00
..
alwaysallow_denylist.go Intercept: always allow a pending Bash prefix (argv allow rule, code-owned denylist) 2026-11-13 11:24:25 +01:00
alwaysallow_denylist_test.go Intercept: always allow a pending Bash prefix (argv allow rule, code-owned denylist) 2026-11-13 11:24:25 +01:00
argv.go Intercept: argv prefix rules (match_type=argv) 2026-11-13 10:14:39 +01:00
argv_test.go Intercept: argv prefix rules (match_type=argv) 2026-11-13 10:14:39 +01:00
closed_judge.go Intercept judge: review fixes for the closed-question mode 2026-11-13 08:40:02 +01:00
closed_judge_pg_test.go Intercept judge: closed-question mode, fail-closed to ask 2026-11-12 22:35:11 +01:00
closed_judge_test.go Intercept judge: review fixes for the closed-question mode 2026-11-13 08:40:02 +01:00
enrich_probe_test.go enrich: route the HTTP probe through the pinned dialer (F13) 2026-11-12 11:53:33 +01:00
export_test.go enrich: route the HTTP probe through the pinned dialer (F13) 2026-11-12 11:53:33 +01:00
intercept.go Intercept: always allow a pending Bash prefix (argv allow rule, code-owned denylist) 2026-11-13 11:24:25 +01:00
prompt.go Intercept judge: closed-question mode, fail-closed to ask 2026-11-12 22:35:11 +01:00
prompt_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
review_context.go Intercept judge: closed-question mode, fail-closed to ask 2026-11-12 22:35:11 +01:00
review_context_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
target.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
target_declared_test.go fix(intercept): match block rules on the declared targets before any lookup 2026-11-11 15:47:58 +01:00
target_dial.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_dial_pg_test.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_dial_test.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_exempt.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_exempt_test.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_extract.go agent: add ingest_scan_output for nmap XML files 2026-11-13 16:22:37 +01:00
target_gate.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_gate_pg_test.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
target_gate_test.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
target_redirect.go feat(intercept): check every redirect hop against the target gate (S3b 1.9) 2026-11-11 17:07:35 +01:00
target_redirect_pg_test.go feat(intercept): check every redirect hop against the target gate (S3b 1.9) 2026-11-11 17:07:35 +01:00
target_redirect_test.go feat(intercept): check every redirect hop against the target gate (S3b 1.9) 2026-11-11 17:07:35 +01:00
target_rendered.go fix(intercept): match block rules on the declared targets before any lookup 2026-11-11 15:47:58 +01:00
target_rendered_test.go feat(intercept): gate the rendered targets of custom tools (S3b 1.8) 2026-11-11 15:04:42 +01:00
target_request.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_request_test.go feat(intercept): target-gate schema, opt-in flag and approval requests (S3b 1.2-1.4) 2026-11-10 23:05:47 +01:00
target_resolve.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_test.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
testmain_test.go feat(intercept): target-gate schema, opt-in flag and approval requests (S3b 1.2-1.4) 2026-11-10 23:05:47 +01:00
trace.go Intercept judge: closed-question mode, fail-closed to ask 2026-11-12 22:35:11 +01:00
trace_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00