Skip to main content

SKY-A119 · AI-code defects

Linter or scanner settings weakened

High

The change makes a linter, type checker or scanner check less instead of fixing what it found: it ignores a rule, excludes a source folder, turns strict off, lowers a rule's level or accepts a finding in a baseline file. Skylos compares each tool's settings at the base and after the change.

Languages
Python tool settings (Ruff, Flake8, Pylint, mypy, Pyright, Bandit), TypeScript and ESLint, Biome, golangci-lint, Cargo lints, pre-commit, scanner settings (Semgrep, SonarQube, CodeQL, gitleaks, detect-secrets, Trivy, OSV-Scanner, Snyk, Checkstyle, SpotBugs)
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 always counts it as "checks silenced", which needs a human approval, even the test-only advice.
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

One added line in a settings file silences a whole class of findings for every future change, not just the one that triggered it. Coding agents reach for it when a lint error blocks them, and reviewers rarely read config diffs closely.

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).

reports/queries.py · Python · changed
Removed: def monthly_sales(db, month):Removed:     return db.execute(Removed:         "SELECT sum(total) FROM orders WHERE month = ?", (month,)Removed:     ).fetchone()Added: def monthly_sales(db, month, region):Added:     sql = f"SELECT sum(total) FROM orders WHERE month = ? AND region = '{region}'"Added:     return db.execute(sql, (month,)).fetchone()
pyproject.toml · TOML · changed
[project]name = "reports"version = "2.1.0" [tool.ruff.lint]select = ["E", "F", "S"]Added: ignore = ["S608"]

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).

pyproject.toml · TOML · changed
[project]name = "reports"version = "2.1.0" Added: [tool.ruff]Added: extend-exclude = ["reports/proto"]Added:  [tool.ruff.lint]select = ["E", "F", "S"]
2 committed files the change leaves alone

reports/queries.py: same as in the flagged example.

reports/proto/orders_pb2.py · Python
# Generated by the protocol buffer compiler.  DO NOT EDIT!from google.protobuf import descriptor_pool as _descriptor_pool DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b"\n\x0corders.proto")

Why Skylos leaves it alone

The new exclude leaves out only generated protobuf code (*_pb2.py), which was never the project's to lint. An exclude counts only when it removes a source file the tool was checking; build output, vendored, generated and migration files do not count.

More languages

JSON

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).

tsconfig.json · JSON · changed
{  "compilerOptions": {    "target": "ES2022",Removed:     "strict": true,Added:     "strict": false,    "outDir": "dist"  },  "include": ["src"]}
1 committed file the change leaves alone
src/user.ts · TypeScript
export function displayName(user: { name?: string }): string {  return user.name ?? "anonymous";}

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).

tsconfig.json · JSON · changed
{  "compilerOptions": {    "target": "ES2022",    "strict": true,Added:     "skipLibCheck": true,    "outDir": "dist"  },  "include": ["src"]}
1 committed file the change leaves alone

src/user.ts: same as in the flagged example.

Why Skylos leaves it alone

skipLibCheck stops type-checking the .d.ts files of installed packages; the project's own code is still checked as strictly as before. Skylos does not count it as a weakening.

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. For each changed file, finds the tools that read it (for example pyproject.toml for Ruff, Flake8, Pylint, mypy, Pyright and Bandit; tsconfig*.json; ESLint configs and package.json; .golangci.yml; .semgrepignore; .secrets.baseline), and builds each tool's settings from all its files in that folder, at the base and after the change. Moving settings between files the tool reads together is not a change; settings built at run time are not read.
  3. Reports newly ignored rules (for Ruff only codes a selected rule covers), newly excluded paths, rules removed from a selection or a preset dropped, levels lowered (strict off, a rule from error to warn or off), and new allowed findings such as baseline or ignore-file entries.
  4. A new exclude or ignore pattern counts only when it matches a source file the tool checked; build output, vendored, generated and migration files never count, and one that matches only test files is advice. skipLibCheck is not a weakening. The first settings of a brand-new package weaken nothing.

How to fix it

Keep the rule on and fix the code it found. Here, pass the region as a query parameter instead of formatting it into the SQL string. If one line really is safe, silence that line with a reason rather than the rule for the whole project.

Fix · Python
def monthly_sales(db, month, region):    sql = "SELECT sum(total) FROM orders WHERE month = ? AND region = ?"    return db.execute(sql, (month, region)).fetchone()

When it can be wrong

  • A deliberate policy change, such as dropping a noisy rule the team agreed to stop using, is reported. That is intended: it asks a reviewer to confirm it.
  • A config built at run time (an ESLint config returned by a function, spread from another object, or read from a variable) contributes nothing, so weakening done there 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.