Skip to content

damage-control: class-C narrow mitigations (rows 20/22/24-27) - #1148

Merged
dotdevdotdev merged 4 commits into
mainfrom
dc-classc
Oct 19, 2026
Merged

dotdevdotdev merged 4 commits into
mainfrom
dc-classc

Conversation

@dotdevdotdev

@dotdevdotdev dotdevdotdev commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Class-C residuals: fail closed on the unknowable shape; document the rest honestly.

  • (a) row 25: inline interpreter -c/-e (or heredoc fed to one) whose write/exec sink takes a non-literal path expression that itself names .agentwire/.claude/damagecontrol/settings.json -> ask (unverifiable). Control words elsewhere (comments, printed/written data, argv), reads, literal paths and .claude/projects/*/memory, .agentwire/wiki|artifacts do not fire. Audit replay (6853 distinct commands): 1 new ask (a scratch-dir script writing S+"/ks/damagecontrol.yml"). An earlier, looser version produced 5.
  • (b) new: relative alias word after cd <dir> &&. In-command ln and existing-alias realpath predate this PR (pinned, guard nothing new).
  • (c) row 20: pre-existing (block, or ask via control-plane-target); pinned, docs corrected.
  • (d) row 22: SIGALRM scan deadline for edit/write/read/mcp hooks + a watchdog thread on all hooks.
  • (e) rows 24/27: agentwire doctor "Residuals you own" (unscored) + wiki table.

Declared residual: a control word split across a variable assigned elsewhere in the program.

Built by dotdev.dev

dotdevdotdev added a commit that referenced this pull request Oct 19, 2026
…ath expression (#1148 review)

Program text only from -c/-e or an interpreter heredoc; the control word must
sit in the sink's path expression; memory/wiki/artifacts exempt; reads never
fire; receiver/getattr/non-literal-mode/heredoc-program sinks now covered.
Audit replay: 6853 commands, 1 new ask. Docs/test claims corrected.

Built by dotdev.dev
dotdevdotdev added a commit that referenced this pull request Oct 19, 2026
…ring data (#1148 review 2)

The agent-owned exemption no longer applies to an expression that can climb
out of it. Adds File.open/new, io/codecs/os.open, createWriteStream, openSync,
fopen, php -r, archive extraction sinks. Calls quoted as data are not calls.
Docs: replay count and residuals corrected.

Built by dotdev.dev
dotdevdotdev added a commit that referenced this pull request Oct 19, 2026
…ath expression (#1148 review)

Program text only from -c/-e or an interpreter heredoc; the control word must
sit in the sink's path expression; memory/wiki/artifacts exempt; reads never
fire; receiver/getattr/non-literal-mode/heredoc-program sinks now covered.
Audit replay: 6853 commands, 1 new ask. Docs/test claims corrected.

Built by dotdev.dev
dotdevdotdev added a commit that referenced this pull request Oct 19, 2026
…ring data (#1148 review 2)

The agent-owned exemption no longer applies to an expression that can climb
out of it. Adds File.open/new, io/codecs/os.open, createWriteStream, openSync,
fopen, php -r, archive extraction sinks. Calls quoted as data are not calls.
Docs: replay count and residuals corrected.

Built by dotdev.dev
dotdevdotdev added a commit that referenced this pull request Oct 19, 2026
…review 3)

Exempt only ONE static path literal (optionally in expanduser/Path) that lies
inside the agent-owned dir on a whole segment; any non-literal piece, or a
chdir in a program naming the control plane, means no exemption. Replaces the
'..' spelling denylist.

Built by dotdev.dev
- inline interpreter writing to a run-time-computed path while naming the
  control plane asks (unverifiable)
- existing aliases reached through a literal `cd <dir> &&` are resolved
- non-bash hooks get the SIGALRM scan deadline; every hook gets a watchdog
  thread that blocks before the harness timeout
- `agentwire doctor` "Residuals you own" (informational) + wiki table of
  closed / fail-closed / user-owned
- rows 20 (brace cap) and in-command `ln` verified already closed; pinned

Built by dotdev.dev
…ath expression (#1148 review)

Program text only from -c/-e or an interpreter heredoc; the control word must
sit in the sink's path expression; memory/wiki/artifacts exempt; reads never
fire; receiver/getattr/non-literal-mode/heredoc-program sinks now covered.
Audit replay: 6853 commands, 1 new ask. Docs/test claims corrected.

Built by dotdev.dev
…ring data (#1148 review 2)

The agent-owned exemption no longer applies to an expression that can climb
out of it. Adds File.open/new, io/codecs/os.open, createWriteStream, openSync,
fopen, php -r, archive extraction sinks. Calls quoted as data are not calls.
Docs: replay count and residuals corrected.

Built by dotdev.dev
…review 3)

Exempt only ONE static path literal (optionally in expanduser/Path) that lies
inside the agent-owned dir on a whole segment; any non-literal piece, or a
chdir in a program naming the control plane, means no exemption. Replaces the
'..' spelling denylist.

Built by dotdev.dev
@dotdevdotdev
dotdevdotdev marked this pull request as ready for review October 19, 2026 13:25
@dotdevdotdev
dotdevdotdev merged commit f7eeca5 into main Oct 19, 2026
5 checks passed
@dotdevdotdev
dotdevdotdev deleted the dc-classc branch October 19, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant