Repository navigation
Harden nested Bash permission matching - #350
Merged
Merged
Conversation
yottadynamics
force-pushed
the
worktree-bash-permissions-hardening
branch
from
September 15, 2026 13:10
e4277dd to
52f69fc
Compare
Owner
Author
|
Updated PR #350 with the follow-up security fixes:
Verification passed: The branch was reconciled with the remote PR commit and force-updated using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens Bash permission matching for compound and nested commands.
Bash commands are already split across shell separators, but nested command substitutions and backticks were treated as part of the outer descriptor. This allowed an outer allow rule such as
Bash(echo *)to cover an unreviewed nested command. The evaluator now extracts nested commands as additional permission targets, preserving deny/ask/all-allow semantics across the full command tree.This PR deliberately does not claim that command-text matching is an OS security boundary. The documentation directs users to the command sandbox for enforcement against alternate executable paths, scripts, aliases, and indirect subprocess access.
Related issue
Not linked.
How was this tested?
go test ./...go vet ./...git diff --checkAll passed.
Checklist
go test ./...passesgo vet ./...is cleangovulncheck ./...reports no reachable vulnerabilitiesDrafted with yottacode
Drafted with yottacode