SKY-A119 · AI-code defects
Linter or scanner settings weakened
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 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-reviewalways counts it as "checks silenced", which needs a human approval, even the test-only advice. - Finding type
- review
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
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()[project]name = "reports"version = "2.1.0" [tool.ruff.lint]select = ["E", "F", "S"]Added: ignore = ["S608"]What Skylos leaves alone
[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
# 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
{ "compilerOptions": { "target": "ES2022",Removed: "strict": true,Added: "strict": false, "outDir": "dist" }, "include": ["src"]}1 committed file the change leaves alone
export function displayName(user: { name?: string }): string { return user.name ?? "anonymous";}Not flagged
{ "compilerOptions": { "target": "ES2022", "strict": true,Added: "skipLibCheck": true, "outDir": "dist" }, "include": ["src"]}1 committed file the change leaves alone
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
- 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. - For each changed file, finds the tools that read it (for example
pyproject.tomlfor Ruff, Flake8, Pylint, mypy, Pyright and Bandit;tsconfig*.json; ESLint configs andpackage.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. - 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 (
strictoff, a rule fromerrortowarnor off), and new allowed findings such as baseline or ignore-file entries. - 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.
skipLibCheckis 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.
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 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"