SKY-A121 · AI-code defects
CI check weakened
The change lets a CI step that runs a linter, type checker, formatter check, scanner or test runner fail without failing the build, or stops it running at all. Examples are continue-on-error: true, || true after the command, --exit-zero, GitLab's allow_failure, or the step, job or pull-request trigger removed.
- Languages
- GitHub Actions workflows and composite actions, GitLab CI
- Turned on by
skylos done(compares uncommitted changes withHEAD) orskylos done --base origin/mainfor a pull request; agent hooks run it when the agent stops- Quality gate
- not checked (full and diff scans). Only
skylos donereports it, in itssilenced_checkscheck, which advises by default: the finding is shown but does not fail the verdict. Withsilenced_checks = "block"in[tool.skylos.done.checks]it blocks.skylos cicd risk-reviewcounts it as "CI weakened", which needs a human approval. - Finding type
- review
Why it matters
A required CI check is the last line that stops a broken or unsafe change from merging. Once it can fail quietly the check still shows a green tick, so nobody notices that it no longer protects anything.
What Skylos flags
name: cion: [pull_request] jobs: checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - run: pip install ruff mypy - run: ruff check . - name: Type checkRemoved: run: mypy srcAdded: run: mypy src || trueWhat Skylos leaves alone
name: cion: [pull_request] jobs: checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - run: pip install ruff mypy - run: ruff check . - name: Type check run: mypy srcAdded: - name: Security scan (preview)Added: run: pip install bandit && bandit -r src || trueWhy Skylos leaves it alone
The quiet step is new and runs a tool no step ran before: it was never required, so making it advisory weakens nothing. The existing ruff and mypy steps still fail the build.
More languages
YAML
Flagged
stages: [test] unit-tests: stage: test image: python:3.12 script: - pip install -r requirements.txt - pytest semgrep: stage: test image: semgrep/semgrepAdded: allow_failure: true script: - semgrep scan --config auto --errorNot flagged
stages: [test] unit-tests: stage: test image: python:3.12 script: - pip install -r requirements.txt - pytest Removed: semgrep:Added: sast-semgrep: stage: test image: semgrep/semgrep script: - semgrep scan --config auto --errorWhy Skylos leaves it alone
The semgrep job is gone, but a job with the same command still runs under a new name. A step or job counts as removed only when the same tool no longer runs in any workflow, composite action or GitLab file.
How Skylos decides
- Runs in
skylos done, which compares the working tree (or a pull request's head) with a base commit:HEADby default, the merge base with--base. Its settings come from the base commit, never from the change. - Reads changed
.github/workflows/*.yml, compositeaction.ymlfiles and.gitlab-ci.ymlfiles at the base and after the change. A step is a check step when it runs a linter, type checker, formatter check or scanner, directly, through apackage.jsonscript or a make, tox or nox target, or through a known action. - Reports a check step that can now fail without failing the build:
continue-on-error: trueon the step or job, a swallowed failure (|| true,|| echo,; exit 0,set +e), an exit-zero option, fewer failing findings (--max-warningsraised,semgrep --errordropped, new--ignoreoptions), or GitLaballow_failureandwhen: manual. - Also reports a test or check that stops running: its step or job removed while the same tool runs nowhere else at head,
if: falseorwhen: never, a workflow that no longer runs on pull requests or pushes, or an aggregate job that no longerneedsthe job running it. - Each step at head is paired with a base step: one with the same name and tool, else any base step that runs the same tool (same job first). A quiet step with no such partner is new, was never required and is not a weakening. A quiet GitHub Actions test step is reported as SKY-A112 instead, so it is reported once.
How to fix it
Keep the check required and fix what it reports. If a check is really too noisy to require yet, add it as a separate, clearly named advisory step and leave the existing required step as it was.
- name: Type check run: mypy srcWhen it can be wrong
- A new advisory step that runs the same tool as an existing required step, such as
mypy --strict src || trueadded next tomypy src, is paired with the required step and reported as if that step had been loosened. - A deliberate change, such as moving a slow scan to a nightly workflow, is reported when no pull-request workflow runs that tool any more.
- Steps that run a tool through a script Skylos cannot read (a shell file, a custom container entry point) are not recognised as check steps, so weakening them is not seen.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
skylos donefindings ignore# skylos: ignore[...]comments and the[tool.skylos] ignorelist. The check only advises by default; to turn it off, commit the mode to the base branch first (the change under review cannot change its own check):TOML [tool.skylos.done.checks]silenced_checks = "off"