Skip to content

Block interactive privilege prompts in run_bash - #300

Merged
yottadynamics merged 1 commit into
mainfrom
prevent-interactive-privilege-prompts
Sep 2, 2026
Merged

yottadynamics merged 1 commit into
mainfrom
prevent-interactive-privilege-prompts

Conversation

@yottadynamics

Copy link
Copy Markdown
Owner

Summary

  • Refuse run_bash command segments that invoke sudo, doas, or pkexec before spawning the shell.
  • Return a recoverable BLOCKED (privilege escalation) tool result with manual-run guidance instead of allowing terminal-owned OS password prompts to hang the agent.
  • Document the elevated-command policy in the tools and security guides.

Related issue

None.

How was this tested?

  • go test ./internal/agent -run 'Test(IsPrivilegeEscalationCommand|RunBash_PrivilegeEscalationFloor|RunBash_HardlineFloor|AssessRisk_Caution)'
  • go test ./...
  • go vet ./...

Checklist

  • go test ./... passes
  • go vet ./... is clean
  • govulncheck ./... reports no reachable vulnerabilities
  • Tests added or updated — a new capability ships with tests, a bug fix ships with a regression test
  • Docs updated in the same change if behavior or surface changed (relevant docs/ guide)
  • PR is focused on one logical change

@yottadynamics
yottadynamics merged commit 5504908 into main Sep 2, 2026
7 checks passed
@yottadynamics
yottadynamics deleted the prevent-interactive-privilege-prompts branch September 2, 2026 14:08
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