You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
guardrails 2.x: shell cd into the runtime and case-variant paths reach plugin-owned state (OC-N1, OC-N2) #349
Found by the independent acceptance in Cor-Incorporated/aidd-governance PR #210 (design/ops/measurements/h17-live-20261021/acceptance/README.md §2.3, repro opencode-346-348/attack/attack.test.ts.tmpl). Both bugs predate #346 / #348 (present on dev 111dbee071) and are unchanged by them.
The plugin-owned runtime .opencode/guardrails/state.json holds reviewed, factchecked, ci_green and consecutive_failures. A model that can write it can certify itself.
OC-N1 (P1): in-command cd and the no-slash runtime path
Setup: an ordinary session (server cwd == location == project). The shell call has no workdir.
On case-insensitive APFS (the macOS default) both name the real state file (measured: true). Cause: guardrail-context.ts:202owned() compares with a case-sensitive startsWith.
Fix direction
Match the runtime dir in shell text without requiring the trailing slash (the dir name as a whole path segment).
Follow in-command cd <path> with the same rule as workdir, even when workdir is absent or equals the session dir.
Compare runtime paths case-insensitively where the filesystem is case-insensitive.
Done when
adapter.test.ts rows for the inputs above go red on the pre-fix code and green after.
Closed: opencode #353 (OC-N4, three rounds; the read allowance for sed is now one positive shape, ADR-012) merged to dev on 2026-10-25 after the independent acceptance aidd-governance#221 (ACCEPT). The remaining guarantee moves to tamper detection of state.json: #354. Known over-blocks and bypasses of the text guard are tracked in #352 and #354, not here.
Activity
fix(guardrails): make the cd and bare-dir runtime checks additive only
terisuke commentedon Oct 25, 2026
Closed: opencode #353 (OC-N4, three rounds; the read allowance for sed is now one positive shape, ADR-012) merged to dev on 2026-10-25 after the independent acceptance aidd-governance#221 (ACCEPT). The remaining guarantee moves to tamper detection of state.json: #354. Known over-blocks and bypasses of the text guard are tracked in #352 and #354, not here.