SKY-A125 · AI-code defects
Scanner suppression marker added
Code-scanning platforms such as DeepSource, Checkov, Trivy, CodeQL and SonarQube read special comments that tell them to stop reporting a line, a resource or a file. SKY-A125 reports a change that adds one of these markers.
- Languages
- Any file with comments (Python, JavaScript/TypeScript, Go, Java, PHP, Ruby, C/C++, Terraform, YAML, shell, Dockerfiles and more)
- Turned on by
skylos . --ai-defects --diff origin/main(or-a) on a change; alsoskylos done- Quality gate
- counted toward the gate limits (full and diff scans). Counts toward
max_ai_defectswhen the scan has a change to compare.skylos donelists it underguardrail_tampering, which advises by default. - Finding type
- review
Why it matters
The marker hides a finding from a check that runs somewhere else, often in CI after the pull request is opened. A coding agent that cannot make that check pass can add one line, and the reviewer sees a comment rather than the weakness it hides.
What Skylos flags
import json def load_settings(path): try: with open(path) as handle: return json.load(handle)Removed: except (OSError, ValueError):Added: except Exception: # skipcq: PYL-W0703 return {}What Skylos leaves alone
import json def load_settings(path): try: with open(path) as handle: return json.load(handle)Removed: except (OSError, ValueError):Added: except Exception: # nosemgrep return {}Why Skylos leaves it alone
In Python, JavaScript/TypeScript, Go, Rust, Java/Kotlin and C# files, nosemgrep and NOSONAR belong to SKY-A118, which skylos done reports. SKY-A125 leaves them alone there so the same comment is not reported twice.
More languages
HCL
Flagged
resource "aws_s3_bucket" "invoices" { bucket = "acme-invoices"} resource "aws_s3_bucket_public_access_block" "invoices" {Added: #checkov:skip=CKV_AWS_54:partner portal reads the bucket bucket = aws_s3_bucket.invoices.id block_public_acls = trueRemoved: block_public_policy = trueAdded: block_public_policy = false ignore_public_acls = trueRemoved: restrict_public_buckets = trueAdded: restrict_public_buckets = false}Not flagged
# Infrastructure checks Checkov scans every Terraform change in CI.Added: Added: Never add `#checkov:skip=CKV_AWS_54` to a bucket that holdsAdded: customer data; ask the platform team instead.Why Skylos leaves it alone
Markdown, reStructuredText and plain-text files are not read: a marker there is being explained, not used.
How Skylos decides
- Runs with
--ai-defectswhen there is a change to compare: in a diff scan (--diffor--diff-base), in a full scan of a Git checkout with uncommitted changes, and inskylos done. It compares each changed file at the base with the same file in the working tree. - Reads files whose comment style it knows:
#(Python, Ruby, shell, YAML, Terraform, Dockerfile),//and/* */(C-family, Go, Java, JavaScript/TypeScript, Swift, Dart), PHP,--(SQL, Lua) and HTML-style markup. Documentation files, test files, generated files and vendored folders are left out; markers in tests are only counted. - Looks for markers inside comments only: DeepSource
skipcq, JetBrains/Qodananoinspection, Qltyqlty-ignore, CodeScene@codescene(disable...), CodeQLcodeql[...]andlgtm[...], Checkovcheckov:skip=, Trivytrivy:ignore:(andtfsec:ignore:) and KICSkics-scan ignore.NOSONARandnosemgrepcount only in languages SKY-A118 does not read, such as PHP, Ruby, Terraform and YAML. - Reports a marker only on a line the change added, and only when the file now holds more of that marker than at the base, so moved or reindented lines are not new.
- The message names the tool, what it stops reporting (this line, the next line, the resource block, the whole file), the rule IDs and the reason, or says that none was given. At most 20 markers are listed.
How to fix it
Fix what the platform reported. Here, catch only the errors a bad settings file can raise. If a marker really is right, keep it as narrow as the tool allows, write the reason after it and let a reviewer confirm it.
import json def load_settings(path): try: with open(path) as handle: return json.load(handle)Removed: except Exception: # skipcq: PYL-W0703Added: except (OSError, ValueError): return {}When it can be wrong
- A deliberate, reviewed marker is still reported, with its reason quoted. That is intended: the reviewer decides.
- A file whose name or folder does not look like a test is treated as code, so a marker in a test helper under another folder is reported.
- Snyk Code's
deepcode ignoreand Codacy have no marker the rule reads, so those are not reported.
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
An inline
# skylos: ignore[SKY-A125]on the reported line does not silence it in Skylos 5.6.0: this rule reports a path relative to the project, and the inline-ignore lookup does not match it. Use the setting below.Python except Exception: # skipcq: PYL-W0703 # skylos: ignore[SKY-A125] fallback[tool.skylos] ignore = ["SKY-A125"]turns the rule off for the project. Forskylos done, setguardrail_tampering = "off"under[tool.skylos.done.checks]in the base branch.