Repository navigation
Description
Revised 2026-11-27: audit remains independent of the selected Go/bubblewrap Linux backend.
Problem and desired outcome
When an operator receives an incident report containing a URL, hostname, IP, or path fragment, it should be easy to answer:
- Did ARTEX attempt this access during the reported time window?
- Was it blocked locally, forwarded, answered, or only mentioned in tool output?
- Which task, run, tool invocation, policy revision, and approval produced it?
- What is directly observed, and what remains unknown?
Existing captured traffic is valuable evidence, but an incident investigation also needs failed/denied attempts, trusted execution attribution, and an explicit account of capture gaps. Searching task text or database files cannot establish that a request was sent.
This is a feature proposal, not a report of a newly discovered vulnerability.
Baseline and related work
Reviewed upstream at 3cb0638, not just an older deployment:
- traffic/traffic.go already provides traffic storage, content search, and filters. Its current
PageQuerydoes not expose a time-window filter. - intercept/trace.go provides decision provenance to reuse.
- Preserve HTTP/SOCKS/raw traffic capture, rewrite history, HAR, and task archive features.
- Related: [Feature Request] Ideas for Improving ARTEX Reliability, Security, and Observability #310 (observability and evidence governance), Network-level target restrictions #421 (network restrictions), Rate limiting #422 (noise governor), Roadmap #440 (roadmap).
Companion runtime proposal: #554. Audit storage and search must also work for existing ARTEX-managed transports, without waiting for that backend.
Proposed audit contract
-
Record lightweight metadata independently of full-body capture. For managed executions, retain request/connection identifiers, event time and ingestion time, destination host/IP/port, protocol, method and safely displayed URL when visible, outcome, latency, byte counts when available, and coverage. Full bodies remain a separate configurable evidence feature.
-
Use explicit observation stages. Distinguish intent, policy decision, connection attempted/established, request forwarded, response headers observed, stream completed/failed, and imported evidence. Fields unavailable to a sensor remain null. A proxy-generated 403 is not an upstream 403; a tunnel is not a known URL; a response is not proof of business-side processing. Retries and redirect hops receive distinct attempt IDs.
-
Bind provenance outside agent-controlled input. The platform binds task/run/exploration/intent/tool-call identifiers and policy/approval versions to authenticated execution sessions. A request header or a model-supplied command ID is not trusted attribution. Shared MCP services and overlapping calls require real correlation or an explicit
ambiguous/unattributedresult. Separate the initiating user/session, executor, and approving actor; do not invent named-user attribution for a shared login. -
Separate local and remote evidence. A local observation of a request to in-scope A does not prove or disprove A's subsequent SSRF/RCE-triggered access to B. Show local network evidence, authorized callback/target-side evidence, and model inference as different evidence classes. Correlation is not proof of causation.
-
Make coverage queryable. Store intervals and source health: full HTTP visibility, metadata-only tunnel, unmanaged/remote execution, recorder failure, archive-only, and unknown. “No matching observed access” must not be displayed as “never accessed” when coverage is incomplete.
-
Retain incident evidence independently of task lifecycle. Use an append-oriented metadata store with bounded retention and controlled administrative deletion, separate from optional payload retention. A task archive/delete must not silently remove the audit trail; keep resolvable archive pointers/tombstones. Imported historical records preserve source timestamps and provenance. Tool text can produce investigation candidates, never fabricated access events.
Search and investigation workflow
A single operator search accepts a URL/domain/IP/path fragment plus a time range and timezone. Add exact host, exact URL, substring, method, status/outcome, task and execution filters. Display the match basis, coverage and a timeline; link each result to its policy decision, tool invocation, captured traffic and related redirect/retry events.
- Store raw and normalized URL representations separately; normalization for search must never rewrite the actual request or silently change scope semantics.
- Redact credentials, sensitive query values and selected headers by default. Offer separately authorized raw evidence access, with access/export auditing.
- Short keywords and broad substring queries need bounded, indexed behavior; use keyset pagination and explicit limits.
- Searching or opening a result must not fetch/replay the target URL.
- An optional correlation header/User-Agent can help business-side investigation, but is opt-in because request mutation can change test behavior. Locally minted IDs are sufficient for the core feature.
Remote-content provenance and injection evidence
PR 2 assigns source/attempt/artifact metadata outside target-controlled text and
links retrieved content, derived summaries where instrumented, proposed tool calls,
policy verdicts and actual observations without inventing causal certainty. Missing
instrumentation remains a gap. HTTP bodies/headers, MCP/tool output and downloaded
files stay external data even when obtained from an allowed target.
Expose bounded redacted excerpts as inert text; evidence views must not execute
scripts, fetch embedded links/images, replay requests or promote target text into
operator instructions. Original evidence, if retained, is separately protected.
Do not rely on stripping injection keywords or claim a suspicious string proves
an attack succeeded. PR 3 verifies the existing model/judge input boundaries and
reauthorizes actions; PR 4 supplies OS-level damage containment. Prompt-injection
tests are part of the first release, not deferred automated-deception scope.
Deception-resilience evidence (anti-honeypot)
The benefit is an explainable record of suspicious content, induced actions and containment outcomes, including when an operator suspects a honeypot or counter-exploitation attempt. A sandbox denial, unusual response or judge assessment alone must not label a target a confirmed honeypot.
- Link suspicious-content/artifact references to the resulting tool attempt, policy verdict, resource-budget event and operator disposition. Distinguish observed behavior, target claims, rule/model assessments and corroborated evidence; record assessor/rule version, rationale and unresolved contradictions.
- Keep assessment events separate from immutable network observations. A later assessment or false-positive correction must not rewrite an access event. Redact suspected credentials and honeytokens; do not automatically use or validate them against another service.
- Record budget thresholds, measured usage, the authority that stopped/paused the run, and any authorized resumption/policy revision. Track incomplete sensor coverage explicitly: not every OS-level denial supplies a destination or detailed violation event.
- PR 2 delivers the basic URL/time investigation view, evidence links and budget/decision event fields together. Reuse existing manual review; automated corroboration and suspicion-driven pause/resume workflows are follow-ups. Suspicion may justify review but does not authorize extra probing, bypassing logging or expanding scope.
Acceptance uses synthetic deceptive responses, inert artifacts and fake credentials: a false vulnerability claim remains unverified without corroboration; a blocked induced action links to its evidence; a budget stop and authorized resume survive archive/restart; benign unusual responses can be dismissed with an auditable reason. Report false positives and coverage limitations rather than claiming automatic honeypot detection. Network containment does not provide anonymity or prevent exfiltration of data a tool can read to an already allowed endpoint.
Durability, cost and failure behavior
Persist immutable events or idempotent stage updates keyed by event/attempt ID; use a bounded durable spool and backpressure rather than unbounded buffering. Emit health/gap events on recorder failure. In strict audited mode, stop new managed work when neither durable storage nor the bounded spool can accept required events. Never silently discard evidence while presenting complete coverage.
Proposed starting point: PostgreSQL metadata beside existing task data, with optional captured bodies kept in the existing traffic store. Benchmark before choosing a new storage service. Define retention and indexes from measured volume. As an illustration only, 1M events/day at 1KB each is approximately 1GB/day before indexes/replication; 50KB of bodies per request would add approximately 50GB/day. These are sizing examples, not ARTEX measurements.
Acceptance criteria
- Search one synthetic URL across two tasks and correctly attribute successful, denied, failed, retried and redirected attempts.
- Full-body capture off still leaves metadata for managed traffic; opaque HTTPS reports a connection with unknown path.
- Concurrent MCP calls cannot be falsely attributed; spoofed client metadata cannot select another task.
- Archive/restart, duplicate ingestion, disk-full/spool-full and retention behavior are exercised.
- Query results distinguish observed access, imported evidence, mentions and gaps; export obeys the same authorization/redaction rules.
- Publish p50/p95 query latency, ingestion throughput, storage/day and instrumentation overhead for a declared reproducible dataset.
PR-sized delivery
This targets upstream ARTEX across its binary, source and container distributions. Audit/search must not require an installed bwrap, Node/SRT or other optional runner, and portable changes preserve the existing Linux/macOS/Windows release builds. Integrate budget events with current upstream's task/intent ledger and task clock rather than duplicating accounting; gateway and OS resource limits are additional dimensions. Actual sandbox capabilities remain a separate backend acceptance decision.
The companion proposal now uses four PRs total, including existing design PR #555. PR 2 delivers metadata/provenance, existing producers, URL/time search API and a minimal operator UI as one usable audit feature. PR 3 adds gateway policy/network budgets and integration with existing indirect-action review; PR 4 adds the complete opt-in Go/bwrap Linux backend, resources, packaging and acceptance. Search works before sandbox integration using existing managed producers with honest coverage. Native Windows/macOS backends and advanced automated investigation workflows are explicit follow-ups, not hidden requirements of the audit PR. This issue owns the audit-event contract/storage, producer integration, operator search/timeline, retention/export, and coverage tests. Keep schema migrations additive and backward-compatible; rolling back a UI or producer must not delete previously collected evidence.
Design PR (PR 1; no runtime changes): #555
Open business-scenario gap: SSRF/RCE-induced access
The operator's requirement is to search a business-reported destination and time window and identify the ARTEX task and exact action that may have caused a remote SSRF/RCE request, without agent-mode workspace scanning. The current direct-network audit alone does not meet that requirement. Query keys/values are removed, request bodies are not retained, and literal tool-input search misses dynamically assembled full URLs.
A real worker ran one successful Bash invocation with full capture off: 100 curl + 100 urllib + 100 requests.Session loop requests, 10 same-path/query-only variations, and 5 mock application first hops. Independent receipts matched all 315 request events and 315 response events, with 315 request IDs, no missing/duplicate events in this run, and zero new write failures. The existing 10 full recordings did not increase. However, the application's five controlled second-hop requests all reached their destination and produced zero worker audit events. This is an HTTP batch/boundary fixture, not an RCE exploit or a remote-egress containment test.
Pending PR 2 acceptance: index command/artifact references and destinations actually submitted in supported query/body payloads before general redaction; retain credential-redacted target structure and exact trusted action/artifact links; distinguish references, submitted targets, network observations and independently correlated receipts; expose limitations for opaque/dynamic payloads. Search must correlate the reported destination to a task/action without live disk scanning. Payload mentions are not proof of second-hop execution, and a local sandbox cannot observe the remote server's network. Corroboration needs callback/OAST or target-side evidence.
Keep PR #596 Draft. Passing direct-request batch tests does not close this investigation gap. These additions remain pending within the existing four-PR plan; no raw query/body retention or new scope enforcement was enabled by this validation.
Detailed acceptance and evidence distinctions: https://github.com/BaaRai/ARTEX/blob/59118b72af764a3492f4dceb21812fcdb14b5182/docs/access-audit.md#business-investigation-requirement-induced-remote-access
Activity
renaesop commentedon Nov 27, 2026
The first implementation slice is now Draft PR #596 (delivery 2 of the four-PR plan including #555).
It provides independent redacted metadata, trusted execution-context attribution, URL/hostname/task/source/time queries and an inert Traffic → Access audit view. Attempts, HTTP observations and external reports are distinct. Coverage stays explicitly partial: direct shell/MCP traffic, opaque/raw traffic and remote SSRF/RCE second hops are not yet covered; no match is not proof of no access.
Before commit/push, the candidate passed the six affected Go package suites on the requested isolated Linux verification host (2,175 passing test/subtest events), focused race checks (29 passing), a supplemental isolated-namespace iptables test, frontend checks/build, all five existing release builds, and actual Linux startup/API-authentication checks. Existing conditional test skips and non-Linux runtime limits are described in the PR. No production service was replaced.
PR #596 remains Draft until the requester completes real-scenario manual testing and explicitly approves readiness. The manual acceptance checklist and retention/rollback contract are in docs/access-audit.md. Gateway/action authorization and the complete Go/bubblewrap backend remain the next two implementation PRs.