Commit Graph
52 Commits
Author SHA1 Message Date
Coff0xc ff287467aa fix(config): encode the Compose database password instead of pasting it into the URL
docker-compose.yml built ARTEX_PG_DSN by interpolating POSTGRES_PASSWORD, so
/, ?, %, @, : and spaces made the URL invalid. The server now assembles that
URL from ARTEX_PG_HOST, ARTEX_PG_PORT, ARTEX_PG_USER, ARTEX_PG_PASSWORD,
ARTEX_PG_DBNAME and ARTEX_PG_SSLMODE. An explicit ARTEX_PG_DSN still wins.
ARTEX_PG_PASSWORD is scrubbed with the other startup secrets.
2026-11-21 17:25:20 +00:00
BaaRai 2a2deb30fd Merge pull request #319 from renaesop/codex/s3-archive-ui-docs
feat: show archive storage and document S3 operations
2026-11-21 16:03:54 +01:00
BaaRai 9a4116be71 fix(rsi): write retest cautions only for a finding with an outcome
The caution branch ran after the status switch, for every status. A pending
or in_progress finding with a completed fixed or inconclusive retest got a
caution lesson, while docs/rsi-lessons.md says pending and in-progress
findings produce nothing. The caution is now written in the confirmed /
resolved / fixed branch only.

A negative disposition (false_positive, duplicate, ignored, risk_accepted)
now also withdraws the cautions written from the finding's retests. The doc
says a reversed disposition withdraws the finding's evidence, including every
retest of the finding, and a caution from a retest is that evidence: it
tells the next task to recheck a finding the operator has since rejected.
Nothing in the code or the doc says a caution should outlive that. Confirming
again restores it, as for the positive lessons. Reopening (pending /
in_progress) still retracts nothing.
2026-11-21 08:50:38 +01:00
BaaRai aa4a1bfab9 fix(rsi): keep the status in a capped negative lesson action
The negative action is the label followed by "(prior <status>)", and the
whole string was cut at 320 runes. Past about 257 runes of summary the cut
removed the suffix, so false_positive and duplicate produced the same action
and the same dedupe key: a change inside the negative group reused the old
lesson instead of writing a new one and withdrawing the old.

The label is now cut to the room left by the prefix and the suffix, so the
status is always in the action and in the key. A summary short enough to fit
gives the same action as before, so existing keys do not change.
2026-11-21 08:50:38 +01:00
BaaRai 2be58efd50 fix(rsi): keep an unchanged negative lesson on a multi-company task
On a task with several companies the extractor does not write, and the
negative branch passed an empty keep key. Retraction then withdrew the
finding from every negative lesson, including the one that still matched
its status, and retired an adopted lesson whose disposition never changed.

The keep test now compares the lesson action, not the dedupe key. The
action names the status; the key also carries the company, which a task
with several companies cannot rebuild. A status change inside the negative
group still withdraws the previous lesson.
2026-11-21 08:50:38 +01:00
BaaRai d638b047dc fix(rsi): read only completed retests in lesson extraction
The lateral join took the newest retest of a finding whatever its status.
A pending, running, failed, or stopped retest can carry a verdict the agent
staged before the run ended, and that verdict became positive or caution
evidence. The join now reads the newest retest with status='completed' and a
non-empty verdict, so an unfinished retest neither writes evidence nor hides
an earlier completed one.
2026-11-21 08:50:37 +01:00
Coff0xc 30fce2621f fix(rsi): honor triage status in goals and lesson scope
The planner overview now carries finding status, and prove_goal refuses
false_positive, duplicate, and ignored findings. A lesson with no company
is visible only to tasks that also have no company. Retraction withdraws
evidence, runs on disposition change, and still runs after a task gains
a second company.
2026-11-21 08:50:26 +01:00
renaesop 801b1e1550 fix: complete archive translations and document startup credential handling 2026-11-21 02:57:34 +00:00
renaesop d8f8f6c1e7 Merge remote-tracking branch 'upstream/main' into codex/s3-archive-ui-docs 2026-11-21 02:56:17 +00:00
BaaRai db9e121f68 fix(traffic/hookvm): account string->[]byte, strSlice, append, and regexp.Compile in memory budget 2026-11-21 00:48:27 +01:00
BaaRai 680227b1ea docs: document constrained Go tampering hooks subset, API, and trace (P4.2 PR1) 2026-11-21 00:48:27 +01:00
BaaRai 3c2c6991ca docs: document opt-in SOCKS5 UDP ASSOCIATE and raw UDP recording (P4.1c) 2026-11-20 23:16:52 +01:00
BaaRai 2d5906295c docs(traffic): note that IP/CIDR rules apply on transparent TCP (no hostname) 2026-11-20 23:08:42 +01:00
BaaRai bd59d7d9d5 docs: document Linux transparent TCP inbound (P4.1b) and firewall rules/cleanup 2026-11-20 22:52:51 +01:00
BaaRai 792e965f26 fix(traffic): atomic temp+rename raw TCP blob spill and document SOCKS5 proxy caveats 2026-11-20 22:44:20 +01:00
BaaRai afa5d0e1a1 docs: document opt-in SOCKS5 raw TCP capture (P4.1a) and update CHANGELOG 2026-11-20 22:32:18 +01:00
BaaRai 944c131e90 docs(context-telemetry): align Phase C expected-gain bullet with minimal split 2026-11-20 20:41:48 +01:00
BaaRai 0dbb6de8d5 feat(agent): opt-in worker system cache-prefix split (P3.5 phase C) 2026-11-20 20:29:17 +01:00
BaaRai 3bbeb2c54e docs(context-telemetry): clarify aggregate vs turn-1 worker prefix share in fixture 2026-11-20 19:09:33 +01:00
BaaRai eecf8895aa docs(context-telemetry): correct built-in prompt volatility and Phase C worker/planner analysis 2026-11-20 19:03:18 +01:00
BaaRai dd5c371ead fix(llmrec): match norma joinSystem trim/drop-empty semantics and document retention 2026-11-20 18:43:03 +01:00
BaaRai 4841016892 feat(llmrec): opt-in LLM context size telemetry and aggregation (P3.5 phase A) 2026-11-20 18:15:23 +01:00
renaesop 811c2e48b8 Merge remote-tracking branch 'upstream/main' into codex/s3-archive-ui-docs 2026-11-20 14:21:05 +00:00
BaaRai 61d567a771 fix(traffic): HAR 1.2 compliance, round-trip IDs, aligned caps, params/cookies, userinfo redaction 2026-11-20 14:33:57 +01:00
BaaRai 74b9843761 feat(traffic): HAR 1.2 import and export (P3.4) 2026-11-20 14:19:22 +01:00
BaaRai 79c5daf076 feat(traffic): archive v2 rewrite provenance and traffic list filter (P3.3b2b2) 2026-11-20 08:03:04 +01:00
BaaRai 64b90a746a Merge pull request #292 from henefesto/docs/local-systemd-deployment-32ebb38
docs: add local systemd deployment guide and verified reboot results
2026-11-20 07:46:02 +01:00
BaaRai 221ad67549 feat(traffic): per-replay rewrite-rule toggle and RewriteStats API (P3.3b2b1) 2026-11-20 05:25:35 +01:00
BaaRai dbf5cc3186 docs: generalize systemd example unit and deployment guide (#292) 2026-11-20 03:26:50 +01:00
BaaRai 0a968d71ae docs: correct the proxy pin and argv descriptions
Pins are name-only behind a proxy (name-only since #370), and deny/ask rules now inspect compound commands (#377); the allow rule stays strict. Also state the untrusted-boundary default plainly.
2026-11-20 03:18:21 +01:00
Alexandrelab-200 db0aae3657 Refactor PostgreSQL test skipping logic
- Introduced uniform skipping functions in the db package: SkipPGUnavailable and SkipNoPG.
- Updated all relevant test files to utilize these new functions for better consistency and readability.
- Added new db/testpg.go file to house the skipping logic.
- Created architecture and operations documentation to provide a comprehensive overview of the ARTEX system.
- Added a verification script to streamline local testing and ensure code quality.
2026-11-19 14:23:29 -03:00
Chubboy Ren 091209798f fix: hide pending archive storage and document S3 safeguards 2026-11-19 03:33:51 +00:00
Chubboy Ren 1ecb676e34 feat: expose archive storage and document S3 lifecycle 2026-11-18 02:05:19 +00:00
BaaRai 7c3d50d533 docs: describe applying the rewrite rules in the proxy
The status line said the proxy does not apply rules yet. Replace it with
the request and response phases, what exchange_rewrites records and how
the hashes are formed (plain SHA-256, keyed HMAC for sensitive actions),
the SSE and WebSocket behaviour, the 5 MiB response pass-through, the
snapshot limits (live slots are never deleted by the TTL), and the fact
that replays go through the proxy and are rewritten like captures.
2026-11-17 22:23:12 +01:00
Coff0xc 0fb4ed145d fix(db): retract every retest when a finding is reversed
The negative path only dropped the latest retest. Operator-retired
lessons with evidence also came back on the next extract.
2026-11-17 19:13:31 +00:00
Coff0xc c0ce7a9494 fix(db): retract lesson evidence when a disposition reverses
Re-extract after flipping a finding to false_positive left the old
positive lesson in place.
2026-11-17 19:13:19 +00:00
Coff0xc a2b26f5416 fix(db): skip RSI lesson extract on multi-company tasks
NULL company_id leaked those lessons to every later task.
2026-11-17 18:08:49 +00:00
Coff0xc cc0082cfda fix(db): scope RSI lessons from task_scope and stop splitting UTF-8
Lessons were scoped on tasks.company_id, which create never writes.
Generic rows also sorted first on Postgres.
2026-11-17 18:03:10 +00:00
ParallelsandWarp 32ebb38e0f docs: document local systemd deployment and verified reboot persistence
Add the ARTEX systemd unit and document PostgreSQL setup, application deployment, operations, and successful automatic startup after reboot.

Co-Authored-By: Warp <agent@warp.dev>
2026-11-17 09:20:13 -04:00
Coff0xc 59cd4385ec fix(agent): frame RSI lessons in the data envelope
Lesson text was dumped straight into the system prompt. Same nonce
envelope as the other derived fields now.
2026-11-17 12:56:19 +00:00
BaaRai 278de8b2e0 Merge pull request #268 from liuxiaobo0920/fix/report-finding-quality
feat(report): surface finding proof strength in the report and the export
2026-11-17 02:09:01 +01:00
Xiaobo a0adc209ad feat(report): surface finding proof strength in the report and the export
The task report and the findings export asserted every finding with no
qualification: nothing said how far exploitation actually reached (PoE level),
whether the claim was machine-verified (verification status and note), whether
counterevidence was recorded, or whether any traffic was bound. The web UI
badges all of it (VERIFICATION_META, the detail page), so the report — the
artifact a client actually reads — was the last surface still asserting bare
claims.

Render it from one place:

- report/quality.go (new): two constructors and two pure renderers, no I/O, no
  DB handle, so the block is unit-tested without a database.
- Both surfaces call the same helpers, which is the point: the task report and
  the per-finding export cannot drift apart the way duplicated formatting does.
- Missing is explicit: a finding node with no standalone row prints
  "not assessed (no finding record)" instead of an invented zero — the honest
  gap the existing coverage work (#207) also insists on.
- Labels match the shipped UI wording (Verification, Confidence rationale,
  Counterevidence) and states are humanised ("Not assessed", "False positive"),
  with an unrecognised value printed verbatim so a new state cannot silently
  vanish from a report.
- Bound-traffic count appears once per document: as a Proof bullet in the task
  report (it has no traffic section), and in the export only when nothing is
  bound — otherwise the traffic section already states it.
- The detailed report is capped at 8 KiB in the task report only, rune-safe, with
  the cap derived into the truncation message; the export is the canonical
  per-finding document and is never silently shortened.
- The export keeps its document structure: the single-finding document gets
  "## Detailed Report" (a section like its siblings), the multi-finding summary
  gets a bold label.

Read paths only: no change to the write side of poe_level or verification_status,
no schema change (all five columns already exist), no API/DTO change (the widened
FindingMeta stays internal to the report path, and the findings list keeps
selecting only what it renders). One extra task-scoped query on GET /api/report,
because findings bodies stay off the list path.

docs/vulnerability-traffic-evidence.md §Export describes the new Markdown.
2026-11-17 08:40:37 +08:00
BaaRai 8474131ba2 fix(server): match a kept sensitive value on type, header name and regex
A sensitive action sent without its value took the stored value at the same
position, so two sensitive actions of the same type and header name swapped
their values when reordered. The stored action is now found by type,
canonical header name and regex, wherever it stands, and exactly one must
match: none or several is refused (400, send the value).

The CRUD test no longer expects a refusal for a reordered action.
2026-11-17 00:12:09 +01:00
BaaRai 97f081ed63 fix(server): refuse a host change while a stored sensitive value is kept
An update that keeps the stored value of a sensitive action can no longer
change the rule's host matcher (compared case-insensitively): the value
would otherwise be written to a new destination. Same invariant as the
custom HTTP tools. The url_regex matcher is not compared, an accepted and
documented limit.
2026-11-17 00:12:09 +01:00
BaaRai 38d66d83b2 docs: describe the capture-proxy rewrite rules
Rule model, validation, limits, sensitive actions, API and storage, with the
statement that the proxy does not apply the rules yet. The README lists the
rules among the secrets encrypted at rest.

docs/ is ignored by .gitignore; the new file is force-added like the three
documents already tracked there.
2026-11-17 00:12:09 +01:00
BaaRai 27d2241cda docs: cover the platform's continuous red-teaming offering 2026-10-22 14:49:52 +02:00
BaaRai 70f9ea3f01 docs: add AI PR review REA analysis and ARTEX integration plan 2026-10-22 14:42:56 +02:00
BaaRai a8f3c2c328 feat(rsi): evidence-gated lesson library in shadow mode
Extracts candidate lessons from terminal tasks (confirmed, negative,
retest caution), gates them on cue + action + evidence, and makes
extraction idempotent through a per-source evidence key.

ARTEX_RSI_LESSONS selects off / shadow / inject. Shadow logs what would
have been shown; inject appends a code-owned, data-not-instructions block
after the planner and worker system prompts. No prompt mutation and no
adoption: status stays candidate.

Credit: the Library admission rule comes from harness2 (Google Research,
Apache-2.0, arXiv 2610.14224); the gain taxonomy from awesome-rsi
(lobehub).
2026-10-21 14:25:35 +02:00
BaaRai e233c02314 Translate all Chinese text to English
Comments, doc comments, UI labels, log and error messages, LLM prompt
strings, markdown docs, test data and assertions. Identifiers, enum
keys, routes, placeholders and code structure are unchanged.

Notes:
- docs/漏洞流量证据.md renamed to docs/vulnerability-traffic-evidence.md
- tests that exercised CJK specific handling (GBK zip names, Chinese
  full text search) now use ASCII equivalents; go build passes and the
  test suite matches the pre translation baseline (remaining failures
  need a PostgreSQL DSN and fail identically on the original)
- frontend mention syntax now uses English kinds (finding, asset, ...)
  matching the backend, chat mentions tests pass
2026-10-08 23:14:34 +02:00
ji ruo 8fbba31eed feat: 由报告 Agent 自动关联流量证据 2026-09-10 14:26:15 +08:00