Repository navigation
Description
This was generated by AI during work-loop execution.
Context
While implementing #1513 (harden shell-portability-lint detection precision), item 3 of that issue
identified that scripts/check-shell-portability.sh's scan_file() passes "$TOKENS" "$file"
positionally to awk, and a scanned file whose relative path is shaped like an identifier=value
assignment (e.g. a top-level file literally named FOO=bar.sh) is silently consumed by awk as a
command-line variable assignment instead of opened as a file -- dropping it from the scan with no
error (empirically verified: awk '{print}' "FOO=bar.sh" exits 0 with no output; awk '{print}' "./FOO=bar.sh" correctly prints the file's contents). #1513 fixed this in
check-shell-portability.sh by prefixing an unrooted file operand with ./ before it reaches awk.
scripts/check-skill-portability.sh's scan_file() has the textually identical pattern --
awk '...' "$TOKENS" "$file" -- and so has the identical latent vulnerability, but #1513's brief
scoped the awk-operand fix to check-shell-portability.sh only (the issue that named it never
mentioned the skill gate for this specific item, unlike item 2 in the same issue, which explicitly
called out a shared fix across both gates). Fixing it there too was out of scope for #1513's PR.
Proposed work
- Apply the same
./-prefix fix tocheck-skill-portability.sh'sscan_file(): before invoking
awk, prefix the$fileoperand with./when it does not already start with./or/. - Add a regression test mirroring ci: harden shell-portability-lint detection precision (sed -i spellings, portability-scope precision, awk operand edge case) #1513's
check-shell-portability.test.shcase (a skill file whose
name is shaped likeFOO=bar.md, scanned via--allor--paths, confirmed present in the
violation output rather than silently dropped).
Acceptance criteria
-
check-skill-portability.sh'sscan_file()no longer risks silently dropping a scanned file
whose name is shaped like an awk variable assignment. - A regression test proves the fix (file not silently skipped).
-
bash scripts/check-skill-portability.test.shpasses.
References
- ci: harden shell-portability-lint detection precision (sed -i spellings, portability-scope precision, awk operand edge case) #1513 (fixed the identical pattern in the sibling
check-shell-portability.sh) - ci: no gate covers shell portability — a GNU-only \b nearly shipped a fail-open security predicate #1491 (added
check-shell-portability.sh)
Metadata
| Field | Value |
|---|---|
| Category | unspecified |
| Area | security |
| Ecosystem | unspecified |
Activity
kyle-sexton commentedon Jul 26, 2026
This was generated by AI during triage.
Triage
Verification: confirmed by direct source read.
scripts/check-skill-portability.sh'sscan_file()(currentmain, post-#1511/#1519/#1533) still passes the scanned file positionally toawk exactly as described:
awk '...' "$TOKENS" "$file", with no./-rooting of an unrooted$fileoperand — the identical shape #1513 fixed in the sibling
check-shell-portability.sh(that fix isin PR #1534, not yet merged, so
check-shell-portability.shitself is currently in the samepre-fix state on
maintoo). PR #1534's own "Related" section independently names this exact gapand points at #1532 (this issue's now-closed duplicate) as the follow-up — corroborating, not
undermining, this issue's premise.
Classification
Bug(native Issue Type set).priority: low— matches ci: harden shell-portability-lint detection precision (sed -i spellings, portability-scope precision, awk operand edge case) #1513's own severity assessment for the identical findingclass: a silent scan-drop in a CI lint gate, not a runtime or data-loss exposure. No active
exploit path; a file literally named
identifier=value.mdis a contrived corpus case../-prefix pattern ci: harden shell-portability-lint detection precision (sed -i spellings, portability-scope precision, awk operand edge case) #1513 alreadyapplied to the sibling script, with a paired regression-test shape already proven out in
check-shell-portability.test.sh. No open design question.Agent Brief
Type: Bug
Summary:
check-skill-portability.sh's file-scanning helper can silently drop a scanned filefrom the portability scan when the file's path is shaped like an
identifier=valuetoken, becausethe path reaches
awkunrooted and awk consumes it as a variable assignment instead of opening it.Current behavior: A skill file whose relative path matches an
identifier=valueshape (e.g. atop-level file named
FOO=bar.md) is silently excluded from the skill-portability scan — the scanexits clean with no error, and no violation is reported for that file even if it contains a flagged
construct.
Desired behavior: Every file passed to the scan is genuinely opened and scanned, regardless of
whether its path happens to be shaped like a shell variable assignment. The fix already proven for
the sibling shell-portability scanner is: root an unrooted file operand (prefix with
./when itdoes not already start with
./or/) before it reaches awk.Key interfaces:
invocation and passes it the target file path.
Acceptance criteria:
identifier=valuetoken is no longer silentlydropped from the skill-portability scan.
violation in such a file is detected, not silently skipped.
Out of scope:
check-shell-portability.shitself (tracked separately in ci: harden shell-portability-lint detection precision (sed -i spellings, portability-scope precision, awk operand edge case) #1513 / PR fix(ci): harden shell-portability-lint detection precision #1534).portability-scope:anchoring) — thisissue is scoped to the awk-operand edge case only.
Labels applied:
agent-ready(autonomous-eligible role label),status: ready,priority: low.Role label resolved from tracker defaults —
.work-item-tracker.jsoncarries norole_labelsremap, so the default string applies (noting per the taxonomy's loud-warning rule).
Related: #1513 (origin finding), PR #1534 (sibling fix, unmerged), #1532 (closed duplicate of this
issue).
kyle-sexton commentedon Jul 26, 2026
kyle-sexton commentedon Jul 26, 2026
This was generated by AI during work-loop execution.
Claimed and worked via the
/work-items:workautonomous worker lane. Applied the same./-prefixawk-operand disambiguation
#1513/#1534used in the siblingcheck-shell-portability.shtocheck-skill-portability.sh'sscan_file(), and added a mirrored regression test(
FOO=bar.md-shaped filename, confirmed present in violation output rather than silently dropped).Verified the new test is meaningful (fails without the fix, passes with it), full
check-skill-portability.test.sh(20/20) andcheck-shell-portability.test.sh(56/56) suitesgreen, shellcheck clean.
PR: #1538