Repository navigation
Recognize output-file programs in shared write checks (T44) - #204
Merged
Merged
Conversation
erickb336
marked this pull request as ready for review
October 13, 2026 19:56
This was referenced Oct 13, 2026
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 #203
Sage task T44
Codex's shared role and path checks now recognize common output-file programs. For example, curl -o and git diff --output now count as writes. The protected-path check refuses a logbook target and still permits an explicit scratch target. This is a component of #99 and #88; the remaining Claude-hook work in #99 stays open.
The shared core uses actual parsed dispatches and preserves curl option values and case. Unknown curl options count as writes. Programs with ordinary writing operands (ditto, scp, wget, sqlite3) count conservatively as writers. OpenSSL output options also count. Generated plugin copies come from npm run build. No owner decision is needed.
Sources: packages/sage-core/output-writes.mjs and shell-write-policy.mjs. Claude's hook and active #140 files are unchanged. This is not a complete arbitrary-command policy and does not inspect external configuration contents. No sandbox enforcement or installed activation was verified.
Validation on 7321ce1:
Review repairs questioned the premise that an argument's spelling identifies whether it is an option. The first scanner mistook values for output flags and missed consumed delimiters. The delimiter heuristic then mistook an already consumed value for an unknown option. OpenSSL also stops options at its first operand. The current scanner tracks consumed arguments explicitly, respects that operand boundary, and conservatively treats unknown OpenSSL options as writes. All reported cases have regression controls. Review cycles restart on 7321ce1.
Two clean code/security/QA cycles passed on unchanged 7321ce1. The full local command npm test -- --test-concurrency=1 passed: 1,171 passed, 0 failed, 0 skipped. Exact-head CI passed with 1,171 tests: https://github.com/erickb336/sage/actions/runs/38457664464. All required checks and six review cycles passed on the same commit.