Skip to content

[CTX-1842] docs(security): record the P0-AC-022 live scope evidence (bitty#2921) - #511

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0217b/ac022-evidence
Nov 15, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0217b/ac022-evidence

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

What this records

A dated evidence record for P0-AC-022 (per-action IPC scopes) at bitty
a8abf31c, plus the scope-by-method matrix as a standalone artifact. The code
change that makes it replayable is bitty-terminal/bitty#3182.

The 2026-11-13 record left this residual cell, and 2026-11-15 carried it
forward:

Full scope-by-method matrix as one artifact; terminal-instance `bitty ctl`
cells; live `session.resize`, `session.control.transfer`,
`session.grant.revoke`, and `lease.heartbeat`; independent review

New files

  • docs/security/audits/bittyd-ac022-scopes-2026-11-16.md — the record.
    It lists the six cells as enumerated before anything ran, then source
    identity (a8abf31c, bittyd 0.0.42, service API 1.5, binary digests,
    toolchain, host class, 0700 throwaway roots, own PIDs only), the client
    disclosure (three corpus vectors, one matrix target, one live ctl target,
    all committed), the matrix result, the terminal-instance elevation transcript
    with exit codes, the per-cell live table, a disposition table, and the
    residuals it does not claim.
  • docs/security/audits/ac022-scope-matrix-2026-11-16.md — the artifact:
    765 cells, 51 allowed, 714 Denied/ScopeDenied, one allowed cell per method,
    with the invariants the generating test asserts and the three boundaries the
    artifact does not cross (transport registry vs daemon catalog, component tier
    vs served exchange, one live grant shape).

What was observed

Cell Result
15 × 51 matrix 765 cells: 51 allowed, 714 Denied/ScopeDenied; no scope substitutes for another
bitty ctl under the default grant terminal spawn, terminal close, workspace close → exit 7, Denied/ScopeDenied, scope terminal.manage; config reload → exit 7, scope config.modify; refused spawn leaves the terminal count at one
BITTY_CTL_ELEVATE=config.modify reload exit 0, spawn still exit 7
BITTY_CTL_ELEVATE=terminal.manage spawn exit 0 (t:2 created), reload still exit 7
session.resize C-17 step 7 Denied/ControllerRequired (observer), step 8 ok (controller); C-27 steps 9/10 — authority follows the transferred lease
session.control.transfer C-27 step 7 Denied/ControllerRequired (observer), step 8 ok; C-11 step 10 Denied/InvalidControlToken; V-41 step 9 Validation/InvalidRequest
session.grant.revoke C-28 step 8 Denied/ControllerRequired (observer), step 9 ok, step 11 revoked bearer Denied/ObserverGrantRequired, step 12 not_active; V-38 step 14 uniform not_active
lease.heartbeat C-26 steps 7/8 NotFound/NotFound (foreign and unknown attach id, one answer), steps 9/10 ok (owner)

The real-driver conformance row is 68 pass, 0 fail, 18 typed skips of 86 at
this revision.

What this does not claim

The criterion stays Partially verified. P0-AC-022's verification method
names an independent security review, and that is still absent; a record is
evidence for review, not the verdict. Also unrun and labelled as such in the
record's Residuals section:

  • the arbitrary single-scope live grant on bittyd (C-09 deferred,
    bitty#2917) — every same-uid connection negotiates one fixed grant set, so
    "granted only terminal.inspect" is not reachable live;
  • the MCP/Agent adapter audit;
  • a live ctl window new — the headless --test-mode loop has no app thread
    for the new-window lane, so it answers Unavailable (exit 6), which this
    record marks not observed rather than passing;
  • live terminal send / terminal text over the socket;
  • second-uid and Windows cells.

No R-* or DR-* state moves. DR-01, DR-03, and the R-011 rationale are
updated only to say which cells are now observed and what still remains.

Gates

Gate Result
bunx --bun [email protected] --check . --ignore-unknown pass
bunx --bun [email protected] 126 files, 0 issues
check-docs.mjs links pass
check-docs.mjs metadata pass
check-docs.mjs language pass
check-docs.mjs agents pass
check-docs.mjs hygiene pass

just check itself cannot complete here (bun/bunx is unreliable in this
environment), so the gates above were run individually: prettier and
markdownlint through bunx with the pinned versions echoed above, and the
check-docs.mjs subcommands through a node shim because the script uses the
Bun-only import.meta.dir.

Refs bitty#2921. Companion code PR: bitty-terminal/bitty#3182.

… evidence (bitty#2921)

The 2026-11-13 and 2026-11-15 records carried four residual cells for
`P0-AC-022` (per-action IPC scopes). The code change at `bitty` `a8abf31c`
(bitty-terminal/bitty#3182) supplies three of them from the tree, so this
record captures what was actually run and leaves the criterion Partially
verified for the one reason that remains: the independent review.

New:

- `docs/security/audits/bittyd-ac022-scopes-2026-11-16.md` — the dated
  single-criterion record: the pre-run cell enumeration, source identity
  (`a8abf31c`, `bittyd 0.0.42` service API 1.5, binary digests), the client
  disclosure (three corpus vectors, one matrix target, one live `ctl` target),
  the matrix result, the terminal-instance elevation transcript with exit codes,
  the per-cell live table for `session.resize`, `session.control.transfer`,
  `session.grant.revoke`, and `lease.heartbeat`, a disposition table, and the
  residuals it does not claim.
- `docs/security/audits/ac022-scope-matrix-2026-11-16.md` — the 15-scope by
  51-method artifact as one table: 765 cells, 51 allowed, 714
  `Denied/ScopeDenied`, plus the invariants the generating test asserts and the
  boundaries the artifact does not cross.

Updated, exact observed results only:

- `docs/security/evidence-matrix.md`: a fifth campaign entry; a per-criterion
  table for the new record; the `DR-01`/`DR-03` remaining-gap text, since the
  transfer, grant-revoke, and heartbeat cells are now observed live and only
  `C-10` and the review remain; the `R-011` rationale, which no longer cites
  unrun cells; and a residual bullet that names what is still open.
- `docs/security/p0-acceptance-criteria.md`: the campaign-status preamble count
  and the `P0-AC-022` row's evidence and residual columns. The status stays
  Partially verified.
- `docs/security/README.md`: index rows for the record and the artifact.

Every still-unrun cell is labelled as such in the record's `Residuals` section:
the arbitrary single-scope live grant (`C-09` `deferred`, bitty#2917), the
MCP/Agent adapter audit, a live `ctl window new`, live `terminal send` and
`terminal text`, second-uid and Windows cells, and the independent review.

Gates: `bunx --bun [email protected] --check . --ignore-unknown`;
`bunx --bun [email protected]` (126 files, 0 issues);
`check-docs.mjs links|metadata|language|agents|hygiene` (126 files each, under a
node shim because `import.meta.dir` is Bun-only here).
@Xuepoo Xuepoo added docs Documentation P1 Priority: high area:security Security area labels Nov 15, 2026
@Xuepoo
Xuepoo merged commit 59600fb into main Nov 15, 2026
4 checks passed
@Xuepoo
Xuepoo deleted the ctx-0217b/ac022-evidence branch November 15, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:security Security area docs Documentation P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant