Skip to content

ci: check-shell-portability.sh --all reports 68 pre-existing untriaged findings on main #1540

Description

@kyle-sexton

This was generated by AI during work-loop execution.

Context

While working #1527 (migrating mktemp -p test-scaffolding call sites to a portable form and
activating that class in scripts/shell-portability-tokens.txt), the issue's own acceptance
criteria required scripts/check-shell-portability.sh --all to exit 0 against the full repo.

Running --all against origin/main before #1527's changes (verified in a separate, throwaway
detached worktree at origin/main HEAD, unrelated to #1527's branch) already exits 1 with 68
pre-existing PORTABILITY: findings — none of them mktemp. Running the identical scan on #1527's
branch produces the byte-for-byte identical finding set (diff of the sorted PORTABILITY: lines
is empty), proving the mktemp -p migration and its newly-active token contribute zero net findings
either way. These 68 are pre-existing corpus debt, orthogonal to #1527's scope.

Breakdown (68 findings, by token)

Token Count
\< 18
\> 17
\w 8
\S 7
\s 7
\b 7
sed -i (unsuffixed) 2
\W 2

All are the regex-escape family (\b \< \> \s \S \w \W — ACTIVE since #1491/#1511, deliberately
bare/over-flag by design per shell-portability-tokens.txt's own header) plus two sed -i
unsuffixed sites in plugins/context-guard/scripts/context-zone.test.sh and
plugins/markdown-format/hooks/markdown-format.test.sh. Every hit is either a portable-but-flagged
non-regex use (printf/glob bracket expressions, PowerShell backslash paths in test fixtures, sed
scripts operating on the gate's own literal test data) or a genuinely GNU-only construct that has
simply never been triaged since #1491 shipped — CI only runs this gate in diff-mode on pull requests
(scripts/check-shell-portability.sh is diff-gated per #1491's PR description), so --all against
the full historical corpus has never actually been exercised end-to-end and reported clean.

Proposed work

For each of the 68 sites: either add a per-site portability-ok: <reason> annotation (the documented
escape for a reviewed false positive) or fix the two genuine sed -i non-portable sites to a
BSD-safe attached-suffix form. Re-run scripts/check-shell-portability.sh --all and confirm exit 0
once triaged.

References

Activity

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

    area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: lowNice-to-have, cosmetic, or speculative; opportunistic.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions