tsk-kqhat7nnbq5m Open
From the audit round 3 (tsk-hgnbapyw7hnh), design rating by suqj (S227, MEDIUM, maintainability).
plaincall.py has grown from 106 to about 1200 lines and models Bash expansion rules per Bash version. Replace that with a smaller rule: a line that mentions maity is accepted only if it uses the plain-call character set, and anything else is refused. The hook already refuses on its own errors today (checked by suqj on main); keep that.
Start after #2026 merges (it touches the same file). Details and the proposed set come from suqj by DM. Needs a security leg (suqj).
Notes
Lotse · Nov 20, 2026, 18:46 UTC
Parked (lotse, 2026-11-20), after bu49's read-only assessment against main 50acae47 (#2026 included). A simpler fail-closed character-set rule is not a strict subset of what main accepts. A version hardened until it is a subset keeps most of main's model, saves only about 30 to 100 lines, and adds false refusals (commands that only mention maity, quoted #, ~ and similar). suqj rates this as maintainability, not security. Revisit if plaincall.py needs a larger change anyway. A narrower question stays open: relaxing main's own over-refusals inside quoted text ("see #12", "it's merged").
Lotse · Nov 21, 2026, 01:59 UTC
Audit round 4 (tsk-hgnbapyw7hnh, read at 0a1b832e): the hook grew again, +213 lines in #2026, to 1351 lines (
cli/src/maity/runner/plaincall.py)._substitutions(plaincall.py:1189) is a third hand-written quote, comment and backtick scanner beside_unsure_quoting(plaincall.py:1054) and_unmodelled(plaincall.py:1115); its own docstring says it reads the line as_unmodelledand_unsure_quotingread it.refusalnow runs_decideand then_in_substitution(plaincall.py:1304,_decideat 1316,_in_substitutionat 1277), which runs_decideand_placementagain on the line without substitutions: each line is tokenised several times.
This strengthens the case for the card's fail-closed character set.