Skip to content

QA-CI-008 — Always-success step masks failures ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-CI-008.

FieldValue
Severityerror
Confidencehigh
Tierquarantine
Measured FP rate10% (n=10)
Evidence levelE2
QA impactFalse-green risk (FALSE-GREEN)
False-positive risk (author estimate)low
Autofix availableno
Languagesyaml, groovy
Frameworksgithub-actions, azure-pipelines, jenkins
Detection strategyLEXICAL
Introduced inv0.1.0

Why this fails in production ​

A final step that unconditionally echoes success (or any step that always exits 0 as the LAST step in a job) determines the job's overall conclusion in GitHub Actions — the job's status is the status of its steps taken together, and a trailing always-succeed step can overwrite what an earlier failing step already signaled, depending on how the workflow is structured. Combined with any earlier step's failure being non-fatal to the job (e.g. a missing if: failure() gate), this produces the exact same effect as QA-CI-001 by a different mechanical path: a real failure, a green checkmark.

What gets flagged (real detector output) ​

Final step in `test` always succeeds while earlier steps tolerate failure.

Example from this rule's own must-fire fixture: tests/fixtures/QA-CI-008/must-fire/masked-green.yml

The fix ​

Remove the always-success final step and let the real test step determine the job result.

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-CI-008/must-not-fire/clean.yml — a legitimate, similar-looking pattern this rule correctly leaves alone.

Corpus-measured false-positive risk ​

Real occurrence counts from npm run corpus:audit against actively-maintained OSS repos — reproduce yourself, don't just trust this table (see the false-positive audit):

RepoOccurrences
positive-fixtures9
vitest-dev-vitest1

Released under the MIT License.