Skip to content

Expand the shell approval corpus - #1754

Merged
Aaronontheweb merged 1 commit into
devfrom
test/expand-shell-approval-corpus
Aug 4, 2026
Merged

Expand the shell approval corpus#1754
Aaronontheweb merged 1 commit into
devfrom
test/expand-shell-approval-corpus

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Purpose

This precursor PR expands the Bash approval baseline before #1753 changes production behavior.

Coverage

  • Add four-clause cases for complete, partial, and absent approval coverage.
  • Cover matching and mismatched directory scopes.
  • Cover grants from other sessions and audiences.
  • Cover mixed session, persistent, and safe-verb authority.
  • Cover hard-deny precedence across four clauses.
  • Cover OR branches, newlines, pipelines, and subshells.
  • Cover dynamic paths and redirects.
  • Cover process substitution, arithmetic expansion, and function definitions.
  • Cover inline Python, heredoc Python, and eval payloads.

Baseline findings

  • Safe-verb authority and stored authority do not compose per clause.
  • A dynamic path can receive safe-verb access.
  • A stored Python grant can authorize an inline Python payload.
  • A stored eval grant can authorize a dynamic payload.
  • Several unsupported forms prompt without the complex-command flag.

Scope

This PR changes tests and the review snapshot only. It does not change production behavior or specifications.

Validation

  • 2,751 actor tests pass.
  • 83 approval theory rows pass.
  • Slopwatch reports no issues.
  • All C# files have valid headers.
  • The diff check passes.

PR #1753 should rebase onto dev after this PR merges.

Copilot AI lite review requested due to automatic review settings August 4, 2026 12:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Aaronontheweb Aaronontheweb added tests All issues related to testing, quality assurance, and smoke testing. shell Issues related to the shell tool, since it has the largest security perimeter. labels Aug 4, 2026

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Bash("git status && git log"),
Approvals.None,
ExpectedApproval.Allow(ToolAllowReason.SafeVerbInTrustedScope)),
Case(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the types of cases the new shell approval system should be able to auto-approve in 0.26, provided that all of the underlying verbs are approved

Approvals.PersistentAnywhere(
"git add",
"git commit",
"netclaw daemon stop",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sneaky

Approvals.Session("git add", "gh pr merge"),
Approvals.PersistentHere(ApprovalDirectoryShape.Project, "git commit"),
Approvals.PersistentAnywhere("git push")),
ExpectedApproval.Allow(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - approval composed from different sources

@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) August 4, 2026 12:40
@Aaronontheweb
Aaronontheweb merged commit 7401413 into dev Aug 4, 2026
21 checks passed
@Aaronontheweb
Aaronontheweb deleted the test/expand-shell-approval-corpus branch August 4, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shell Issues related to the shell tool, since it has the largest security perimeter. tests All issues related to testing, quality assurance, and smoke testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants