ParseDSL recursed on every '(' with no depth or size cap, so a
query of nested parentheses could grow the goroutine stack until
the process died. Cap input at 4 KiB and nesting at 32.
GET /api/conversations/{id}/messages passed limit through to the
database with no upper bound, so a huge query could load the whole
transcript. Clamp history pages to 200 and keep the since tail at 1000.
strconv.Atoi accepted a huge Retry-After, then time.Duration(n)*Second
wrapped so the delay looked smaller than MaxDelay and the governor
retried immediately. Parse as int64 and refuse anything above MaxDelay.
The allowlist rejected names PostgreSQL accepts, so an existing install
whose database name had a hyphen, a dot or non-ASCII characters refused
to start. pgx.Identifier escapes any name, which closes the injection
without refusing a name that already exists.
ensureDatabase quoted the DSN path into CREATE DATABASE with no
check. A quote in the name could close the identifier. The name is
now restricted to the unquoted-identifier alphabet before quoting.
playwright-core's exports map does not expose ./cli.js, so
require.resolve threw inside the command substitution, the outer node
got an empty script path, and the build still succeeded without
installing chromium v1247. Run the binary npm links for @playwright/mcp
instead. Verified with docker build: both v1247 and v1248 are in the
cache, and @playwright/mcp's playwright-core launches 155.0.8059.12.
The stock seed was npx @playwright/mcp, but the UI mock and common
invocations use npx -y, which the first pass left untouched. Also add
--browser chromium to a leftover playwright-mcp --headless row, resolve
the MCP's playwright-core CLI via require.resolve, and cover proxy-arg
stripping so capture sync does not depend on args[0].
npx @playwright/mcp queries the npm registry on every start even with
the package installed globally, so the image's pin did not decide what
ran and offline starts failed. Seed playwright-mcp --headless --browser
chromium, rewrite leftover stock npx rows once, and install the Chromium
build the MCP's own playwright-core expects.
Fixes#329
RecordExternal wrote method and header maps into req_head/resp_head
with no token or line-break check. Replay already refused those
values. An ingest JSON string with \r\n became extra evidence lines.
Apply the same validHeaderName and CR/LF/NUL checks before storage.
POST /api/auth/change-password checked the current password with bcrypt
and had no limiter. A stolen session could guess without backoff.
Reuse the login limiter, keyed by client IP and by the session token,
so rotating the source address with the same token still blocks.
A successful change clears both buckets.
Chat joined sessionID into <workDir>/sessions with no allow-list, so
".." or a separator would escape that directory. Production callers
use conv-<id>, but the exported method accepted any string.
Accept only [A-Za-z0-9_-] up to 64 bytes, then confirm the cleaned
path still sits under sessions/.
The Services tab wrote the stored asset URL into href with no scheme
check. A javascript: or data: value stored via insert_assets or the
asset API became a clickable link. Non-http(s) URLs now render as text.
FindingsCSV wrote name, class, summary, and task text as-is. A value
starting with =, +, -, @, tab, or CR is evaluated as a formula when
the file is opened in Excel or LibreOffice. Those cells are now
prefixed with a single quote.
image_path was opened as a raw filesystem path, so any readable
png/jpg/jpeg/webp/gif on the host could be copied into the operator
transcript. The path is now resolved from the task working directory
and refused when it contains .. or EvalSymlinks outside that tree.
insert_assets swallowed ListAssetInterceptRules and
TaskInterceptRulesSplit errors and evaluated an empty rule set, which
allowed every asset. A load failure now refuses the whole call. The
tool result is generic; the driver error stays in the process log.
offset+length > size wraps when length is near MaxInt64, so the cap is
skipped and make([]byte, length) can exhaust memory. Compare length
against size-offset instead.
marshalStringArray quoted double quotes but not backslashes. In a
Postgres array element a backslash escapes the following quote, so a
value such as x\",evil,\"y could close the current element and inject
another. Double backslashes first, matching marshalJSONBArray.
trimErr cut the error text at byte 300, which can split a multi-byte
character. The result is stored as llm_profile_health.last_error, and
PostgreSQL rejects the invalid UTF-8, so the breaker state of a profile
whose provider answers in Chinese is never persisted and the write is
retried every second.
json.Unmarshal of JSON null into a map yields nil. syncBrowserMCPProxy
then assigned NODE_EXTRA_CA_CERTS under traffic capture and panicked,
including during NewManager on every restart once that row was stored.
in_scope_not_asset counts in-scope events that are not asset types, not
gate rejects: a rejected candidate comes back as an insertion forbidden
error in the insert_assets result. EvaluateAssetGate also applies block
rules whether or not an allow-list exists, so the no-allow-list gap is
about the allow rule, not the whole gate.
A turn the provider's safety system declines (Anthropic stop_reason
"refusal", OpenAI-compatible finish_reason "content_filter") has no text
and no tool calls. Norma passes the stop reason through and the harness
ends any tool-less turn with ReasonCompleted, so the run summary said the
model "ended this turn normally", and steerHooks.Stop took the empty turn
for an idle one and resent the conversation up to the empty-response retry
count.
The LLM recorder is the one layer that sees the stop reason. It now hands
each completed call's stop reason to an optional context sink
(llmrec.WithStopSink). captureRunSession installs a per-run tracker
(agent.WithStopTracker) on that sink. With it:
- steerHooks.Stop does not inject the idle-turn rerun after a refusal;
- terminalText reports "provider refusal (stop_reason ...)" and says the
intent was not completed, instead of the completed wording.
Other terminal states and ordinary empty turns are unchanged.
Fixes#327
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
States the trust boundary discussed in #317:
- output.json's scope_distance is the integrated scanner's own verdict
and is ingested as-is; in-scope events are not re-checked against
ARTEX's rule set.
- The enforced boundary is the task allow-list: assets reach the graph
(insert_assets) only through EvaluateAssetGate, and rejects are
recorded as in_scope_not_asset.
- The no-allow-list case is an accepted gap, with operator guidance:
configure an allow-list per task or review output.json before feeding
it to ARTEX. Cross-checking ingested events against ARTEX's rule set
would redefine existing scanner configurations, so it is a deliberate
design question, not an accepted vulnerability.
Option 2 as picked on #317; documentation only.