Repository navigation
Match action inputs on a word boundary, not as substrings - #4
Merged
Merged
Conversation
The input-coverage check tested `f"inputs.{name}" not in piped`, so an
input whose name is a prefix of another's reported as covered while
never reaching the step: "path" is a substring of a piped "pathspec".
Today's five names happen not to collide, so nothing is dead -- the
guard was. Its own comment calls an unpiped input dead surface, and this
is the check that was supposed to find one.
Verified both directions: an injected unpiped `path` input now fails the
lint, and passed it before.
Also here:
git diff --cached --quiet returns 128 on error, not just 0 and 1, and
2>/dev/null threw away the reason. On an unborn HEAD the suppressed
message is "fatal: ambiguous argument 'HEAD'" and the script proceeded
as though there were changes, failing one step later at rev-parse.
The staging branch on PATHSPEC guarded nothing: both diffs below it pass
the same possibly-empty array through `-- "${PATHSPEC[@]}"` with no
guard, and an empty expansion after -- is what passing no pathspec
means. Three usage strings that disagreed about [pathspec ...] are now
one.
The suite kept its scratch directories in three of six groups and left
them in the other three, so every run leaked three; one scratch root
exported as TMPDIR puts all six under the trap that already existed.
Removed a fixture loop whose only case arm is empty, over a --data@
spelling the caller never produces, and two `|| true` under a harness
that sets -u without -e and ends each group with its own exit.
dependabot.yml claimed actions here are pinned to commit SHAs. The one
action is actions/checkout@v7, first-party on a major tag deliberately.
Verified: 13 assertions, lint-action.sh clean, shellcheck clean,
actionlint clean, /tmp delta 0 (was 3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The input-coverage check in
tests/lint-action.shtestedf"inputs.{name}" not in piped, a plain substring match. An input whose name is a prefix of another's therefore reported as covered while never reaching the step:pathis a substring of a pipedpathspec. Today's five names happen not to collide, so nothing is dead surface right now — the guard was. Its own comment calls an unpiped input dead surface, and this is the check that exists to find one. Verified both directions: an injected unpipedpathinput now fails the lint and passed it before.git diff --cached --quietreturns 128 on error, not only 0 and 1, and2>/dev/nulldiscarded the reason. On an unborn HEAD the suppressed message isfatal: ambiguous argument 'HEAD'and the script proceeded as though there were changes, failing one step later atrev-parse.The staging branch on
PATHSPECguarded nothing. Both diffs below it already pass the same possibly-empty array through-- "${PATHSPEC[@]}"with no guard, and an empty expansion after--is what passing no pathspec means. The diff computation the GraphQL mutation depends on is untouched, so deletions stay complete.The suite cleaned up its scratch directories in three of six groups and left them in the other three, leaking three per run. One scratch root exported as
TMPDIRputs all six under the trap that already existed;/tmpdelta is now 0. Removed a fixture loop whose onlycasearm is empty, over a--data@spelling the caller never produces, and two|| trueunder a harness that sets-uwithout-eand ends each group with its own explicit exit.dependabot.ymlclaimed actions here are pinned to commit SHAs. The one action isactions/checkout@v7, first-party on a major tag deliberately. The same sentence appears in seven other repos' configs and is wrong in all of them; onlyinfrastructureSHA-pins anything.Not applied, deliberately:
tests/lint-action.shlints the extractedrun:body with whatevershellcheckis on PATH whileci.ymluses a digest-pinned image for the.shfiles — a real inconsistency, since the inline body is the code no other linter sees. The fix needs the body file reachable from inside a container, and I could not verify that path without a test push. Flagging rather than shipping it unverified.Verified: 13 assertions,
lint-action.shclean,shellcheckclean,actionlintclean.