-
Notifications
You must be signed in to change notification settings - Fork 2
fix(ci): shell-portability-lint's sort -V token misses operator-terminated forms #1537
Copy link
Copy link
Closed
Copy link
Labels
agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.Fully specified and briefed; eligible for autonomous pickup from the frontier.area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.Security-relevant: vulnerability, hardening, or disclosure follow-up.priority: lowNice-to-have, cosmetic, or speculative; opportunistic.Nice-to-have, cosmetic, or speculative; opportunistic.status: readyTriaged, unblocked, and fully specified; eligible to pick up.Triaged, unblocked, and fully specified; eligible to pick up.
Description
Activity
Metadata
Metadata
Assignees
Labels
agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.Fully specified and briefed; eligible for autonomous pickup from the frontier.area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.Security-relevant: vulnerability, hardening, or disclosure follow-up.priority: lowNice-to-have, cosmetic, or speculative; opportunistic.Nice-to-have, cosmetic, or speculative; opportunistic.status: readyTriaged, unblocked, and fully specified; eligible to pick up.Triaged, unblocked, and fully specified; eligible to pick up.
Found during automated review of #1530, which fixed the same defect in that PR's own new
--sort=WORDtoken but deliberately left this pre-existing sibling alone (widening it changes the gate's firing envelope over the existing corpus, not over #1530's new token).Defect
scripts/shell-portability-tokens.txtships:The trailing boundary accepts only whitespace or end of line, so a
sort -Vwhose flag is terminated by a shell control operator is a false negative:x=$(sort -V)sort -V|head -n1sort -V; echo doneEach is the same GNU-only version-sort operation the token exists to reject, and each passes the gate today.
Fix shape
Mirror what #1530 landed for the long form — make the boundary every character that can actually END a shell word:
Same treatment likely applies to the sibling short-flag tokens with the same boundary (
grep -P,echo -e), so audit all three together rather than one at a time.Before landing
Run
bash scripts/check-shell-portability.sh --allbefore and after and diff the hit set: the widened boundary may surface real corpus sites that were silently passing, and those need a fix or a recordedportability-ok:rather than being absorbed into the token edit.Test plan
scripts/check-shell-portability.test.sh.