Skip to content

setup: read-only vetted ops must never prompt (install applies, verify checks, update reports drift) - #1640

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:secure-setup-vetted-ops-never-prompt
Oct 15, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:secure-setup-vetted-ops-never-prompt

Conversation

@potiuk

@potiuk potiuk commented Oct 15, 2026

Copy link
Copy Markdown
Member

Why

Bulk skills run vetted-op-read from background gatherer agents, and a background agent cannot show a permission prompt.
Every prompt there is a silent denial: the read fails, and the orchestrator gets a partial report with nothing to show that a read was refused.
A bulk sync over a few dozen trackers produced exactly that: patchy, unverifiable results.

Two settings shapes cause it:

  • With permissions.blockReadsOutsideWorkingDirectories on, Claude Code prompts on every call ("uvx names '~/.claude/magpie/vetted-ops', which cannot be checked against the read block").
    • The check cannot resolve the literal ~ in the command, which is the spelling sandbox.excludedCommands matches.
    • Neither an allow rule nor an absolute $HOME/.claude/magpie in additionalDirectories overrides it.
  • Any permissions.ask rule that matches a vetted-op-read command prompts, even when an allow rule also matches.

What

"Read-only vetted ops never prompt" becomes a requirement of the secure setup.
Required shape:

  1. permissions.allow carries vetted-op-read for both launchers (uvx --from, uv run --project) on both bases: ~/.claude/magpie/vetted-ops and the resolved absolute $HOME/....
  2. sandbox.excludedCommands carries a vetted-op-read entry for each of those four forms, plus the existing tracker exclusions. An allowed form without its exclusion runs sandboxed, and its gh call fails silently.
  3. No permissions.ask rule matches a vetted-op-read command, including broad rules such as Bash(uvx *).
  4. blockReadsOutsideWorkingDirectories is false or absent in every scope. Bash stays sandboxed regardless.
  5. The three vetted-ops Edit deny rules (catalogue, fixed path, policy) are required. They are what makes the unprompted read safe.

Where the rules live:

  • The ~ allow pair, the ~ exclusions and the deny rules may live in the committed project settings or in user scope.
  • The absolute-$HOME allow and exclusion forms are per machine: user scope, or settings.local.json when user settings are synced. They are never committed.

This covers the read dispatcher only. vetted-op-tracker and vetted-op keep their ask rules and stay out of allow.

Changes:

  • docs/setup/secure-agent-setup.md: new section Read-only vetted ops never prompt, with the rationale. The install, verify and update prompts are updated to match.
  • setup-isolated-setup-install: new Step V.1 proposes the exact edits. The operator applies them.
  • setup-isolated-setup-verify: new check 16 (16a–16e). Any failure is ✗.
  • setup-isolated-setup-update: a fourth vetted-ops check reports drift as must-fix.
  • sandbox-lint: runs these checks whenever a Bash(...) rule or an excludedCommands entry names a dispatcher. It requires both ~ allow forms, no read block and the three Edit denies. It also rejects any ask rule that matches a vetted-op-read command; rules are pattern-matched, so broad rules are caught. 15 new tests.
  • Doctor probe 9, the troubleshooting doc, tools/vetted-ops/README.md, the sandbox-add-project-root.sh comment and the spec-loop specs are updated to match.

The framework's own .claude/settings.json already has this shape, so it is unchanged.

Testing

  • prek: 33 hooks pass on every changed file.
  • sandbox-lint: 252 passed, 2 skipped.
  • Failure in untouched packages: workspace-pytest fails in oauth-api, jira and typed-decision, which this PR does not change. oauth-api fails because the sandbox blocks binding a local port; jira and typed-decision could not be run directly here.

🤖 Generated with Claude Code

Bulk skills run vetted-op-read from background gatherer agents, which
cannot surface a permission prompt, so every prompt there is a silent
denial. Make "read-only vetted ops never prompt" an imperative of the
secure setup: install proposes the shape, verify checks it (check 16),
update reports drift as must-fix, and sandbox-lint enforces the
committed half.

The shape: vetted-op-read allowed and sandbox-excluded for both
launchers on both the ~ and the absolute $HOME base, no ask rule that
matches it, blockReadsOutsideWorkingDirectories off (it cannot resolve
the literal ~), and the three vetted-ops Edit deny rules present.
vetted-op-tracker and vetted-op are unchanged.

Generated-by: Claude Opus 5
@github-actions github-actions Bot added family:setup setup-* skills family:tools tools/* family:docs Docs, MISSION.md, READMEs capability:reassess Re-run historical issues against current code capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) substrate:sandbox Tool substrate: agent isolation, egress control, settings audit labels Oct 15, 2026
@potiuk
potiuk merged commit 1807199 into apache:main Oct 15, 2026
13 checks passed
potiuk added a commit that referenced this pull request Oct 15, 2026
Brings tools/spec-loop/specs/ in line with what landed between
21fe630 and 1807199 (#1554 to #1640): the pr-management code-path
work and mention policy, the vetted-ops reads and --save, the
Subversion backend, the CVE tooling changes, candidate-screen's
pre-filter and data-only report, calendar-date release versions, the
session-start drift mod, the Grok and Copilot guard hooks, the fixed
adversarial-review path, and the vendor-neutrality multi-vendor rule.
Specs that had drifted into stating the opposite of the code are
corrected (candidate-screen pre-filter, stats writes, reviewer-routing
eligibility).

The non-ASF reviewer-routing smoke case still expected NO ELIGIBLE
REVIEWER when no roster area matches; since #1583 every member is
eligible there, so it now expects the lowest-load member.

.last-sync moves to 1807199.

Generated-by: Claude Code (Opus 5.5)
potiuk added a commit to Kaap10/magpie that referenced this pull request Oct 16, 2026
Bulk skills run vetted-op-read from background gatherer agents, which
cannot surface a permission prompt, so every prompt there is a silent
denial. Make "read-only vetted ops never prompt" an imperative of the
secure setup: install proposes the shape, verify checks it (check 16),
update reports drift as must-fix, and sandbox-lint enforces the
committed half.

The shape: vetted-op-read allowed and sandbox-excluded for both
launchers on both the ~ and the absolute $HOME base, no ask rule that
matches it, blockReadsOutsideWorkingDirectories off (it cannot resolve
the literal ~), and the three vetted-ops Edit deny rules present.
vetted-op-tracker and vetted-op are unchanged.

Generated-by: Claude Opus 5
potiuk added a commit to Kaap10/magpie that referenced this pull request Oct 16, 2026
…1643)

Brings tools/spec-loop/specs/ in line with what landed between
21fe630 and 1807199 (apache#1554 to apache#1640): the pr-management code-path
work and mention policy, the vetted-ops reads and --save, the
Subversion backend, the CVE tooling changes, candidate-screen's
pre-filter and data-only report, calendar-date release versions, the
session-start drift mod, the Grok and Copilot guard hooks, the fixed
adversarial-review path, and the vendor-neutrality multi-vendor rule.
Specs that had drifted into stating the opposite of the code are
corrected (candidate-screen pre-filter, stats writes, reviewer-routing
eligibility).

The non-ASF reviewer-routing smoke case still expected NO ELIGIBLE
REVIEWER when no roster area matches; since apache#1583 every member is
eligible there, so it now expects the lowest-load member.

.last-sync moves to 1807199.

Generated-by: Claude Code (Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) capability:reassess Re-run historical issues against current code family:docs Docs, MISSION.md, READMEs family:setup setup-* skills family:tools tools/* substrate:sandbox Tool substrate: agent isolation, egress control, settings audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant