Problem
plugins/typos-format/hooks/typos-format.sh:280 invokes:
"$TYPOS_BIN" "${TYPOS_CONFIG_ARGS[@]}" --write-changes --force-exclude --format json "$TYPOS_ARG"
--write-changes mutates the file, and the invocation carries no extension filter — any file reaching this hook is rewritten in place.
Compounding it, the same file records at :223 that --write-changes emits nothing for a correction it applies (verified against the tool's behavior, per the comment). So a mutation here is silent by the tool's own design, and the only thing bounding blast radius is whatever the hook's matcher and --force-exclude happen to admit.
Why this is filed at low priority
typos correcting a genuine misspelling is usually right, and --force-exclude does honor exclusions. This is a defense-in-depth gap, not an active break: the concern is a file type where an apparent typo is load-bearing — a fixture, a golden file, a test asserting on exact strings, an encoded blob, a vendored artifact.
Suggested direction
Either constrain the hook to an explicit extension allowlist, or document why unrestricted write is correct here and what the exclusion config is expected to carry. Both are cheap; the current state leaves the reader unable to tell which was intended.
Verification
Line numbers verified against 065877c8. Surfaced during an unrelated fleet-wide sweep of tree-mutating surfaces.
Problem
plugins/typos-format/hooks/typos-format.sh:280invokes:--write-changesmutates the file, and the invocation carries no extension filter — any file reaching this hook is rewritten in place.Compounding it, the same file records at
:223that--write-changesemits nothing for a correction it applies (verified against the tool's behavior, per the comment). So a mutation here is silent by the tool's own design, and the only thing bounding blast radius is whatever the hook's matcher and--force-excludehappen to admit.Why this is filed at low priority
typoscorrecting a genuine misspelling is usually right, and--force-excludedoes honor exclusions. This is a defense-in-depth gap, not an active break: the concern is a file type where an apparent typo is load-bearing — a fixture, a golden file, a test asserting on exact strings, an encoded blob, a vendored artifact.Suggested direction
Either constrain the hook to an explicit extension allowlist, or document why unrestricted write is correct here and what the exclusion config is expected to carry. Both are cheap; the current state leaves the reader unable to tell which was intended.
Verification
Line numbers verified against
065877c8. Surfaced during an unrelated fleet-wide sweep of tree-mutating surfaces.