Repository navigation
Normalize protected programs and read PowerShell launches (T51) - #214
Merged
Merged
Conversation
This was referenced Oct 14, 2026
erickb336
marked this pull request as ready for review
October 14, 2026 03:43
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.
Closes #97
Sage task T51
Protected commands retain their restrictions when executable names use mixed case, full paths or .exe. The active hook uses the same rules for stash, process tools, readers and writers.
The shared reader exposes literal PowerShell Start-Process/start children, including FilePath and ArgumentList in either order. Direct PowerShell inputs and nested powershell/pwsh commands carry explicit context. The specified backslash-before-double-quote ambiguity involving git or gh refuses. Supported forms and limits are in packages/sage-core/powershell-launch.md.
Shell syntax, same-shell builtin lookup and external executable identity remain distinct. Genuine builtin chains retain their children. An external command executable retains its identity; a separate refusal-only check examines literal operand chains for protected expansions and API writes. It grants no permission and does not evaluate external eval text or function arguments.
Head:
9f830b9cc93b1d1285e374b54236f1bca29fa9e5, including mainf6e04a3and merged #215.Validation:
npm run build: generated provider copies committed.npm run check: all checks pass.npm test -- --test-concurrency=1: tests 1209, pass 1209, fail 0, cancelled 0, skipped 0.The earlier full suite and CI exposed six refusal regressions that clean source reviews missed. This head repairs them and passes both final full checks.
All tests use fake ps, pgrep and kill first on PATH. Candidate commands reach parser/handle only; no attack command or real PowerShell process ran. Actual PowerShell execution and complete shell/sandbox enforcement remain unverified. This does not enable installed automatic Sage or resolve required-hook outage behavior. Claude #140's active lead/report changes remain untouched.