Skip to main content

SKY-A121 · AI-code defects

CI check weakened

High

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 with HEAD) or skylos done --base origin/main for a pull request; agent hooks run it when the agent stops
Quality gate
not checked (full and diff scans). Only skylos done reports it, in its silenced_checks check, which advises by default: the finding is shown but does not fail the verdict. With silenced_checks = "block" in [tool.skylos.done.checks] it blocks. skylos cicd risk-review counts it as "CI weakened", which needs a human approval.
Finding type
review
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

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

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

.github/workflows/ci.yml · YAML · changed
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 || true

What Skylos leaves alone

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

.github/workflows/ci.yml · YAML · changed
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 || true

Why 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

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

.gitlab-ci.yml · YAML · changed
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 --error

Not flagged

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

.gitlab-ci.yml · YAML · changed
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 --error

Why 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

  1. Runs in skylos done, which compares the working tree (or a pull request's head) with a base commit: HEAD by default, the merge base with --base. Its settings come from the base commit, never from the change.
  2. Reads changed .github/workflows/*.yml, composite action.yml files and .gitlab-ci.yml files 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 a package.json script or a make, tox or nox target, or through a known action.
  3. Reports a check step that can now fail without failing the build: continue-on-error: true on the step or job, a swallowed failure (|| true, || echo, ; exit 0, set +e), an exit-zero option, fewer failing findings (--max-warnings raised, semgrep --error dropped, new --ignore options), or GitLab allow_failure and when: manual.
  4. Also reports a test or check that stops running: its step or job removed while the same tool runs nowhere else at head, if: false or when: never, a workflow that no longer runs on pull requests or pushes, or an aggregate job that no longer needs the job running it.
  5. 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.

Fix · YAML
- name: Type check  run: mypy src

When it can be wrong

  • A new advisory step that runs the same tool as an existing required step, such as mypy --strict src || true added next to mypy 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 done findings ignore # skylos: ignore[...] comments and the [tool.skylos] ignore list. 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"

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.