Skip to content

fix(p0): close governance fail-open vulnerabilities#83

Merged
jpleva91 merged 1 commit intomainfrom
fix/p0-governance-security
Mar 29, 2026
Merged

fix(p0): close governance fail-open vulnerabilities#83
jpleva91 merged 1 commit intomainfrom
fix/p0-governance-security

Conversation

@jpleva91
Copy link
Copy Markdown
Contributor

Summary

Fixes all 3 P0 governance security bugs plus 2 closely related P1s. These were blocking the dogfood run and represent actual security correctness holes in the enforcement runtime.

Test plan

  • go build ./cmd/shellforge/ passes (verified locally)
  • shellforge evaluate with malformed JSON returns {"allowed":false}
  • govern-shell.sh -c 'echo "hello"' correctly evaluates without JSON corruption
  • govern-shell.sh -c 'rm file.txt' is denied by updated rm policy
  • Bounded-execution monitor policy no longer matches every run_shell call
  • plain rm is now denied by no-destructive-rm

Closes #58, #59, #62, #67, #69, #75

Generated with Claude Code

- govern-shell.sh: use jq --arg for safe JSON construction (fixes #75 printf injection)
- govern-shell.sh: use jq for output parsing, fail-closed on governance unavailable (fixes #67)
- cmd/shellforge/main.go: fail-closed on JSON unmarshal error and stdin read error (fixes #62)
- internal/governance/engine.go: wildcard-only timeout policy no longer matches every command (fixes #58)
- agentguard.yaml: block all rm (not just -rf/-fr), fix misleading mode comment (fixes #69, #59)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jpleva91 added a commit that referenced this pull request Mar 29, 2026
- PR #83 open: fixes P0s #58 #62 #75 and P1s #67 #69 + P2 #59
- All 3 P0 governance fail-open bugs authored by EM (no dev-agent in swarm)
- PR budget 1/3, blockers cleared pending CI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jpleva91 added a commit that referenced this pull request Mar 29, 2026
- PR #83: CI 5/5 passing, blocked on REVIEW_REQUIRED (flagged as P0 blocker)
- PR #84: opened for #74 (stale Crush comments)
- PR budget: 2/3
- P2 issues labeled (#65, #66, #52, #53)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jpleva91 jpleva91 merged commit dba625c into main Mar 29, 2026
5 checks passed
@jpleva91 jpleva91 deleted the fix/p0-governance-security branch March 29, 2026 22:33
jpleva91 added a commit that referenced this pull request Mar 30, 2026
- P0 COMPLETE: PRs #83/#84/#85 merged, all P0 governance bugs closed
- Issue #59 closed (already fixed by PR #83)
- PR #86 opened: fix P1 #28 β€” governance timeout override (60s cap removed)
- PR budget: 1/3 (was 3/3 at-limit)
- Dogfood (#76) unblocked from governance side β€” needs human trigger
- P1 remaining: #28 (in PR #86), #63/#68 (qa-agent)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jpleva91 added a commit that referenced this pull request Mar 30, 2026
- P0 COMPLETE: PRs #83/#84/#85 merged, all P0 governance bugs closed
- Issue #59 closed (already fixed by PR #83)
- PR #86 opened: fix P1 #28 β€” governance timeout override (60s cap removed)
- PR budget: 1/3 (was 3/3 at-limit)
- Dogfood (#76) unblocked from governance side β€” needs human trigger
- P1 remaining: #28 (in PR #86), #63/#68 (qa-agent)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Critical: bounded-execution policy denies ALL run_shell calls in enforce mode

1 participant