What the check does
Flags a multi-command bashrun: block (GitHub Actions) or a
multi-command script: (GitLab CI) that does not enable strict mode.
Why it matters
GitHub’s default shell for arun: step on Linux and macOS is bash -e — one
of the three flags that matter, and not the interesting one:
Without
pipefail, this step passes green when generate crashes, because
the step’s exit status is tee’s:
-u, a misspelled or unset variable expands to the empty string:
-e per script, not pipefail.
Safe alternative
default: covers every job:
What does not fire
Scoped tightly on purpose — this pattern is everywhere, and a rule that fires on all of it is a rule people turn off:Persona and rulesets
This rule is tiered to thepedantic persona. It is a real gap, not a
stylistic preference, but it fires on ordinary CI and must not crowd out
security findings at the default tier:
all ruleset and not under owasp or slsa.
Auto-fix
Prependsset -euo pipefail — after a shebang when the script has one,
because a shebang only works on line 1 and inserting above it would silently
change which interpreter runs the script. The inserted line matches the
script’s own indentation. On GitLab the line becomes the first script: entry.