Skip to content

Normalize executable spellings in shared shell-write checks (T45) #205

Closed

Description

@erickb336

Parent #97; supports #88. Sage task T45. Risk: auth.

Shared push checks already normalize executable names through T42. The shared shell-write classifier still uses basename without stripping .exe. A parser-only check on 7321ce1 shows CP.exe source.txt target.txt, RG.exe --pre cat sample, and FILE.exe -C return false, while the corresponding ordinary write forms return true. It also misclassifies cat.exe cp as a write because it does not recognize the reader.

Use the existing programName helper at executable-name comparisons in packages/sage-core/shell-write-policy.mjs. Preserve argument and option case, values, reader data, and parser context. Verify both packaged cores and the protected-path boundary. Command examples go only to the parser.

No Claude hook or active #140 files are in this topic. The remaining PowerShell/Claude work in #97 stays open.

Acceptance: new tests fail behaviorally on detached main; build/check/full suite pass; two clean code/security/QA cycles on the final head; exact-head CI passes. This does not activate automatic Sage.

Activity

  1. added
    codex
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions