Skip to content

Require approval for awk and sed bash commands / 要求 awk 和 sed Bash 命令审批#4452

Merged
esengine merged 1 commit into
main-v2from
fix/bash-readonly-script-approval
Jun 16, 2026
Merged

Require approval for awk and sed bash commands / 要求 awk 和 sed Bash 命令审批#4452
esengine merged 1 commit into
main-v2from
fix/bash-readonly-script-approval

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • Treat awk and sed bash commands as approval-required instead of read-only.
  • Add regression cases for awk system(), awk file writes, and sed e command execution.

Problem

The bash read-only classifier allowed awk and sed based only on the command name. Those tools can execute shell commands or write files from inside their scripts, so classifying them as read-only could bypass Ask-mode approval.

Verification

  • go test ./internal/permission ./internal/agent -count=1
  • go test ./internal/sandbox ./internal/tool/builtin -run 'TestSandboxEnforcesWrites|TestBashSandboxConfinement' -count=1

@SivanCola SivanCola requested a review from esengine as a code owner June 15, 2026 06:11
@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 15, 2026
@SivanCola SivanCola enabled auto-merge June 15, 2026 06:18
@esengine esengine merged commit d45e5c3 into main-v2 Jun 16, 2026
14 checks passed
@esengine esengine deleted the fix/bash-readonly-script-approval branch June 16, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants