This file is the repo-local glossary for public Skylos terminology and emitted
rule IDs. Keep it aligned with README.md, translated READMEs in
docs/i18n/, docs/*.md, CLI help text, and rule implementations.
Rule IDs use a stable public prefix:
| Prefix | Meaning |
|---|---|
SKY-D |
Security and danger findings |
SKY-S |
Secrets findings |
SKY-SCA |
Software composition findings, including dependency vulnerabilities and publisher review signals |
SKY-SC |
Security contract regression findings |
SKY-A |
AI-defect verification findings |
SKY-L |
Logic, AI-code mistake, and resilience findings |
SKY-Q |
Quality, complexity, coupling, and architecture findings |
SKY-C |
Structure and clone findings |
SKY-P |
Performance findings |
SKY-U, SKY-DC, SKY-UC |
Dead-code, LLM dead-code report, and unreachable-code findings |
SKY-T |
Typing practice findings |
SKY-F |
Framework practice findings |
SKY-R |
Repository policy findings |
SKY-E |
Analyzer inventory / export findings |
SKY-G |
Raw Go engine findings before remapping |
SKY-DEP |
Kubernetes deployment exposure findings |
SKY-GPU |
GPU release compatibility findings |
SKY-CIRC |
Circular dependency finding |
| Term | Meaning |
|---|---|
| Skylos | Local-first static analysis and PR gate for dead code, security, secrets, quality, dependency, and AI-code issues. |
| Local-first | Core static analysis runs on the developer machine or CI runner without requiring cloud upload or LLM calls. |
| Core scan | skylos .; dead-code focused scan. |
| Full audit | skylos . -a; enables security, secrets, dependency, quality, and AI-defect checks in addition to dead code. |
| Generated files | Django migrations, static/**/lib/**, *.min.js, *.min.css and JS/CSS files that open with a vendored-library licence banner. Skipped by default with a one-line count; migrations are still parsed for references and keep security and secret findings. Scan them with --include-generated or [tool.skylos] include_generated = true. |
| Architecture linting | skylos lint checks module import cycles and configured import layers in Python, TypeScript, and JavaScript, plus sibling-package cycles in Python. |
| Dead code | Unused functions, classes, imports, variables, parameters, files, unnecessary exports, and unreachable code. |
| Security / danger | Potentially exploitable code paths such as injection, SSRF, path traversal, weak crypto, unsafe deserialization, and CI/CD supply-chain risk. |
| Secrets | Hardcoded credentials, tokens, API keys, and client-side exposure of server-only values. |
| Quality | Maintainability, complexity, architecture, resilience, typing, framework practice, and repo policy issues. |
| AI defects | Evidence-backed AI-code failure modes such as hallucinated APIs, impossible dependencies, phantom references, and weakened tests. Run with --ai-defects; full audits include it. Output uses the ai_defects bucket; individual findings use category ai_defect. |
| AI code mistakes | Hallucinated security calls, phantom decorators, unfinished stubs, disabled controls, placeholder data, stale mocks, and missing timeouts. |
| AI review | skylos . -a --ai-review; an AI model (and Jev, when TYPESAFE_API_KEY is set) double-checks unused-code issues (every language) and security issues in Python files, and records metadata.ai_review with one verdict per reviewer (real, false_positive, unsure). Display only: nothing is hidden and blocking never changes. Skylos Cloud shows it as Confirmed by AI, AI disagrees, AI unsure or Found by AI only. |
| Coding agents | Skylos features for code written by AI coding agents: skylos done, agent-loop hooks, project standards, skylos verify, and in Skylos Cloud the Coding agents page, Agent checks, agent rules and Bot approvals. |
| AI app safety | Checks on the AI features of your own application: skylos discover, skylos defend and skylos agent test. Skylos Cloud shows skylos defend results under AI app safety. |
| Jev | An outside dead-code model (TypeSafe jev-1.13.0) that --ai-review and skylos agent verify can use as a second reviewer. Needs TYPESAFE_API_KEY. |
| Security deep | skylos agent security-deep .; three-stage security workflow for threat-model context, static threat tracing, discovery/validation, and remediation handoff, equivalent to skylos agent audit . --deep. |
| Threat trace | Static source-to-sink evidence showing how user-controlled input reaches a sensitive sink, recorded on security-deep findings and run artifacts. |
| Agent verification (pre-deployment) | Part of AI app safety. skylos defend .; deterministic static verification of AI-agent guardrails before deployment — tool safety, output validation, prompt-injection exposure, PII filtering, model pinning, and ops checks — scored and gateable in CI. Formerly described as "LLM app defense". Check ids are kebab-case plugin ids (e.g. no-dangerous-sink), distinct from the SKY-D260–D267 static rules. |
| LLM integration inventory | skylos discover .; maps every LLM call, agent tool, prompt site, input source, and output sink in the codebase — SDK calls, agent frameworks (incl. OpenAI Agents SDK, Claude Agent SDK, Google ADK), MCP servers and their tools, and direct HTTP calls to LLM APIs or OpenAI-compatible gateways. Feeds skylos defend. |
| Evidence report | skylos defend . --format md; auditor-facing markdown artifact with integration inventory, per-check results, OWASP LLM + Agentic coverage, regulatory framework evidence, remediation appendix, and attestation. |
| Attestation digest | Reproducible SHA-256 over scanned file contents, policy hash, plugin set, OWASP selection, filters, integration inventory, scores, and full check evidence; emitted in defend JSON/md/SARIF output. Identical trees, flags, policy, plugin set, and Skylos version reproduce identical digests; timestamps are excluded. |
| Framework evidence | Defend check results mapped to EU AI Act, NIST AI RMF, and ISO/IEC 42001 controls with strict "evidence toward" semantics — never a compliance determination. |
| Prompt templates | Trusted files passed with --prompt-template KIND=PATH to skylos agent commands that extend built-in LLM prompts without replacing safety and JSON-output contracts. Repository config cannot set them; [tool.skylos.templates] is not read. |
| Vibe dictionary | Project-specific keyword extensions under [tool.skylos.vibe] for phantom security names, credential names, sensitive files, timeout-required calls, and extra random.* functions that SKY-L013 treats as insecure for security values (extra_insecure_random_funcs). |
| Quality gate | A threshold-based pass/fail decision used locally or in CI. Critical security issues, secrets, and AI-code issues at block_ai_defect_severities (default ["CRITICAL"]) fail it regardless of counts. Every run ends with a verdict line and its reasons: PASSED, FAILED, or INCOMPLETE — could not decide (exit 2) when required analysis did not finish; --format json carries it as the top-level gate object. Files that were not analysed (a parse error, a missing language engine) are a coverage warning under a PASSED or FAILED verdict, not exit 2, unless --strict or require_complete = true asks for complete coverage or most of the code was not analysed. |
| Risk review | skylos cicd risk-review --base REF; the GitHub check "Skylos risk review" (skylos cicd init --risk-review). Lists the risk classes a pull request contains. With risks, the check fails until a person with write access approves the head commit; approvals from bot accounts and approvals of older commits do not count. While it fails on a pull request, the job keeps the label skylos:needs-human on it and removes it when the check passes. Exit 0 pass, 1 needs a human approval, 2 could not decide. Settings: [tool.skylos.approval] at the base. See docs/risk-review.md. |
| Risk class | One of the nine facts the risk review reports, each needing a human approval: tests_weakened, auth_removed, dependency_changed, ci_weakened, checks_silenced, secret_added, guardrail_config_changed, migration_changed, large_diff. Rule findings map to classes by rule ID; findings skylos done reports only as advice are listed and need no approval. The names are shared with Skylos Cloud. |
| Eligible (risk review) | No risk class found and every class checked: an approval from anyone, a review bot included, is enough. An incomplete analysis is never eligible. |
| Needs-human label | skylos:needs-human, the GitHub label the risk review job adds to a pull request that exits 1 and removes when it exits 0 (exit 2 leaves it alone; merge-group and local runs never touch it). The job creates the label in the repository the first time. is:pr is:open label:skylos:needs-human lists every pull request waiting on a person. A failed label update prints Could not update the skylos:needs-human label: <reason> and never changes the exit code. |
| Change map | skylos done map --base REF; the MCP tool change_map. Lists each changed Python or TypeScript/JavaScript function, method and class with its old and new code, calls added and removed, callers (and whether they were updated), removed security checks, breaking or compatible signature changes and changed values. Computed from the code, not by a model; it has no verdict and never changes the done gate. See docs/change-map.md. |
| Read first (change map) | The three highest-risk production changes in a change map plus every flagged change. |
| Flagged (change map) | A change a person should read before merging: a removed security check, a risky new call, deleted code still called, calls that now resolve elsewhere with unchanged text, a signature change that breaks or silently defaults a caller outside the change, a changed security setting, or a removed validation rejection. |
| Diff-aware scan | --diff <base> limits reporting to changed work so old debt does not drown out the current PR. |
| Baseline | A saved set of accepted existing findings so only new or changed findings fail a gate. |
| Failure origin | skylos done reruns each failing test on the base commit, in a temporary Git worktree, and labels it preexisting (the same test ran there and failed the same way), introduced (it passes there), new_test (it does not exist there; counts as introduced) or undetermined (the base run could not tell: a setup or import error, a different kind of failure, a timeout, changed dependencies). Shown on the receipt as failure_origins and in the Stop-hook message. |
| Suppression | An inline or config-level exception for an intentional finding, usually using skylos: ignore[SKY-...]. Skylos-specific markers (# skylos: ignore[SKY-D211] reason, # skylos: ignore, # noqa: skylos, # pragma: no skylos, ignore-start/ignore-end) suppress findings on their line: the bracketed form only the listed rules (dead code by its ID: SKY-U001 functions and methods, SKY-U002 imports, SKY-U003 variables, SKY-U004 classes, SKY-U006 parameters), the bare form every rule. skylos: ignore, skylos: ignore[...] and ignore-start/ignore-end work in every analysed language for dead code, security, quality and secrets. In Go, Java, Kotlin, C#, PHP, Dart, Rust, C/C++, Shell and TS/JS they are read only from real comments (# in Shell and PHP; // or a one-line /* */ in the others; the directive must open the comment): text inside a string literal never counts, and a file whose strings or comments cannot be followed to the end honours no directive. Python matches # skylos: ignore on the line. Other tools' markers (#nosec, //nolint, NOSONAR, @SuppressWarnings, #pragma warning disable) do not hide Skylos findings. ignore = ["SKY-U001"] in [tool.skylos] turns off exactly that rule project-wide (unused functions; SKY-UC001 is unreachable code). A bare # noqa (no codes) is a generic linter marker: it still hides dead-code, quality and LOW/MEDIUM findings, but not a HIGH or CRITICAL security finding (SKY-D*, SKY-S*), which stays reported with bare_noqa_ignored: true and an advice line. # noqa: <code> with Ruff/flake8 codes never suppresses a Skylos security, secret or quality finding; F401/F841 only mark the matching unused import/variable. |
| Smart tracing | --trace; runtime-assisted dead-code verification used to reduce false positives in dynamic Python code. |
| Technical debt | skylos debt .; ranks maintainability hotspots and debt trends. |
| TUI | --tui; screen-only selectable terminal interface with category list, finding list, and detail pane. |
| Pretty output | --format pretty; compact file-grouped terminal output with severity rails, snippets, and copyable file:line locations. |
| Concise output | --format concise; untruncated file:line RULE_ID message output for editors, scripts, and agents. |
| Rule selection | --select SKY-...; exact, case-insensitive rule filtering across scan output formats with automatic analyzer-family enablement. |
| Finding type | Every built-in rule declares finding_type: defect, review, or advice. Type describes the purpose of a check; severity remains separate. Terminal reports group Advice by rule and --expand-advice shows every record. JSON retains complete records for the selected scan scope. Display grouping does not change the assessment or gate limits. See docs/cli-output.md. |
| Scan assessment | Four readouts: Risk, Maintainability, Dead code and Gate, with explicit coverage and scope. New source scans emit assessment version 1 instead of an overall numeric or A–F grade. Independent debt and defend scores are unchanged. See scan assessment. |
| Risk readout | Highest unresolved severity and counts for Defect and Review findings outside dead-code candidate lists. Clean categories and repository size do not dilute it. A risk finding still needs contextual review. |
| Maintainability readout | Advice counts, affected units and measured threshold excess. A proportion is reported only when its relevant rule/language inventory is complete; otherwise its denominator is unavailable. No uncalibrated letter grade. |
| Coverage | Which checks completed, did not run, or could not finish. Not assessed and incomplete do not mean clean. |
| Structured output | --format json, --format llm, or --format github for machines, LLM consumers, and GitHub annotations. |
| Upload / Cloud workflow | Optional upload of scan results to Skylos Cloud; not required for local analysis. |
| Upload contract | skylos/api/upload_contract/v1.json, shared with Skylos Cloud; defines how each finding is normalized, which errors reject a whole upload, and the retry and idempotency rules. The CLI sends X-Skylos-Upload-Contract: 1. See docs/cli-output.md. |
| Idempotency key | A UUID v4 sent as Idempotency-Key on every request of one upload, its retries and its resends, so Cloud never saves or charges the same scan twice. |
| Saved upload | A scan whose upload failed for a temporary reason or was interrupted, kept outside the repository in ~/.skylos/pending-uploads/<repo-id>/ (0600, HMAC-signed with a per-user key, no token) as the exact bytes that were sent. It is resent unchanged, to the same endpoint and linked project, within 7 days; after that it moves to failed/ ("too old to resend safely; rerun the scan"). Files an older version left in the repository's .skylos/pending-uploads/ are never sent. |
skylos upload --retry |
Resends saved uploads with their original keys; skylos upload --list shows them. Sent scans are deleted; rejected ones move to the queue's failed/ folder with the reason. |
| "N findings have no file location; uploading them anyway." | Printed before an upload when some findings have no usable path (none, a placeholder such as unknown, outside the repository, or a folder). They are uploaded with an empty path and stored without a location. |
| "Upload failed: (ref: )" | The upload error format. The reference is Cloud's request id to quote to support. Raw server responses are never printed. |
| "still processing; checking again in Ns" | Cloud answered a retryable 409 (the same upload is still running); the CLI waits as asked, for up to 300 seconds in total. |
| "Scan was already saved by an earlier attempt" | Cloud recognised the idempotency key (Idempotent-Replayed: true); nothing was saved or charged twice. |
| Signed check verdict | The check result Skylos Cloud decided for one commit, signed as an in-toto Statement v1 with a SLSA Verification Summary predicate in an Ed25519 DSSE envelope, bundled with the check summary it commits to (skylos.verdict-bundle/v1). It proves the check ran under that policy with that result; it does not prove the code is safe, and only GitHub OIDC uploads (repository_verified) prove the results came from that commit's code. See docs/verify-verdict.md. |
| Upload trust | How far Skylos Cloud trusts an upload (upload_trust): verified_ci (GitHub or GitLab OIDC), trusted_api_key (a project key an owner or admin marked as a CI key; keys from before per-key trust count for 30 days unless confirmed) or unverified. Uploads with the skylos login key are always unverified, because any coding agent on that machine can read the key: they are stored and shown, but never publish a check or pull request status, mark issues fixed, set a baseline or get a signed verdict. The CLI prints the reason after the upload. |
skylos verify-verdict |
Verifies a signed check verdict offline against the published keys (https://skylos.dev/.well-known/skylos-verdict-keys.json or a local --keys file). --commit, --repository, --project, and --workspace bind it to what is being deployed; --require-repository-verified requires a GitHub OIDC upload bound to the repository; --max-age rejects old verdicts; --require-passed exits 1 unless the level is SKYLOS_POLICY_PASSED (--allow-override also accepts SKYLOS_GATE_OVERRIDDEN; SKYLOS_GATE_DISABLED never passes). Exit 2 means not verified. Needs skylos[verdict] (cryptography). |
| MCP server | Integration surface for AI agents and coding assistants. |
| SCA | Software composition analysis for dependency vulnerabilities and opt-in npm publisher review signals. |
| Not checked (SCA) | A lockfile entry that is the project's own local code, so no advisory database can describe it: pnpm link:/file: directories, local tarballs, peers satisfied by a workspace project, runtime: entries, Cargo workspace members and path crates, Composer path repositories, Bundler PATH gems, pub path and sdk packages, and NuGet Project entries. Listed in sca_coverage.lockfile_not_checked (count not_checked_lockfile_dependency_count); it does not make the dependency scan incomplete or stop the gate. In every lockfile format except gradle.lockfile and packages.lock.json, validated Git, URL, private-registry and Composer branch (dev-*) entries are also not checked and give complete_with_non_registry_sources; contradictory records (a public-registry tarball that does not match its package, an alternate pnpm id, an unrecorded Yarn virtual: peer) stay unresolved and make the scan incomplete. |
| SCA dependency files | Files --sca reads: lockfiles uv.lock, poetry.lock, Pipfile.lock, package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, bun.lock, Cargo.lock, composer.lock, Gemfile.lock, pubspec.lock, gradle.lockfile, packages.lock.json; manifests (exact pins only) requirements.txt, pyproject.toml, setup.cfg, setup.py, package.json, go.mod, *.csproj, pom.xml, Cargo.toml, composer.json, pubspec.yaml. Gemfile and build.gradle(.kts) are code and are not read. A file that cannot be parsed is named in sca_coverage.parse_errors. |
| Cargo dependency scope (SCA) | metadata.dependency_scope of a Cargo.lock advisory, derived from the workspace's Cargo.toml files when the lockfile on disk is scanned: normal, build-only, optional-feature (an optional dependency no default or member-requested feature enables) or dev-only (reached only through [dev-dependencies], or through an optional dependency that only the package's tests/, benches/ and examples/ name, such as clap's unstable-shell-tests). dev-only advisories get low_risk_context.reason = "dev-only-dependency": kept in JSON and gates, left out of the default listing. A lockfile edge the manifests cannot explain leaves the whole lockfile unclassified. |
| Informational advisory (SCA) | A RustSec notice (unmaintained, notice, unsound) served by OSV, recorded as metadata.advisory_informational. unmaintained and notice get low_risk_context.reason = "informational-advisory": kept in JSON and gates, left out of the default listing. |
| npm publisher review | Opt-in --scan-publisher-changes checks direct npm dependencies in a lockfile for a newly observed publisher after a long release gap. publisher_change_findings are WARN review signals, not evidence of compromise or known vulnerabilities; they do not affect the vulnerability count or gate. |
| SBOM | skylos sbom .; offline dependency inventory as CycloneDX 1.6 (default) or SPDX 2.3 (--format spdx-json) JSON, including declared licenses. |
| License policy | [tool.skylos] license_deny / license_allow / license_exceptions / license_severity; flags dependencies whose declared SPDX license violates policy as SKY-SCA-LIC001. Unknown licenses are NOASSERTION and never fire. |
| Malicious package (SCA) | An OSV advisory with an MAL-* ID or alias, a malicious-packages-origins record, or CWE-506. Reported CRITICAL under its SKY-SCA-<id> rule with metadata.malicious: true; never demoted as dev-only and never given a reachability verdict. When OSV is unreachable, the installed ca9 malware feed is checked (metadata.malware_source: "ca9_feed"). |
| Supply-chain policy | [tool.skylos.supply_chain] (internal_packages, private_registries, trusted_registries, min_release_age_hours, block_malware, check_provenance), merged with the synced Skylos Cloud supply_chain block, which can only tighten it. Read by --sca scans (SKY-SCA-SRC001/AGE001) and the install hook. |
| Dependency inventory | analysis_summary.dependency_inventory (skylos.dependency_inventory.v1): up to 10,000 sorted, de-duplicated packages (ecosystem, name, version, direct, dev, file) with total, truncated and complete; uploaded so Skylos Cloud can match new malware advisories after the scan. |
| Supply-chain posture | analysis_summary.supply_chain_posture (skylos.supply_chain_posture.v1): checks lockfile_committed, frozen_install_ci, install_scripts_disabled, release_age_cooldown, actions_pinned (from SKY-D292) and no_pr_target_checkout (from SKY-D290), each pass, fail, not_applicable or unknown; pass needs evidence in the repository. Committed values from ca9.api.hardening_settings are read first. Knows npm 12 and pnpm 10+ script blocking, pnpm 11 allowBuilds/strictDepBuilds and its one-day default cooldown, Yarn 4.15's one-day default, Bun minimumReleaseAge in seconds and pip --uploaded-prior-to; Dependabot's cooldown is named but does not pass it. |
| CI inventory | analysis_summary.ci_inventory (ca9.ci_inventory.v1, from ca9.api.ci_inventory): per GitHub Actions / GitLab CI job its triggers, runner, environment, token write scopes, id-token, secret names, installs, actions, tools, download hosts and publish steps; bounded (200 workflows, 500 jobs) and names only. Uploaded so Skylos Cloud can tell which jobs could have installed a package and what they could reach. |
| Agent hooks inventory | analysis_summary.agent_hooks (ca9.agent_hooks.v1, from ca9.api.agent_config): committed agent/editor hooks, MCP servers and base-URL overrides with redacted commands; skylos_hook: true marks hooks skylos agent install-hooks wrote. Uploaded next to the dependency inventory. |
| Saved OSV answers | The last good OSV answer per exact package version, kept in the user cache and used only when OSV cannot be reached, up to 7 days old. Status complete_with_saved_answers, complete: false. Never read from inside a scanned repository. |
| Reachability tier | metadata.reachability_tier on PyPI advisories: used, imported, unknown, not_imported or unreachable. It orders terminal output and never changes what the gate counts. |
| Upgrade review | --review-upgrades (implies --sca; on in pull request scans from skylos cicd init when dependency checks are selected): with --diff/--diff-base, each npm/PyPI lockfile version change is downloaded old and new by ca9 and compared as data, and a newly added package is reviewed on its own (SKY-SCA-UPG001/UPG002). Never installs or runs the packages. |
| Upgrade API comparison | Part of --review-upgrades: compares the public API of the old and new release of each Python package whose locked version changed, and names your lines that use what was removed (SKY-SCA-API001). The pull request comment says Review these N call sites or No API-level impact found in N call sites (behaviour changes not checked), and Could not check with a reason for anything it could not read. Receipt: analysis_summary.supply_chain_diff.checks.upgrade_api. |
| Hardening exception | [tool.skylos.supply_chain.hardening_exceptions] package = "reason", read from the diff base commit only: SKY-SCA-HRD001 regressions that name that package are skipped and listed in analysis_summary.supply_chain_diff. |
| Plugin table (JS/TS) | skylos/visitors/languages/typescript/data/plugin_facts.json: one row per JS/TS tool (about 200 tools, such as SolidStart, Docusaurus 1 and jscodeshift; data sources are listed in the folder's NOTICE.txt). Each row lists the packages that switch the tool on (also inherited from an enclosing package.json), its config files, the files it loads by convention and the exports it reads (every export unless the row narrows it). Matching files are dead-code roots. Config keys that name entries (e2e.specPattern, stories, appDirectory, entry, ...) are read without running code; when a key is not a literal the tool's default patterns stay and the files the key could select (the row's abstain patterns, else the tool's own patterns; for a directory key such as appDirectory, those patterns under any folder) are abstained: roots whose exports count as read, listed by plugin_facts.abstained_config_keys. Test runners' entries (vitest, jest, mocha, cypress, ...) are roots whose exports stay judged, since a runner reads none. The table only removes findings. Rows whose tool a hand-written module models more precisely (Next.js, Expo Router, react-email) set defer_to and add no entries. |
| Static config reader | Reads JSON, JSONC, YAML, TOML, package.json keys and JS/TS configs whose export is a literal (export default/module.exports, one defineConfig(...)-style call or arrow returning an object, top-level const bindings, spreads, path.join(__dirname, ...), new URL("./x", import.meta.url), regex literals). Nothing is executed; anything else is UNKNOWN, kept per key. |
| Knip config (honoured) | knip.json, knip.jsonc, .knip.json(c), knip.ts/knip.js/knip.config.* (literal export) or package.json#knip. Only keys that remove findings apply: entry (roots with public exports), project, ignore, ignoreFiles, ignoreDependencies, ignoreBinaries, ignoreUnresolved, ignoreExportsUsedInFile, per-workspace workspaces[dir] keys, and ignoreWorkspaces only with knip_ignore_workspaces = true. Removed findings move to suppressed with reason knip <key>; analysis_summary.knip_config lists honoured and unread keys. Turn it off with knip_config = false. |
| Strict dependencies | [tool.skylos] strict_dependencies = true: SKY-Q408 also reports production source of a published package whose dependency only an ancestor package.json declares. Off by default, where analysis_summary.npm_dependency_analysis.ancestor_declared_production_imports counts those imports instead. |
| Symlink safety | Checks for file operations that follow repository-controlled symbolic links across the intended scan or output boundary. |
| Mode | Command | Intended Use |
|---|---|---|
| Rich/default | skylos . |
Existing full terminal report. |
| Pretty | skylos . --format pretty |
Human terminal triage with grouped findings and copyable locations. |
| Concise | skylos . --format concise |
Editors, test scripts, and agents that need untruncated file:line RULE_ID message findings. |
| JSON | skylos . --format json or skylos . --json |
Structured machine output. |
| LLM | skylos . --format llm or skylos . --llm |
LLM-oriented structured report with code context. |
| GitHub | skylos . --format github or skylos . --github |
GitHub annotation output. |
| TUI | skylos . --tui |
Screen-only selectable keyboard-driven terminal triage. |
See docs/cli-output.md.
Rule IDs are unified across languages where the same vulnerability exists.
| ID | Severity | Name | Languages / Scope | CWE / OWASP |
|---|---|---|---|---|
| D200 | varies | Dangerous function call family | Python | wrapper for D201-D210, D233, D235, D250 |
| D201 | HIGH-CRITICAL | Dynamic code execution: eval (PHP: eval, create_function, preg_replace with the /e modifier, and assert() of request data; CRITICAL with request data, HIGH for other non-constant code; TS/JS also mathjs eval/evaluate/compile/parse (CRITICAL) and notevil/safe-eval/static-eval (HIGH) of request data) |
Python, TS/JS, PHP, audit | CWE-95 / A03 |
| D202 | HIGH-CRITICAL | Dynamic code execution: exec, new Function, string timers; TS/JS also vm.runInContext/runInNewContext/runInThisContext/compileFunction and new vm.Script of request data (CRITICAL) |
Python, TS/JS | CWE-95 / A03 |
| D203 | CRITICAL | OS command execution: os.system, os.popen / process sinks; Java/Kotlin Runtime.getRuntime().exec(...) (HIGH; LOW and hidden by default for a fixed command string or array); PHP exec, system, shell_exec, passthru, popen, proc_open, backticks and pcntl_exec with a command that is not request data but not constant either (HIGH; LOW and hidden by default when the command is fixed and every inserted value is a number or an escapeshellarg() argument outside quotes) |
Python, Java, Kotlin, PHP | CWE-78 / A03 |
| D204 | CRITICAL | Unsafe deserialization: pickle.load, pickle.Unpickler(...).load() (also through a subclass that does not define find_class), cloudpickle.load, pandas.read_pickle and language equivalents |
Python, Java, Kotlin, PHP, audit | CWE-502 / A08 |
| D205 | CRITICAL | Unsafe deserialization: pickle.loads, cloudpickle.loads |
Python | CWE-502 / A08 |
| D206 | HIGH | Unsafe YAML load: yaml.load/load_all without a data-only loader (SafeLoader, CSafeLoader, BaseLoader, CBaseLoader), yaml.unsafe_load(_all), yaml.full_load(_all), ruamel YAML(typ="unsafe") |
Python | CWE-502 / A08 |
| D207 | MEDIUM | Weak hash: MD5 | Python, TS/JS, Go, Java, Rust | CWE-328 |
| D208 | MEDIUM | Weak hash: SHA1 | Python, TS/JS, Go, Java, Rust | CWE-328 |
| D209 | HIGH | Shell execution: subprocess with shell=True, subprocess.getoutput/getstatusoutput, asyncio.create_subprocess_shell |
Python | CWE-78 / A03 |
| D210 | HIGH | TLS verification disabled (requests verify=False, ssl._create_unverified_context(), TS/JS rejectUnauthorized: false and NODE_TLS_REJECT_UNAUTHORIZED=0, Go InsecureSkipVerify: true, Rust reqwest/native-tls builders accepting invalid certificates or hostnames, curl ssl_verify_peer(false) or ssl_verify_host(false), openssl set_verify(SslVerifyMode::NONE) and a rustls ServerCertVerifier whose verify_server_cert only returns ServerCertVerified::assertion()). Like D346, not reported in test code: Python test modules (test_*, *_test.py, conftest.py, under tests/ or test/), TS/JS test files (.test./.spec., test/tests/__tests__ directories), Go _test.go files and test-support files (import testing and take a testing.TB/*testing.T), Rust tests//benches/ files, build.rs and #[cfg(test)]/#[test] code |
Python, TS/JS, Go, Rust | A02 |
| D211 | CRITICAL | SQL injection | Python, TS/JS, Go, Java, Kotlin, C#, PHP, Rust, audit | CWE-89 / A03 |
| D212 | CRITICAL | Command injection. In TS/JS, X.exec(...) is a command sink only when the file loads a command-execution module: child_process, node:child_process, shelljs, or remote/container exec (ssh2, node-ssh, dockerode; there conn/connection are not treated as database handles unless a database driver is also loaded). Without one it is RegExp.prototype.exec or another library method; a proven RegExp receiver is never a command sink, nor is a receiver imported or required from a database package (const { R } = require("redbean-node"), pg, mysql2, knex, sequelize, typeorm, kysely, drizzle-orm, ...). A TS/JS exec whose whole command is a string literal gets low_risk_context.reason = "constant-argument" (kept in JSON and gates, left out of the default listing), as for D203/D209 |
Python, TS/JS, Go, Java, Kotlin, C#, PHP, Rust, Ruby (explicit Kernel calls), Dart, Shell, audit | CWE-78 / A03 |
| D215 | HIGH | Path traversal and archive extraction traversal | Python, TS/JS, Go, Java, Kotlin, C#, PHP, Rust, Dart, Shell | CWE-22 / A01 |
| D216 | CRITICAL | Server-side request forgery | Python, TS/JS, Go, Java, Kotlin, C#, PHP, Rust, Dart, Shell, audit | CWE-918 / A10 |
| D213 | HIGH | Hugging Face trust_remote_code=True: loading the model or dataset imports and runs Python files from its repository. MEDIUM when revision= pins a commit SHA or the path is a local directory; a non-literal value is the caller's choice and is not reported |
Python | CWE-94, CWE-829 / A08 |
| D217 | CRITICAL | Raw SQL / ORM SQL injection: Django .objects.raw(), QuerySet.extra() (select values, where/tables/order_by entries) and RawSQL(), peewee Model.raw(). SQLAlchemy text() and pandas read_sql are reported once, as D211 |
Python | CWE-89 / A03 |
| D218 | MEDIUM | Conditional URL scheme audit; unresolved cases are diagnostics | Python | CWE-918 |
| D220 | CRITICAL | SQL injection in added code / diff validation | MCP code-change validator | CWE-89 / A03 |
| D223 | MEDIUM | Undeclared third-party dependency | Python | supply-chain |
| D226 | CRITICAL | XSS: unsafe DOM or HTML rendering (Go: request input converted to an html/template safe type such as template.HTML; Java/Kotlin: request data written to a servlet response writer (HIGH), Kotlin also Ktor respondText(..., ContentType.Text.Html); C#: request input in HtmlString, Html.Raw or MarkupString, HIGH; PHP: Drupal Markup::create() and Blade {!! !!} of request data, HIGH; TS/JS: Angular DomSanitizer.bypassSecurityTrust* of a non-constant value, HIGH from the URL or browser storage, MEDIUM otherwise) |
Python, TS/JS, Go, Java, Kotlin, C#, PHP, audit | CWE-79 / A03 |
| D227 | HIGH | XSS: unsafe template rendering | Python | CWE-79 / A03 |
| D228 | HIGH | XSS: unescaped HTML output (Go: request input written to an HTML HTTP response; PHP: request data printed by echo, print, <?= ?>, printf, die/exit, print_r/var_export/var_dump; Rust: request data inserted by format!/write! into a template with HTML markup) |
Python, TS/JS, Go, C#, PHP, Rust | CWE-79 / A03 |
| D229 | CRITICAL | XPath injection: request data in a javax.xml.xpath.XPath compile/evaluate expression or dom4j DocumentHelper.createXPath |
Java | CWE-643 / A03 |
| D230 | HIGH | Open redirect (Java/Kotlin: Spring "redirect:" views, RedirectView, servlet sendRedirect; Kotlin also Ktor respondRedirect) |
Python, TS/JS, Go, Java, Kotlin, C#, audit | CWE-601 / A01 |
| D231 | HIGH | CORS misconfiguration: wildcard origin with credentials; wildcard origin (CORSMiddleware, flask-cors) in a module whose app has state-changing routes without an auth guard (reported on the origin setting; HIGH when one of those routes is a SKY-D283 privileged route, MEDIUM otherwise; open means the SKY-D283 test without the action word); a literal Access-Control-Allow-Origin: * key in a response dict (any module); a header (dict, subscript or set/add/setdefault, including an f-string) echoing the request's Origin without a membership, equality or fullmatch allowlist check that guards the header, an early reject or a reset to a fixed origin, or a same-module helper returning such a check. A substring test against a string, a prefix check, an ignored result, the wrong branch, a fullmatch pattern with a .*/.+ run, or an allowlist containing * or null does not count. A wildcard middleware in a module that only serves reads, or whose routes something may authenticate, is not reported |
Python | CWE-942 / A05 |
| D232 | CRITICAL | JWT verification disabled or unsafe algorithm | Python | A02 |
| D233 | MEDIUM-CRITICAL | Unsafe deserialization: marshal.load(s), shelve.open, jsonpickle.decode, dill.load(s), dill.Unpickler; Java XMLDecoder, XStream fromXML with AnyTypePermission (HIGH, CRITICAL with request data) or without explicit type permissions (MEDIUM, HIGH with request data: XStream has an allowlist by default from 1.4.18), SnakeYAML load without SafeConstructor (MEDIUM, HIGH with request data: safe by default from SnakeYAML 2.0), Jackson enableDefaultTyping or activateDefaultTyping with LaissezFaireSubTypeValidator, @JsonTypeInfo(use = Id.CLASS/MINIMAL_CLASS) (MEDIUM), Kryo setRegistrationRequired(false); C# BinaryFormatter, SoapFormatter, NetDataContractSerializer, LosFormatter and ObjectStateFormatter deserialization (HIGH, CRITICAL with request data), Json.NET TypeNameHandling other than None (HIGH, MEDIUM with a SerializationBinder), new JavaScriptSerializer(new SimpleTypeResolver()) (HIGH); TS/JS node-serialize unserialize, serialize-to-js deserialize and funcster deepDeserialize of a non-literal (HIGH, CRITICAL with request data) and js-yaml 3 load/loadAll of request data (HIGH) |
Python, Java, Kotlin, C#, TS/JS, Rust | CWE-502 / A08 |
| D234 | HIGH | Mass assignment | Python | A01 |
| D235 | HIGH | Remote command execution via exec_command |
Python | CWE-78 |
| D236 | HIGH-CRITICAL | XML external entity (XXE): an XML parser created and used without disabling DTDs or external entities; TS/JS: libxmljs parseXml/parseXmlString with noent: true and the libxml2 XML_PARSE_NOENT parse option (HIGH, CRITICAL when request data is parsed) |
Java, Kotlin, TS/JS | CWE-611 / A05 |
| D237 | CRITICAL | Expression, JNDI or script injection: request data evaluated as SpEL, OGNL, MVEL, EL or JEXL, looked up through JNDI, or run by a script engine or Groovy | Java, Kotlin | CWE-917 / CWE-94 / CWE-74 / A03 |
| D238 | HIGH | NoSQL injection: request data as a MongoDB/Mongoose query object or $where, or a $where string built from a function parameter |
TS/JS | CWE-943 / A03 |
| D239 | CRITICAL | LDAP injection: request data in the base DN or filter of a JNDI DirContext, Spring LdapTemplate or UnboundID LDAPConnection search |
Java | CWE-90 / A03 |
| D240 | CRITICAL | MCP tool description poisoning | Python | A03 |
| D241 | HIGH | MCP unauthenticated transport | Python | A07 |
| D242 | HIGH | MCP permissive URI / path traversal | Python | A01 |
| D243 | CRITICAL | MCP server bound to 0.0.0.0 |
Python | exposure |
| D244 | CRITICAL | MCP hardcoded secrets in tool params | Python | CWE-798 |
| D245 | HIGH | Dynamic require() with variable argument |
TS/JS | CWE-94 / A03 |
| D246 | HIGH | JWT decode without verification | TS/JS | CWE-347 / A02 |
| D247 | MEDIUM | CORS wildcard origin | TS/JS | CWE-942 / A05 |
| D248 | MEDIUM | Hardcoded internal URL. Not reported in test code or in test-runner configuration (cypress.config.ts, playwright.config.ts, jest.config.js, karma.conf.js and the like) |
TS/JS | CWE-798 |
| D250 | MEDIUM | Insecure randomness for security-sensitive values | Python, TS/JS, Go, Java | CWE-330 |
| D251 | HIGH | Sensitive data in logs | Python, TS/JS, Rust | CWE-532 |
| D252 | MEDIUM | Insecure cookie flags, including Rust session cookies added to a cookie jar without Secure. | Python, TS/JS, Go, Java, Rust | CWE-614 |
| D253 | MEDIUM | Timing-unsafe comparison: a server secret or stored credential compared with request input (or an environment/config secret with a caller-supplied value) by ==/=== |
TS/JS | CWE-208 |
| D254 | HIGH | HTTP session trust boundary violation | Java | CWE-501 |
| D255 | CRITICAL | File inclusion: request data chooses the path of PHP include/require/include_once/require_once (reported as D215 before this release) |
PHP | CWE-98 / A03 |
| D257 | HIGH | Android WebView JavaScript bridge: addJavascriptInterface in a class (or file, for top-level code) that sets javaScriptEnabled = true / setJavaScriptEnabled(true); every page the WebView loads can call the bridge's @JavascriptInterface methods |
Kotlin | CWE-749 / A05 |
| D258 | MEDIUM | Android WebView file URL access: allowFileAccessFromFileURLs or allowUniversalAccessFromFileURLs set to true (property or setter form), so a file:// page can read other local files or any origin |
Kotlin | CWE-200 / A05 |
| D260 | HIGH-CRITICAL | Prompt injection scanner | Text, config, prompt, and source files | AI supply-chain |
| D261 | HIGH | Untrusted input to LLM prompt | Python | OWASP LLM01 |
| D262 | CRITICAL | Unsafe LLM output handling | Python | OWASP LLM05 |
| D263 | HIGH | Sensitive data sent to LLM | Python | OWASP LLM02 |
| D264 | HIGH | Excessive agent tool privilege | Python | OWASP LLM06 |
| D265 | HIGH-CRITICAL | Unsafe ML model deserialization | Python | OWASP LLM04 |
| D266 | CRITICAL | AI config instruction injection | Agent config and instruction files | OWASP LLM01 |
| D267 | MEDIUM | Unbounded LLM consumption | Python | OWASP LLM10 |
| D270 | MEDIUM | Sensitive data in localStorage / sessionStorage. Like D210, not reported in test code (*.test.*, *.spec.*, *.cy.*, __tests__/, cypress/, e2e/, a top-level test/tests folder): a spec that seeds a token to sign in its fixture user ships to no browser |
TS/JS | CWE-922 |
| D271 | MEDIUM | Error information disclosure in HTTP responses | TS/JS | CWE-209 |
| D280 | HIGH | Next.js mutating API route missing auth checks (a route-local auth call, a project helper that verifies identity, or a rejecting authorization check counts) | TS/JS | A01 |
| D281 | CRITICAL | Untrusted server action input reaching raw SQL text | TS/JS | CWE-89 |
| D282 | HIGH | Webhook handler missing signature verification | Python, TS/JS | CWE-347 |
| D283 | HIGH-CRITICAL | Unauthenticated route that controls a device or the host, deletes data, administers or runs commands (see the SKY-F102 notes) | Python (FastAPI, Flask, Quart, Starlette, Sanic) | CWE-306, CWE-862 / A01 |
| D383 | MEDIUM | A Django form default or a registered Oslo integer option can give openssl genrsa a key size below 2048 bits. Skylos flags the setting that supplies the size. |
Python | CWE-326 |
| D386 | HIGH | OpenSSL encrypts new data with DES, RC2 or RC4, or RustCrypto CBC encrypts with single DES. | Rust | CWE-327 |
| D387 | HIGH | A rusqlite or SQLx write binds an exposed SecretString to a password column. | Rust | CWE-256 |
| D388 | HIGH | A JWT signing key or AES-GCM key is fixed in source. | Rust | CWE-321 |
| D389 | MEDIUM | Unescaped request text is placed between fixed parts of a regular expression. | Rust | CWE-74 |
| D390 | HIGH | A Rust request supplies a buffer capacity for a String or integer Vec. | Rust | CWE-789 |
| D391 | HIGH | An exposed secrecy::SecretString appears in the path or query of a dispatched reqwest request. |
Rust | CWE-598 |
| D392 | MEDIUM | A Rust log or tracing message displays decoded request text that can contain line breaks. |
Rust | CWE-117 |
| D510 | HIGH | Prototype pollution: request data chooses the key of a nested write or reaches an unguarded recursive merge | TS/JS | CWE-1321 |
For D251, a bare sessionId name is not treated as credential evidence by
itself. Explicit authentication-qualified names (such as authSessionId) and
direct member expressions with authentication or cookie-qualified paths remain
findings. D270 storage checks are unchanged.
Python D251 follows credential environment reads, credential prompts and
getpass results through local containers, assigned object fields, aliases and
string formatting into print and logging calls. It requires source evidence;
a variable name alone does not
prove that its value contains a credential. Literal replacements are safe;
unknown helpers named redact are not automatically trusted.
D218 requests review of the intended URL schemes because urllib also supports local-file and other non-HTTP resources. It does not establish attacker control or an exploitable file read. Explicit literal URLs and proven HTTP/HTTPS prefixes or dominating scheme guards do not produce this audit. D216 independently checks whether untrusted input can choose the request host.
Security findings follow the rule of precise taint analysis: a sink is a
listed vulnerability when attacker-controlled input (request data, an upload,
a network message, an archive member, event text from an outside account) is
shown to reach it. When the analysis cannot connect a sink to such input, the
record stays in danger as a review signal: review_item is
{"kind": "unproven_source", "blocking": false}, the message starts "Review
(not listed, not blocking)", listing.reason is unproven-source and gates
do not count it (--all-advice or naming the rule lists it). This covers
Python D215/D324/D325 whose caller provenance stopped incomplete ("callers
not visible"), the TS/JS fetch/axios D216 pattern on a URL no request data
reaches, shell D212/D215/D216 whose only source is the script's own
command-line arguments, and Rust D212/D215 whose only inputs are environment
variables, command-line arguments or a function's parameters
(metadata.rust_source = "operator_input"). Python sink findings (D201-D217, D226-D230, D233,
D245, D265, D324-D326, D357) inside a statement that follows an unconditional
return, raise, continue or break in the same block are not reported:
that code never runs. Flask/Quart request.endpoint, request.blueprint(s)
and request.url_rule come from the application's routing table and are not
request data.
For Python D203, os.system or os.popen with a fixed command string (no
dynamic formatting or Python/shell variables) is LOW: there is no input to
inject. It stays CRITICAL when the fixed command itself deletes broadly,
exfiltrates data, pipes a remote script into a shell, or reads host
credentials. D209 uses the same rule for its shell-string sinks.
Python D212 reports untrusted data reaching a shell command string
(os.system, os.popen, subprocess.getoutput/getstatusoutput,
asyncio.create_subprocess_shell, subprocess.* with shell=True), the
program of os.exec*, os.spawn*, os.posix_spawn* and pty.spawn, and
the script after -c when the program is a shell (["bash", "-c", script],
os.execl("/bin/sh", "sh", "-c", script)). Import aliases are resolved
(import subprocess as sp, from os import system); a local function with
the same name is not a sink. A shell= value that is not a literal False,
None or 0 may enable the shell, so a tainted command is reported there
too. An untrusted argument to a fixed program (["git", "fetch", ref]) is not
command injection and is not reported. shlex.quote/shlex.join clear taint.
Python D201/D202, D205 and command-call rules also follow captured function
values within the module's bounded flow analysis. Capturing pickle.loads,
the builtin eval, or subprocess.run retains that callable's identity even
if its original module name is later rebound. A known data-only replacement
or source-owned function with the same name does not retain the obsolete
library identity. Unknown bindings keep the existing conservative warnings;
this does not add arbitrary cross-file callable tracing.
Python D205 suppresses only proven local pickle.dumps / pickle.loads
round-trips over built-in data. Unknown objects can define reduction hooks;
attributes and cross-function state therefore remain review candidates. The
warning describes pickle's execution capability without asserting that an
unknown input is definitely attacker-controlled.
Python D206 trusts a loader only when it is a data-only PyYAML loader. A name
such as SafeLoader counts only if the module never rebinds it to something
else (SafeLoader = yaml.UnsafeLoader is still reported); an assignment of
yaml.SafeLoader or getattr(yaml, "CSafeLoader", yaml.SafeLoader) is safe.
Python D204 treats a module class that subclasses pickle.Unpickler without
defining find_class like pickle.Unpickler; a subclass that overrides
find_class follows the documented way to restrict loadable globals and is
not reported.
Python D230 preserves tainted redirect targets across conditional assignments.
An unrelated urlparse check or a leading slash alone does not prove safety.
An enforced literal destination allowlist or an unconditional internal route
assignment remains safe. Django's url_has_allowed_host_and_scheme(url, ...)
(or is_safe_url), imported from django.utils.http, clears the checked name
on the branch where it returned true; a redirect on the failing branch, after
the result is ignored, of a different value, or through a local function with
the same name is still reported. redirect and
HttpResponseRedirect/HttpResponsePermanentRedirect with a positional target
keep the rule above: any tainted target, including a plain function parameter.
The other sinks need request data proven to reach the target: Starlette/FastAPI
RedirectResponse, aiohttp/Pyramid HTTPFound, HTTPSeeOther,
HTTPMovedPermanently, HTTPTemporaryRedirect, HTTPPermanentRedirect, the
legacy sinks given only a keyword target (to/redirect_to/location/url),
and a Location header set on .headers[...], a response built in the same
function, a headers={"Location": ...} argument of a *Response call, or
.headers.set/add(...) (a response class setting its own self.headers
defines a sink and is not reported). Request data is a read from the request,
a route parameter or a Tornado argument. It flows through locals, f-strings,
%, string methods, str(), urljoin and other urllib.parse helpers, and
functions defined in the same file. A call into another module (a project
helper such as get_next_url(request)) or any other library ends the flow.
Request data appended after a value (url += "&q=" + q) does not choose the
target, as with CodeQL's string-concatenation sanitizer; after a literal that
does not fix the origin ("https://" + host) it does. The root path's query
or fragment (f"/?next={target}", "/#" + target) and the absolute URL of the
request being served (Flask/Quart request.url/base_url/url_root/
host_url, the same attributes of a parameter annotated as a
Starlette/FastAPI Request, Starlette URL(scope=...), also after
.replace(...) with values that carry no request data) keep the origin. A
bare path such as request.url.path is still request data (//evil.example
is a path).
Proven Tornado RequestHandler argument reads also count as redirect sources,
including values assigned with :=. Local overrides and unrelated methods with
the same name do not establish a request source. A fixed local path segment
such as "/entry/" + slug cannot change the redirect origin; "/" + target
alone is insufficient.
For Python D207/D208, hashlib.md5 / hashlib.sha1 remain findings when
their purpose is unclear; names such as cache_key do not prove the digest
is unrelated to security. An explicit usedforsecurity=False suppresses the
finding.
For TS/JS D207/D208, createHash('md5').update(data) is a low-risk hash
(reported, not listed by default) when the hashed names are not credentials,
identities or certificates. When the hashed value is a parameter of a
module-level helper (export const hash = (data) => createHash('md5')...),
the parameter name proves nothing, so the scan reads the helper's calls in
the scanned JS/TS files (a relative import/require of its module, or a
call in the module itself): a call that passes a credential
(security.hash(req.body.password)) or stores the result under a credential
name (setDataValue('password', hash(x)), password: hash(x)) lists the
finding, with the calls in hash_input_evidence. A helper whose callers hash
other data (a checksum of file contents) stays low-risk; calls through path
aliases or re-exports are not followed.
For Python D211, a query executed on a chained connection or cursor call
(sqlite3.connect(...).execute(q), conn.cursor().execute(q),
engine.connect().execute(q), get_db().executescript(q)) is reported only
when q carries data from a real untrusted source: a web-route, CLI or MCP
tool parameter, request.*, input(), sys.argv, sys.stdin or the
environment. On any receiver, bound parameters, text("... :id") over a
constant (also with .bindparams(...)), SQLAlchemy/SQLModel
select/insert/update/delete constructs, and statements built from a
locally proven SQLAlchemy Table object (notes.insert().values(...),
notes.delete().where(...)) are not findings. Neither is query text built only
from string literals and numbers: a placeholder run such as
",".join("?" * len(ids)) or ", ".join(["%s"] * len(rows)), int(),
float() and len() values, or a name bound to such text in the same scope
(not one rebound in a branch or by a closure's enclosing function). A call
counts as the builtin only when that name resolves to the builtin under
Python's scoping rules: not when a local, enclosing function or module binding
shadows it, after a star import, or when the module writes to builtins
(directly or through an alias), globals() or setattr.
executescript() takes no parameters, so only a tainted or string-built
script is reported there. A Table constructor must resolve
to an unshadowed SQLAlchemy import; unresolved application imports and
function parameters retain findings. A construct with a string-built clause
(.where(f"id = {x}")) or a raw request.* value as a clause is still a
finding. Formatted values passed to .values(...) remain bound parameters.
A tainted text() inside execute() is reported once, on the
text() call. On a SQLite or DuckDB connection (sqlite3.connect(),
duckdb.connect() or its .cursor(), bound in the same scope), a str whose
single quotes were doubled (str(v).replace("'", "''")) placed inside a plain
single-quoted literal is not a finding: those engines do not treat a backslash
as an escape. On other or unknown connections (MySQL and PostgreSQL can),
outside a literal, inside a quoted identifier, after a prefix such as E',
with a !r conversion or next to a comment marker it still is.
Python D211 and D230 require an identified input source before a completed
project analysis presents a security claim. Unresolved candidates remain in
JSON suppressed with sql_provenance or redirect_provenance marked
unknown and safety_proven: false. They do not fail a security gate. A
truncated or changed source index keeps candidates visible as incomplete;
it never proves safety. D218 is a conditional scheme audit and remains an
unknown diagnostic; D216 still reports source-backed SSRF separately.
Operator-owned CLI/environment redirect targets do not establish remote input.
Python D251 follows proven credential inputs into print/logging. Native HTTP response bodies and verified payloads do not inherit the signing key or request credential merely because it was supplied to the API. Request URLs, request headers, response history, whole response objects, unknown transforms and project wrappers retain credential evidence.
For Python D215, Starlette/FastAPI FileResponse and Flask/Werkzeug
send_file are path sinks. send_from_directory is a sink only for its
directory argument, because it joins path with safe_join. Accepted guards: a
resolved path (resolve(), realpath, abspath, normpath) checked with
is_relative_to, relative_to, startswith or commonpath before a
rejecting branch; a membership check against a constant allowlist;
safe_join; and basename. A prefix check on an unnormalized path does not
count as a guard. startswith counts only when the prefix provably ends with a
separator (base + os.sep, base + "/", f"{base}/", os.path.join(base, "")
or a literal such as "/srv/files/"), because /srv/files2/x also starts with
/srv/files; a prefix of only separators proves nothing.
Python D215, D324 and D325 check tainted paths from web routes, MCP/agent
tools, request data and standard input. The request proxy read through its
module (import flask then flask.request.form[...], also quart and
bottle, under any import alias) is the same source as from flask import request; urllib.request and a local object's request attribute are not.
This applies to every Python taint checker (SQL, command, SSRF, XSS, redirect). A path built from a helper's
parameter is followed through the scanned source (imports, assignments,
calls, returns, constructor and dataclass bindings, aliases,
functools.partial, executors, lambdas, containers and their local aliases,
JSON/YAML decoding, Celery delay/apply_async and RQ enqueue arguments)
to every caller that can be resolved. A method call on a receiver that cannot
be resolved is followed only when every function of that name in the scanned
project belongs to one class hierarchy, the name is not a method of a built-in
container, string or file, and the project never calls it on an external
object. It is reported when a resolved chain
starts at request data, a route or MCP tool argument, a Django class-based
view registered by a URL pattern or DRF router, a FastAPI Depends
dependency of a resolved route, a function a deployment file names as a
server or handler, the environ of a WSGI callable or the scope/receive
of an ASGI callable (the complete (environ, start_response) or
(scope, receive, send) signature; only keys the client fills in, such as
PATH_INFO, QUERY_STRING, HTTP_*, wsgi.input, path, query_string
and headers, count, and objects the server or application stores under other
keys do not), standard input, a CGI request variable, a network response,
asyncio stream or recv_into buffer, a downloaded file's content or an
archive member name; metadata.path_provenance lists the steps. A parameter
named request/req counts as request data only in a module that imports a
web framework, and a @<group>.command decorator counts as a CLI when the
group resolves to Click/Typer or the function has Click/Typer parameter
decorators; findings resting on these conventions or on no source at all are
traced the same way. When a caller budget, depth limit, file size budget or
analysis error cuts a chain off before any chain reaches one of those sources,
the finding stays in danger as incomplete but is a review signal, not a
vulnerability: review_item is {"kind": "unproven_source", "blocking": false}, the message starts "Review (not listed, not blocking)", it is left
out of the default listing (listing.reason unproven-source;
--all-advice or naming the rule lists it) and gates do not count it. Precise
taint analysis reports a sink only when attacker input is shown to reach it;
"callers not visible" in library or package code (a public function's
parameter, a CLI or operator argument, configuration) shows no such input.
Otherwise it moves to suppressed as safe (complete scan, no hidden caller,
and every caller passes literals, the module's location, clock or numeric
values, temporary paths, test values or operator input) or unknown (a
caller, receiver, callback, decorator, external base class or public package
API that cannot be resolved); unknown is neither proof of an attack nor of
safety. When a filename-filter body is recognized but its native-string or
runtime assumptions remain unverified, D215 keeps the warning and describes
that validation uncertainty instead of claiming that no check exists. The
local provenance record includes validation_uncertainty; this does not
change severity, source evidence or gate behavior.
A path whose only proven source is the program operator (a CLI
argument or environment variable) is suppressed, unless a project process
launch passes untrusted arguments. An exclusive create (open(p, "x"),
os.open with the os module's O_CREAT | O_EXCL) cannot follow a final
symlink, so D324/D325 skip it while D215 still checks it.
An os.open call proven to include the native O_DIRECTORY flag and only
read access opens a directory descriptor, so it is not a D325 file-content
read. D215 still checks its path; unknown flags and a fallback such as
getattr(os, "O_DIRECTORY", 0) do not establish this exception.
Caller provenance establishes which inputs reach a path, not whether an
attacker can create or replace filesystem entries. Symlink findings state
that additional prerequisite; a filename filter alone does not reject links.
When the traversal proofs (a body-proven filename filter or reject-on-change
guard, a full-match filename pattern, a constant allowlist) show that request
input selects only one filename component, the D324/D325 finding stays reported
as a review item: review_item.blocking is false,
metadata.path_provenance.component_review names the validators and the open
prerequisite. Sources the trace cannot follow (for example the return value of
a call outside the project) are not reported on their own, so they do not block
the review item either; component_review.unresolved_sources and the message
name them as not covered by the validation. Findings share a
review_item.group when the analyzer can establish a common directory, the
same validators and the same unresolved sources. If the directory
is unresolved, each site stays listed separately. A grouped finding names the rest in
listing.combines; the others are combined under its listing.lead. Review
items do not count toward gates. Close the group for a deployment where only
trusted writers control the directory and its parents. A path in a shared
temporary directory never becomes a review item.
A helper-parameter path that resolves to a fixed name in a shared temporary
directory (tempfile.gettempdir(), tempfile.mktemp(), or a /tmp,
/var/tmp or /dev/shm literal, including an environment variable's
default) is reported by D324/D325 with reason "Predictable name in a shared
temporary directory", whoever chooses the name: any local user can create that
entry first. Names that include uuid.uuid4(), secrets tokens or random
values, and private mkstemp/mkdtemp paths, are not reported this way.
D326 needs an extract call that can pass a member (BeautifulSoup's tag.extract()
cannot) and reports shutil.unpack_archive without filter="data". Test
files are scanned too; the literal pytest parameter proof below still applies.
Python D211, D215, D217, D324 and D325 findings reached by such a source carry
metadata.security_evidence (source, sink, path), which SARIF output
renders as codeFlows.
Python D211 also checks the query argument of asyncpg fetch/fetchrow/
fetchval, databases fetch_all/fetch_one/fetch_val and peewee
execute_sql on a database-like or pool receiver. These need data from a
parameter or another untrusted source in the query text: SQL built only from
the module's own values (identifiers it quotes, counts, rows of a constant
table) is not reported there. Because HTTP and cache clients share these
names, a string-built query must also read as SQL, and a plain tainted query
counts only in a module that imports asyncpg, databases or peewee. A
SQLAlchemy text() or pandas read_sql call is reported once, as D211 (no
second D217 finding).
Python D211 can also recognize native SQLite calls on a registered queue worker. It verifies the source-defined registration and decorator, callback argument forwarding, and the native cursor before following caller-supplied row values into SQL text. This proof supports a HIGH finding and leaves the application-specific input origin unresolved. Placeholder counts and bound values are evaluated separately.
Python D211 also reports a Cypher graph query passed to .query(),
.ro_query(), .run(), .execute_query(), .cypher() or .evaluate() when
an f-string or str.format value sits inside a quoted string of the query
text ({id: '{value}'}), as MEDIUM: a quote or backslash in the value changes
the query, whatever escaping helper wraps it. It makes no claim about where the
value comes from (source_status is unresolved), and the text must begin as
a Cypher statement, so prompts and shell commands that mention Cypher are not
query text. A $parameter, a value proven constant, int()/float()
output, a value outside quotes (such as a backtick label) and SQL text are not
reported by this check.
On every D211 sink, a quoted identifier may fill the query text where no
quoted literal is open: psycopg2 quote_ident, or a function in the same
module whose whole body returns its argument wrapped in " with every "
doubled. A psycopg sql.SQL("...") literal composed with sql.Identifier,
sql.Literal or sql.Placeholder is also safe. Calling the quoting function
without using its result, quoting a value placed inside '...', or a lookalike
helper that does not double " is still reported. Numeric values do not carry
SQL: int(), float(), len(), round(), abs(), bool(),
random.randint/randrange/getrandbits and math.floor/ceil/trunc/isqrt.
Python D215 treats werkzeug.utils.secure_filename(...) (imported from
werkzeug, not a local function of that name) as a sanitizer for its return
value; calling it and then using the raw filename is still reported.
Every Python security finding carries its rule's CWE ids in cwe
([{"id": "CWE-89", "name": ...}]), which SARIF output turns into rule
relationships, external/cwe/... tags and CWE taxa.
Python D216 reads the URL from the url= keyword, the first argument of a
verb method (get(url)), or the second argument of request(method, url)
(requests, httpx, aiohttp, urllib3 PoolManager), also on a client created in
the same expression (urllib3.PoolManager().request(...)). An untrusted HTTP
method with a fixed URL is not SSRF, and http.client connections, whose host
is fixed by the constructor, are not checked through request(method, path).
Python D216 needs a real untrusted source (route, CLI or MCP-tool argument,
request data, input(), stdin) that can choose the request host. Not SSRF:
calls through in-process test clients (Django Client/RequestFactory, DRF
APIClient, Flask test_client(), Starlette/FastAPI TestClient,
pytest-django client fixtures in test* functions of test files that have no
route decorator, self.client in Django test cases; a client name counts only when every
binding it resolves to, in the current function, an enclosing function or the
module, creates a test client, and a binding in a nested function or class does
not count; self.client or another self attribute counts only in a Django/DRF
test-case class whose bases are all known test cases or same-module classes,
when every write to that attribute that can reach the instance creates a test
client and the module never rewrites it through setattr, __dict__, vars(),
a client_class assignment or a _pre_setup override; a test-client class name
the module rebinds is not trusted); parameters of a function
decorated with unittest.mock.patch (it is not a PATCH route); methods of a
receiver proven to be an SQLAlchemy/SQLModel session (session.get(Item, id),
session.delete(item): the parameter is annotated with an ORM Session/
AsyncSession, directly, through Annotated[...] or a same-module alias, or
with an annotation another function in the module uses as one; it is bound
from Session(engine), a sessionmaker() factory or Flask-SQLAlchemy's
db.session; or the same receiver also calls commit, add, flush,
refresh, rollback, exec, execute, scalars or query, which HTTP
clients do not have; a receiver bound from requests/httpx/aiohttp stays
an HTTP client); and URLs whose
host is fixed by a literal or by a module-level setting followed by /, ? or
# (not //), written directly or returned by every path of a same-module
helper that has no decorator other than functools.cache/lru_cache. A setting
counts only when its value is a literal scheme://host URL, an environment
variable (os.getenv/os.environ, resolved through the module's imports) or
CLI argument (sys.argv) with a literal name and either no fallback, a None
fallback or such a literal, another such setting, or a name imported from
another module; "https:", "https://" and "" do not fix the host. A name imported from
a web-framework or request-scoped module (flask, werkzeug, quart,
starlette, fastapi, django.http, django.contrib.sessions,
django.core.handlers, rest_framework.request, aiohttp.web*, tornado.web,
sanic, bottle, falcon, pyramid.request, litestar, contextvars, or any
of their submodules) is never a setting. A setting
or helper name does not count where the current or an enclosing function shadows
it (parameter, assignment, for/with/except target, comprehension variable,
lambda argument, import, nested definition, global/nonlocal), nor when the
module rebinds it (a second binding, assignment under global,
setattr(module, "NAME", ...), module.NAME = ...). A module that can rewrite its
globals at run time has no fixed settings: a star import, exec/eval,
reload, a write through globals()/vars()/builtins.globals() or a
module-level locals(), any use of __globals__, f_globals or a module
__dict__, sys._getframe, globals used other than as a call, setattr on
the module with a computed name, a dunder attribute of the module object or
sys.modules (__setattr__, __getitem__, __dict__), getattr(x, "__dict__")-style lookups of those names, a module obtained through
import_module/__import__/inspect.getmodule under any name or
import __main__, or the module object passed to other code. Only the setting's own module is checked: an
assignment from another module (import app; app.BASE = ...) is not seen, and a
setting imported from another module is trusted as is. A fixed-host URL that carries request data in its
query (f"{RENDERER}/render?url={...}") is not reported. urllib.parse.quote
with a safe= argument is not a URL sanitizer.
TS/JS D216 (fetch, axios) reads a URL through names that can only hold
one value: a const, or a let/var that is the name's only binding, found
by lexical scope (also inside template substitutions and + chains). A URL
built only from literals and such names (conditionals included when every
branch is), or one whose literal scheme://host/ prefix fixes the host, is not
reported; a bound call, member, ||/?? or new URL(...) value is dynamic. A name assigned anywhere in the file, shadowed
by a parameter, loop or catch variable, destructured, imported, hoisted by a
var next to other bindings, or in a file using eval/with is not resolved,
except a name imported by name from a project module (./x, @/x, ~/x,
#x) that declares it export const NAME = '...' with a literal (one
re-export hop is followed): fetch(`${UPDATES_URL}?v=${v}`) with
UPDATES_URL = 'https://api.example.com/updates' keeps its fixed host.
A variable URL that request taint (below) does not reach is chosen by the
operator, a stored or admin setting, a constant or a caller outside the
handler, not by an attacker: the fetch/axios finding stays in danger as a
review signal (review_item {"kind": "unproven_source", "blocking": false}, message "Review (not listed, not blocking)"), is left out of the
default listing (listing.reason unproven-source) and is not counted by
gates. A finding with request evidence (security_evidence) stays listed.
await axios.get<T>(url) and await fetch<T>(url) are matched too
(tree-sitter parses the awaited member as the callee of the typed call).
TS/JS request taint (D201, D202, D211, D212, D215, D216, D228, D230, D233,
D236, D238, D510) follows request data inside one handler of one file. Handlers: Express, Fastify, Hapi
and Next.js pages-API functions ((req, res), (request, reply),
(request, h), or a first parameter typed Request, FastifyRequest,
NextApiRequest, NextRequest; a function whose only parameter is an untyped
or any req/request is read only through query, body, params,
headers, cookies and get()/header()/param(), so a helper's
req.path or request.url is not request data), Koa and getServerSideProps functions (first
parameter ctx/context), NestJS methods with @Body(), @Query(),
@Param(), @Headers(), @HostParam(), @UploadedFile() or @Req()
parameters (routing-controllers equivalents too), exported GET/POST/...
functions in a Next.js App Router route file, exported Remix
loader/action functions, and Express-style handlers whose first parameter
destructures the request (({ body, file }: Request, res: Response), typed
Request/FastifyRequest or followed by a res/reply parameter), where
each request field the pattern takes is request data. Sources: req.body/query/params/headers/cookies/ files/url/originalUrl/path/hostname, req.get()/header()/param(), Hapi
payload/state, Koa ctx.request.body, ctx.query, ctx.params,
ctx.headers, ctx.cookies.get(), Next.js await request.json()/formData()/ text(), request.nextUrl.searchParams.get(), request.headers, and the route
params argument. A NestJS parameter piped through ParseIntPipe,
ParseFloatPipe, ParseBoolPipe, ParseUUIDPipe or ParseEnumPipe is not a
source; a TypeScript annotation such as id: number is not proof. Sinks:
SQL text in query/execute/raw/prepare/all/get/run calls whose
literal text is SQL, $queryRawUnsafe, knex whereRaw-style calls and
TypeORM query-builder where/orderBy conditions (D211, CRITICAL);
child_process.exec, also bound as const exec = require('child_process').exec (D212, CRITICAL); mathjs
eval/evaluate/compile/parse (D201, CRITICAL), notevil, safe-eval and
static-eval evaluators (D201, HIGH), and the code of vm.runInContext/
runInNewContext/runInThisContext/compileFunction/new vm.Script (D202,
CRITICAL); a literal vm.runIn*Context code string is read for calls of
sandbox members, and each call is checked with sandbox names mapped to the
sandbox object's values (vm.runInContext('safeEval(x)', { safeEval, x })
with notevil eval and request data in x is D201; 'yaml.load(data)'
with js-yaml 3 is D233); node-serialize unserialize, serialize-to-js
deserialize and funcster deepDeserialize (D233, CRITICAL), js-yaml
load/loadAll when the nearest package.json declares js-yaml below 4
(D233, HIGH: version 3 resolves !!js/function); libxmljs
parseXml/parseXmlString with noent: true (D236, CRITICAL);
fs/fs/promises/fs-extra paths
and res.sendFile/download without root (D215, HIGH); the URL or
host/url option of fetch, axios (also axios.create() instances and
NestJS HttpService), got, undici, superagent, needle, request and
http(s).get/request (D216, HIGH); Express res.send(text) (Express answers
strings as text/html) and HTML literals sent with res.send/write/end, and
Koa ctx.body text that can start with request data or < (D228, HIGH);
res.redirect(url), res.redirect(302, url), ctx.redirect,
reply.redirect, h.redirect, NextResponse.redirect, Response.redirect,
redirect() from next/navigation or Remix, res.location and Location
headers (D230, HIGH); MongoDB/Mongoose filters (D238, HIGH); nested writes and
same-file recursive merges (D510, HIGH). Taint follows local bindings in
source order (a plain reassignment in the same block replaces the old value;
one inside a branch adds to it), destructuring, +, templates, string
methods, ||/??, ternaries, path.join/resolve/normalize, new URL,
JSON.parse (an object), Object.keys/values/entries/assign, qs.parse,
same-file helper functions and methods of same-file const objects, and
project helpers in other files (./x, @/x, ~/x, #x, never
node_modules, files under 256 KiB) whose every return is a string
transform of one parameter (replace, substr, slice, trim, case
changes, +, templates, ternaries) and whose other writes to that parameter
are such transforms too: utils.trunc(req.params.id, 40) keeps the id's
taint. A helper whose body writes HTML entities (<) is not followed. A
ternary that repeats an allowlisted value, ['jpg', 'png'].includes(x) ? x : 'jpg', is only ever a listed literal or the other branch. Other calls into
other modules stop taint, so a validator such as zod .parse(),
mongo-sanitize or escape-html ends it, and so does any unmodelled library
call. Sanitizers are proved, never named: Number/parseInt/parseFloat/
Boolean (global, not rebound), path.basename with path imported from
path, encodeURIComponent (XSS, path, command, redirect, SSRF), and a
same-file helper whose result replaces < with < globally (a later
replace that writes < back cancels it); a local function named escapeHtml,
quote or basename that returns its input is followed, not trusted. Guards
count only when the failing branch returns, throws, breaks or continues before
the sink (or the sink sits inside the passing branch), and only for the value
that reaches the sink, unless it is reassigned after the guard: a
startsWith(root) check on a path.resolve/normalize/join result when
the prefix provably ends with a separator (root + path.sep, root + '/',
`${root}/` or a literal ending in /, but not '/' or path.sep
alone),
path.relative(root, p).startsWith('..'), or rejecting .. when the value is
joined under a prefix and not path.resolved (D215); a startsWith(root)
check whose prefix has no trailing separator when the checked value is
path.resolve/join of an untainted base and path.normalize(R) (through
replace calls that do not write ..), where R starts with '/' (Express
req.path, or a literal '/' start): normalizing a rooted path resolves every
.. at the root, so the joined value cannot climb into a sibling directory
such as root-old (D215); rejecting x.includes('/') or x.indexOf('/') !== -1 when x is the last argument of path.join/path.resolve under a
non-empty literal directory, so it is one path segment (an entry of that
directory, or with .. the directory's parent itself, which no file read
returns; Windows \ separators are outside this proof) (D215); a literal
allowlist whose values contain no .., /, \ or : (D215); a same-file
lookup that returns a non-null value only inside if (collection.has(param)) (or a literal-list includes), when the handler
exits on a null or falsy result (if (data == null) return 404; an exit
inside a try body counts when every catch exits and there is no
finally), for the argument passed as that parameter (D215); an allowlist of string
literals (['a.com'].includes(u.hostname), new Set([...]).has(), ===)
on the hostname, host or origin of the URL, or a startsWith with a fixed
scheme://host/ (D216, D230); startsWith('/') together with a // check, or
a literal allowlist (D230); typeof x === 'string' or an ObjectId check
(D238); an anchored character-class regex such as /^[a-z_]+$/.test(x)
without the m flag (any rule). An allowlist read from the environment, a
mutated array, or a check that only logs is not a guard. A literal
scheme://host/ or relative-path prefix (/users/ + id, not / alone) keeps
D216 and D230 quiet; new URL('/path', request.url) stays on the site.
TS/JS D238 (NoSQL injection, CWE-943) checks files that import mongoose,
mongodb, @nestjs/mongoose, @typegoose/typegoose, mongojs or monk.
Elsewhere (MarsDB, a DAO handed db, a project wrapper module) a query
counts when its receiver is collection-shaped (db.ordersCollection,
db.collection('x'), usersCol) or its filter has a literal $where key.
It reports a find, findOne, findOneAndUpdate/Delete/Replace,
updateOne/Many, deleteOne/Many, replaceOne, countDocuments, exists,
where, distinct (its filter) or aggregate $match filter that is the
request object itself (find(req.body), find(filter) with
filter = req.query) or holds a request value that can be an object ({ password: req.body.password }, a spread of req.body), and any $where built
from request data. Objects come from Express req.body, req.query (the qs
parser) and req.cookies (JSON cookies), Fastify/Hapi/Next bodies,
request.json(), JSON.parse and qs.parse; route params, headers,
searchParams.get(), Koa/Fastify/Next query strings, String(x), templates
and .toString() are text and are not reported. A NestJS @Body() typed with a
DTO class counts as validated text (Skylos assumes the usual global
ValidationPipe, which it cannot see from the controller file); an untyped,
any, inline-object or primitive-typed parameter is not. Option objects with a
where/select/include key (Sequelize, TypeORM, Prisma) are not Mongo
filters. app.use(mongoSanitize()) from express-mongo-sanitize or
sanitizeFilter: true in the same file clears the file. Without request
proof, a $where string built by a template or + from a parameter of an
enclosing function (directly, through local const/let values, string
methods or String()) is HIGH too, like SQL text built from a parameter:
{ $where: `this.stocks > '${threshold}'` } in a DAO method. A
Number/parseInt/parseFloat value or any other call is not followed by
this check.
TS/JS D212 also checks spawn, spawnSync, execFile and execFileSync
from Node's child_process modules when their effective shell option is
literal true or a nonempty shell path. Request data in either the command
or its arguments can then become shell syntax. Import aliases, captured
callables and source-visible option objects are resolved, including spread
property order and visible reassignment. Fixed commands and separate arguments
with the shell absent or disabled stay quiet for this rule. Arbitrary
executable argument injection, unknown dynamic options and cross-file wrappers
are not general supported proofs.
For TS/JS D230, an intact operator environment lookup with a fixed key,
literal suffix or default, including a proven const alias, is not HTTP
request input. Request-dependent keys/suffixes, visible provider replacement,
environment writes or exposed aliases do not qualify for that proof. This
does not certify operator configuration itself or trace arbitrary writes
across files.
TS/JS D510 reports obj[a][b] = v when request data chooses a (a = '__proto__' makes the write change Object.prototype), unless a dominating
guard rejects '__proto__', allowlists a, checks hasOwnProperty, or the
base is Object.create(null)/a Map; and a call that passes request data to a
same-file function that copies keys recursively (for (k in src) with
dst[k] = ... and a recursive call) without a '__proto__'/'constructor'
check, hasOwnProperty or Object.create(null). Reading __proto__ is not
reported, and neither is a single-level obj[key] = value. Library merges
(lodash merge/defaultsDeep/set) are not reported: current releases
reject __proto__.
TS/JS D226 also covers insertAdjacentHTML, document.writeln,
createContextualFragment, setHTMLUnsafe, innerHTML/outerHTML +=,
jQuery .html(x) and .append/.prepend/.after/.before/.replaceWith/.wrap*
of a template or + string that contains markup, on a $(...)/jQuery(...)
chain or a $name variable. dangerouslySetInnerHTML={{ __html: x }}, like
innerHTML, is quiet only for inert literal markup or an import-proven
DOMPurify/isomorphic-dompurify/sanitize-html call (directly or through a
const); a sanitizer imported from a local ./dompurify file, or a sanitized
copy that is never rendered, does not count. DOM element.append(text) inserts
text and is not reported. An HTML value built with a template or + is also
quiet when every interpolated part is a constant, a number (numeric literals,
arithmetic other than + of unknowns, Number()/parseInt()/parseFloat(),
Math.*(), Date.now(), and toFixed/toString/slice of those) or the
result of an escaper in a position it covers: the global
encodeURIComponent/encodeURI (not shadowed), an imported HTML escaper
(escape-html, lodash.escape, lodash/underscore escape, html-escaper,
he.escape/encode, validator.escape), or a same-file function whose only
statement returns one of those. An escaped value is inert in element text and
in quoted attribute values (double quotes for the URL encoders); it is still
reported in an event-handler, style or srcdoc attribute, an unquoted
value, a tag or attribute name, right after <, or at the start of a URL
attribute unless encodeURIComponent produced it or the literal prefix fixes
the scheme or path. A function named like an escaper is not one.
TS/JS D226 also reports Angular DomSanitizer.bypassSecurityTrustHtml,
Script, Style, Url and ResourceUrl in a file that imports from
@angular/platform-browser, when the value is not a constant: HIGH when it
comes, through local values of the enclosing functions, from the URL
(ActivatedRoute params, query params and fragments, location,
document.URL), document.cookie, localStorage/sessionStorage or
window.name; MEDIUM otherwise (HTTP response fields and parameters: stored
XSS when the server returns user text). Literals, constants and
Url/ResourceUrl values whose literal scheme://host/ prefix fixes the
origin are not reported.
TS/JS D252 also checks express-session and cookie-session middleware
options: both default the cookie's secure to false, so a missing or false
secure (cookie: { secure } for express-session) is reported, as is
httpOnly: false. secure: true, 'auto' or a non-literal value
(process.env.NODE_ENV === 'production') counts as set; options built with a
spread or a non-literal object, and a call inside a branch whose condition
names a development, test or local environment, are not judged.
TS/JS D253 needs a secret on one side of ==/===/!=/!== and the
attacker's guess on the other. A secret is an environment or config value
whose key names a credential (process.env.API_KEY, config.get('x.secret'),
const { HOOK_SECRET } = process.env), an HMAC built with createHmac, a
member the function itself filled from one of those (data.confirm = process.env.X, Object.assign(data, {...}), a parameter default), or a
credential-named value that is neither request data nor a parameter
(user.resetToken, storedHash, this.apiKey). The guess is request data in
the handler (req.body.x, req.get('x'), request.headers.get('x'),
searchParams.get, formData.get, a destructured ({ body }: Request)
field, or a local bound from one). Reported: request data against a secret,
and a parameter against an environment, config or HMAC secret
(verifyKey(key) { return key === process.env.ADMIN_KEY }). Not reported:
literals, null/undefined/booleans, two request fields (a password and its
confirmation), two values of unknown origin, a hash or digest call on either
side (hash(input) === stored: the attacker cannot steer digest bytes), and
names that only end in token/hash (location.hash,
ts.SyntaxKind.ExclamationToken).
TS/JS D280 accepts three proofs before each mutation of a mutating Next.js
route: a trusted auth call (next-auth, Clerk, an Auth.js auth export) whose
result is rejected; a project helper (imported from ./x, @/x, ~/x or
#x) whose source reaches a recognised identity verification
(jsonwebtoken/jose verify, next-auth, Clerk, iron-session, Auth0,
Supabase getUser, Firebase Admin verifyIdToken, Lucia, better-auth,
Passport, bcrypt/argon2 compare), followed through same-file functions and
other project modules up to 4 calls deep, 32 functions and 12 files per proof,
whose awaited, unconditional result is rejected on failure before the
mutation (const { auth, error } = await parseRequest(req, schema); if (error) return error();, if (!auth) return ..., if (access.response) return access.response;); or an explicit authorization check, if (!(await canUpdateWebsite(auth, id))) return unauthorized(); (also through
const allowed = await can...()), whose branch rejects with a 401/403/404
status, an unauthorized/forbidden/notFound-style call or a throw.
Authorization predicates (can*, has*Permission, isAuthorized*,
authorize*, check*Permission), the lookups whose results they check,
proven helpers, zod/yup/joi/valibot schema building, request reads
(request.headers.get()) and return notFound()-style responses are not
mutations. A helper called with skipAuth: true, public: true or a
similar option, and a helper whose source does not reach a verification,
prove nothing.
TS/JS D201 and D202 are not reported when every argument of eval or new Function is a constant: literals, Math.random()/Math.floor() arithmetic,
.toString() of those, elements of a literal array and const names bound
to them (a captcha that evaluates 3+7*2, new Function('m', 'return import(m)')).
TS/JS D248 does not report a localhost literal that is only the base of
new URL(value, 'https://localhost') (also as a ternary branch, or through a
const whose every use is that base argument): the base parses a relative
path and is never contacted.
TS/JS D207 also reports the md5 npm package (blueimp-md5, js-md5)
called in a statement about a token, password, secret, session, nonce, salt,
signature or reset code (req.query.token == md5(req.query.login));
checksums and cache keys built with it are not reported.
TS/JS D250 reads the role of a Math.random() value from its statement, the
variable it initializes and its nearest enclosing function only (an outer
SessionHandler around a helper that rolls demo numbers does not make them
session tokens), and does not report it in seed, fixture or mock data
generators (seed/, seeds/, fixtures/, mocks/, __mocks__/, faker/
directories).
TS/JS D327 reports a POST, PUT or PATCH (fetch with a literal method,
axios.post/put/patch, axios({method, url, data}), axios.request) whose
body carries process.env data to a URL that is not local (like Python, which
checks data/json). Environment values in headers, such as
Authorization: Bearer ${process.env.TOKEN}, are how an API key reaches its
own API and are not reported; neither is process.env used as the URL, or
only NEXT_PUBLIC_ names.
Java security findings (--danger) come from an intra-procedural taint engine. Request data is: servlet HttpServletRequest getters (parameters, headers, cookies, query string, path info, getInputStream/getReader/getPart(s)); Spring parameters annotated @RequestParam, @PathVariable, @RequestHeader, @CookieValue, @RequestBody, @RequestPart, @ModelAttribute or @MatrixVariable; JAX-RS @QueryParam, @PathParam, @FormParam, @HeaderParam, @CookieParam, @MatrixParam and @BeanParam; MultipartFile/Part parameters; Spring WebUtils.getCookie(request, ...)-style accessors; same-file or imported helpers, including static Util.read(request) calls, that return request data; and, as in CodeQL, every other parameter of a @*Mapping method in a @Controller/@RestController class or of a JAX-RS @GET/@POST/... method, except framework objects (Model, BindingResult, Principal, HttpSession, Pageable, Locale, @AuthenticationPrincipal, @Context, ...). Primitive, boxed-number, boolean, UUID and date parameters never carry injection text. Getters on a request-bound object (a @RequestBody DTO) return request data. Sinks with an ambiguous name need the receiver's type (a local, parameter or field declaration, or a known factory call): SQL execute/query/update/batchUpdate/createQuery need a JDBC Statement/Connection, JdbcTemplate, NamedParameterJdbcTemplate, JPA EntityManager or Hibernate Session; LDAP search needs DirContext (SKY-D239) and is not reported for values escaped by LdapEncoder.filterEncode/nameEncode, Rdn.escapeValue, UnboundID Filter.encodeValue/createEqualityFilter, Spring LDAP filter objects other than HardcodedFilter, LdapQueryBuilder.query().where(...).is(...), or passed as {0} filter arguments, XPath compile/evaluate needs XPath (SKY-D229), so Pattern.compile(input) and service.search(input) are not reported; D237 lookup needs a JNDI Context, JndiTemplate or LdapTemplate; SpEL parseExpression is not reported when every evaluation of the result passes a SimpleEvaluationContext (CodeQL's barrier). Until this release Java reported LDAP and XPath injection as SKY-D240 and SKY-D241, which are MCP rules. D216 and D230 use CodeQL's fixed-host barrier: input after a constant prefix that already chooses the host ("https://api.example.com/users/" + id, "redirect:/owners/" + id, anything after ? or #) is not reported, while "redirect:" + next and "redirect:/" + next are. Spring return "redirect:" + x, new ModelAndView("redirect:" + x), new RedirectView(x), ResponseEntity...location(...), HttpHeaders.setLocation, a Location header and JAX-RS Response.seeOther/temporaryRedirect are D230 sinks. D216 also covers WebClient/RestClient uri/baseUrl/create (not URI templates or builder lambdas), OkHttp Request.Builder.url, Apache HttpClient request constructors and Jsoup.connect. D236 (XXE) follows CodeQL's per-parser rules on the same factory variable, in statement order: DocumentBuilderFactory is safe with disallow-doctype-decl true, both external entity features false, or ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_SCHEMA set to ""; SAX, XMLReader, Commons Digester, JDOM SAXBuilder and dom4j SAXReader need disallow-doctype-decl true or both entity features plus load-external-dtd false (SAX, XMLReader and JDOM also accept the ACCESS_EXTERNAL_* pair); StAX needs SUPPORT_DTD or IS_SUPPORTING_EXTERNAL_ENTITIES false (FindSecBugs); TransformerFactory needs ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_STYLESHEET set to ""; SchemaFactory needs ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_SCHEMA set to "". FEATURE_SECURE_PROCESSING alone does not count, a setting applied after newDocumentBuilder() does not protect that builder, and hardening in only one branch does not count. A factory passed to a helper in the same file takes that helper's settings; one passed elsewhere, or given a custom entity resolver, is not judged. DOM serialization (transform(new DOMSource(...))), newDocument() and parsing a classpath resource or literal path are not reported. D236 is CRITICAL when request data is parsed, HIGH otherwise; dom4j DocumentHelper.parseText (a plain SAXReader before dom4j 2.1.3, SAXReader.createDefault() since) is MEDIUM, HIGH with request data, and SAXReader.createDefault() counts as hardened. D204 (ObjectInputStream) is CRITICAL for request or socket input, HIGH for an unproven source and MEDIUM with an ObjectInputFilter (setObjectInputFilter, ObjectInputFilter.Config.setSerialFilter) or a resolveClass override.
C# security findings (--danger) come from a lexical taint scan of each method, with one level of same-file call flow. Request data is: parameters of public, non-static, non-override actions of a controller (a class with [ApiController]/[Controller], a base named Controller, ControllerBase, ApiController or ending in Controller/ControllerBase, also through a class in the same file, or a public class whose own name ends in Controller and whose bases are only interfaces or controller-named types, so a Unity PlayerController : MonoBehaviour is not one; never [NonController] or [NonAction]); Razor Page On* handler parameters and [BindProperty]/[BindProperties] properties; SignalR Hub methods; Blazor [SupplyParameterFromQuery]/[SupplyParameterFromForm] properties; minimal API handlers (MapGet/MapPost/MapPut/MapDelete/MapPatch/MapMethods/MapFallback lambdas and named methods registered on a recognized ASP.NET endpoint builder); any parameter marked [FromQuery], [FromBody], [FromRoute], [FromForm], [FromHeader], [AsParameters] or Azure Functions [HttpTrigger]; and Query, Form, Headers, Cookies, Body, RouteValues, Path, QueryString, Params, RawUrl, Url, Files, InputStream or [...] on Request, HttpContext.Request or a parameter typed HttpRequest/HttpRequestData/HttpRequestBase. Command-line args[...], Console.ReadLine() and Environment.GetEnvironmentVariable(...) also count. Constructor parameters (dependency injection), [FromServices]/[FromKeyedServices] parameters, framework and service types (CancellationToken, HttpContext, ILogger<T>, interfaces other than IFormFile and collections, HttpClient, *Service, *Repository, *DbContext), scalar values (numbers, bool, Guid, dates, and int.Parse/Convert.ToInt32 results) and plain helper or service parameters are not request data. A method in the same file that is called with request data (unqualified, this., Type.Method, or through a field, local or parameter whose declared type is a class in that file) is checked with those parameters as request data. Sinks whose names ordinary methods share need the receiver's declared type: D216 GetAsync/PostAsync/PutAsync/PatchAsync/DeleteAsync/GetStringAsync/GetStreamAsync/GetByteArrayAsync/GetFromJsonAsync/PostAsJsonAsync count only on an HttpClient (field, property, parameter, local, new HttpClient() or IHttpClientFactory.CreateClient()), as do WebClient Download*/Upload*/OpenRead; WebRequest.Create(Http), new HttpRequestMessage(method, url), .BaseAddress = and RestSharp new RestClient/RestClientOptions/RestRequest(url) are sinks too. A repository's GetAsync(id) is therefore not SSRF, while an HttpClient field named _repo is. D211 is CRITICAL with request data in SqlCommand-family and *DataAdapter constructors, .CommandText =, EF FromSqlRaw/ExecuteSqlRaw(Async)/SqlQueryRaw, EF6 or EF Core 2 string SqlQuery/ExecuteSqlCommand/FromSql, and Dapper Query*/Execute* on an IDbConnection-typed receiver; FromSqlInterpolated, ExecuteSqlInterpolated, an interpolated string passed straight to EF Core FromSql/SqlQuery/ExecuteSql, and values passed as parameters are safe. SQL text built by concatenation, interpolation, string.Format or StringBuilder from a non-scalar method parameter with no proven request source is D211 HIGH (as in Java and Roslyn CA2100); a parameter that is only an argument of another call (ClauseFor(option), Encode(password)) does not count. D212 (CRITICAL) covers Process.Start, new ProcessStartInfo and FileName/Arguments of a ProcessStartInfo or .StartInfo. D215 covers File.*, Directory.*, new FileStream/FileInfo/DirectoryInfo, new StreamReader/StreamWriter with a path (not a stream) and PhysicalFile; Path.GetFileName(x) as the last Path.Combine part is contained under a fixed or configured directory, but not under /, ., the working directory or the content root alone. D230 covers Redirect, RedirectPermanent, RedirectPreserveMethod, Response.Redirect, Results.Redirect, new RedirectResult and the Location header. LocalRedirect*, Results.LocalRedirect and RedirectToAction/RedirectToRoute/RedirectToPage are not reported, nor is a redirect of a variable on a path where the framework Url.IsLocalUrl(x) (the controller or page Url, this.Url, or an IUrlHelper/UrlHelper receiver) returned true: inside if (Url.IsLocalUrl(x)) (also == true, is true, an && conjunct or a ternary), or after if (!Url.IsLocalUrl(x)) (also == false, is false, or an || disjunct) whose branch returns or throws on every path, up to the end of that block or switch section. A check of another variable, inside an || condition, a negated check whose branch can fall through, an else if or a nested if without braces, and an IsLocalUrl helper of the controller or another type do not count. C# D216 and D230 use the fixed-host barrier described for Java. D233: Deserialize/UnsafeDeserialize/ReadObject on BinaryFormatter, SoapFormatter, NetDataContractSerializer, LosFormatter or ObjectStateFormatter (CRITICAL with request data, HIGH otherwise; Roslyn CA2300-CA2315), Json.NET TypeNameHandling other than None (HIGH, MEDIUM when a SerializationBinder is set in the same initializer or block; CA2326-CA2330), and new JavaScriptSerializer(new SimpleTypeResolver()) (HIGH; CA2321). D226 (HIGH) reports request data in new HtmlString(...), Html.Raw(...), new MarkupString(...) or a (MarkupString) cast; HtmlEncoder/WebUtility/HttpUtility encoding and HTML sanitizers clear it. D228 (HIGH) reports request data in Content(x, "text/html"), Results.Content(x, "text/html") or Response.Write(x) unless every path to the write last set the response content type to a literal other than HTML. The IsLocalUrl check also guards a redirect of the same member access (Url.IsLocalUrl(model.ReturnUrl) then Redirect(model.ReturnUrl)), not another property or object. Every C# security finding carries its CWE. Markup in .cshtml and .razor remains outside this analysis.
Minimal API registrations can point to a static handler in another scanned file of the same SDK project. For example, app.MapGet("/lookup", Endpoints.Lookup) marks the request-bound parameters of Endpoints.Lookup when the project uniquely identifies the method. The finding is reported at the operation in the handler. Overloads, custom compile inputs and separate projects limit this lookup. Ordinary helper-call flow stays within one file.
PHP security findings (--danger) come from an intra-procedural, flow-sensitive taint engine (one function or file; branches, loops, switch, try, early return/exit/die). Request data is: $_GET, $_POST, $_REQUEST, $_COOKIE; $_FILES[...]['name'|'type'|'full_path'] (not tmp_name, size or error); the $_SERVER keys the client sends (Psalm's list: HTTP_*, REQUEST_URI, QUERY_STRING, PHP_SELF, PATH_INFO, REQUEST_METHOD, CONTENT_TYPE, PHP_AUTH_*, ... and any non-literal key; not REQUEST_TIME, REMOTE_ADDR, DOCUMENT_ROOT or SERVER_NAME); file_get_contents('php://input'); getallheaders(); filter_input() unless it validates an int, float or boolean; Laravel $request->input/query/get/post/all/only/except/route/header/cookie/string/json/validated/getContent, request('x'), request()->..., Request::input(...) and old('x'); Symfony request bags (query, request, cookies, and headers/attributes/files on a request object); PSR-7 getQueryParams/getParsedBody/getCookieParams/getHeader*/getBody; CodeIgniter $this->input->get/post/... and $this->request->getGet/getPost/...; Drupal Form API input and getClientOriginalName(). A request object is a $request/$req variable, a ->request property or a parameter typed *Request/*RequestInterface. Function and method parameters are never request data by themselves (a Laravel route parameter show($id) is not reported). Typed getters ($request->integer(), boolean(), has()), numeric casts and builtins that return numbers, booleans or hashes, and lookups (User::find(...), mysqli_fetch_*, ->fetch*(), get_userdata()) carry no request text. Sanitisers count only for the sink they protect: escapeshellarg() for commands, only as a whole unquoted argument (not inside quotes in the command, not as the program, and not as the code of sh -c/bash -c, cmd /c, powershell -Command, eval or an interpreter's -c/-e/-r, also behind sudo/env/timeout), where the command stays SKY-D212 (escapeshellcmd() is not one: it still lets input add arguments); htmlspecialchars()/htmlentities() (text and quoted attributes; ENT_NOQUOTES only text), esc_html, esc_attr, e(), esc_url()/urlencode() (also links) and strip_tags() (element text only) for HTML; PDO::quote(), $wpdb->prepare() and pg_escape_literal() for SQL anywhere, and SQL escaping (mysqli_real_escape_string, addslashes, esc_sql, ...) only inside a quoted SQL literal; basename() for paths and includes. Allow-list checks clean a variable or array element in the guarded branch and after an early exit: in_array(...), array_key_exists(...), ctype_digit/ctype_alnum, is_numeric, filter_var(..., FILTER_VALIDATE_INT), === 'literal' (also through strtolower/trim) and preg_match() with a pattern anchored at both ends that only allows letters, digits, _ and - (not with /m). Each echo is checked against the HTML context it lands in, following the page's literal HTML and <?= ?> tags: htmlspecialchars() inside href or a <script> block is still reported. Output after header('Content-Type: application/json') (or a *content_type* helper with a non-HTML type) on every path is not HTML and not reported. SQL sinks: mysqli_query/mysql_query/pg_query/sqlsrv_query/..., any ->query/prepare/multi_query/real_query/executeQuery/executeStatement/createQuery/whereRaw/orWhereRaw/havingRaw/orderByRaw/groupByRaw/selectRaw/fromRaw, ->exec() on a database-named receiver, $wpdb->get_results/get_row/get_var/get_col, and Laravel DB::raw/select/statement/unprepared/insert/update/delete; ->where() only for an SQL string, not an array of conditions. Bound parameters (DB::select($sql, [$v]), $stmt->execute([$v])) are not reported. D216 covers curl_init, curl_setopt(CURLOPT_URL), curl_setopt_array, get_headers, fsockopen and Laravel Http::, with the same fixed-host barrier as Java. D204 unserialize() is not reported with ['allowed_classes' => false] or a class list. Values passed through other functions keep their taint, so an application's own sanitiser (for example yourls_sanitize_version()) is not recognised; mark such a line with // skylos: ignore[SKY-D228] reason. Not covered: taint across functions, files, properties ($this->x) or into Blade variables set by a controller, Twig |raw, Guzzle, call_user_func/variable functions, extract(), mass assignment, open redirect and XXE.
Go D216 and D212 (Go engine) also need untrusted input: an incoming *http.Request (URL, form, headers, decoded body; not r.Context()), a gin, echo or fiber request context and the structs they bind (gin ShouldBind*/Bind* including ShouldBindQuery/ShouldBindUri, echo Bind, fiber BodyParser/QueryParser/ParamsParser), or network input (net.Conn, Accept(), Read/Decode/Unmarshal from such a reader), followed through locals, concatenation, fmt.Sprintf, calls and same-file helper parameters. Literals, loopback URLs, config structs, flags, os.Args and os.Executable() are the program's own inputs. Numbers and booleans carry no taint: the results of strconv.Atoi/ParseInt/ParseUint/ParseFloat/ParseBool and uuid.Parse, and values whose declared type is numeric (an int field of a bound struct). D216 also needs the host to be choosable: a leading literal scheme://host/ fixes it. Go D216 sinks are http.Get/Post/Head/PostForm, http.NewRequest(WithContext), the same methods on an *http.Client (package variable, struct field or http.DefaultClient), client.Do(req) after req.URL or req.URL.Host is set from input, and httputil.NewSingleHostReverseProxy. D212 is CRITICAL for an untrusted program path or shell command string, HIGH for a shell (sh -c, cmd /c, PowerShell -Command) running a non-constant command that is not proven untrusted, and not reported for a constant or own program with argv elements (exec.Command(os.Args[0], "run")); Go D212 also covers syscall.Exec and golang.org/x/crypto/ssh Session.Run/Start/Output/CombinedOutput with an untrusted command. Go D215 (file paths in os.Open/ReadFile/WriteFile/Create/Remove/MkdirAll/ReadDir/Rename/Chmod/Stat..., http.ServeFile, gin c.File/FileAttachment, echo c.File/Attachment/Inline, fiber c.SendFile/Download) uses the same sources. A containment check protects only the accepted branch or code after a rejecting return, and only until the checked value changes. A strings.HasPrefix boundary must be fixed, end with a path separator and check the actual cleaned value; filepath.Rel needs its error and parent traversal checked. filepath.IsLocal also supports a rejecting guard. Existing filepath.Base and securejoin.SecureJoin path policies remain specific to filesystem sinks: they do not sanitize SQL, command text or network destinations. The Go engine's reliability checks follow their Python equivalent: unclosed resource (SKY-G260) and defer in a loop (SKY-G203) are MEDIUM like SKY-L008, and unsafe use (SKY-G206) is LOW like gosec G103; a defer followed by an unconditional return (or a break in an outermost loop) runs once and is not reported, and a handle that is closed explicitly, returned or stored in a field is not unclosed. Go D230 (open redirect: http.Redirect, gin and echo c.Redirect(code, url), fiber c.Redirect(url)) needs untrusted input that can choose where the redirect goes: data after a literal ? or # cannot, and a dominating same-origin check can clear it. This requires both the leading / and rejected //, or successful url.Parse with empty Host and Scheme, or a proven literal allowlist. A comparison that only logs, a later check, or an unrelated value does not protect the redirect. Mutable package state is not a fixed boundary or allowlist merely because its initializer is literal. Go D211 is CRITICAL when request or network input reaches the query text, HIGH when the query is string-built from a non-constant value with no proven source (Python D211 reports that case too), directly in the call or in a variable built with + or fmt.Sprintf in the same function (like gosec G201/G202), and not reported for placeholders, constants, or values of numeric type or placed with a numeric verb (%d) that are not request input (request text formatted with %d stays CRITICAL). The receiver is resolved from declarations (parameters, struct fields of the package, package variables, constructor calls such as sql.Open, sqlx.Connect, pgxpool.New, gorm.Open): database/sql DB/Tx/Conn; jmoiron/sqlx (also Select/Get after the destination, NamedExec, Queryx, MustExec and their Context forms, and the package functions); jackc/pgx and pgxpool (the query is the argument after the context); GORM Where/Raw/Exec/Order/Group/Having/Select/Joins/Table/Not/Or/Distinct/Pluck and the inline condition of First/Find/Take/Last/Delete (a struct, map, slice or pointer argument is bound as parameters and not reported); a local struct embedding one of these, or a local interface with query methods (sqlc's DBTX). *sql.Stmt arguments are parameters, not query text. When the receiver cannot be resolved, a database-like name is accepted: a plain variable (db, tx, conn, sqldb, database) always, a field (s.db, r.DB) only when the package imports a SQL library; a package of the scanned module named sqlx is not jmoiron/sqlx. Go D226 reports request input converted to html/template's HTML, JS, URL, HTMLAttr, CSS, JSStr or Srcset (CRITICAL). Go D228 reports request input written to an HTML response: fmt.Fprint/Fprintf/Fprintln, io.WriteString or Write/WriteString on an http.ResponseWriter (also gin c.Writer, echo c.Response()), gin c.Data and echo c.Blob with an HTML content type, echo c.HTML/HTMLBlob, and gin c.String or fiber SendString/Send/Write after an HTML content type was set on that context. Following CodeQL go/reflected-xss, a write is not reported after a non-HTML Content-Type was set on the same writer (a value taken from the request counts as HTML), or when every write to that response up to this one starts with constant text whose first character is not < (net/http then sniffs text/plain); html.EscapeString, the html/template escapers, url.QueryEscape/PathEscape, json.Marshal and a bluemonday policy's Sanitize clear the value, request cookies are not reflected input, and gin c.String/c.JSON, echo c.String/c.JSON and fiber's default text/plain responses are not HTML. Not covered: text/template used for HTML, and taint across files or packages. Go D210 (InsecureSkipVerify: true) is not reported in Go test-support code (a file that imports testing and takes a testing.TB/*testing.T/B/F/M), like D346 in Python test modules; _test.go files are not scanned by the Go engine. For L012, an external test file (package pkg_test) sees the exports of its own directory's internal test files (package pkg, the export_test.go convention), because go test compiles them into the package.
bleach.linkify (it only adds links) and cgi.escape (it leaves quotes alone)
are not XSS sanitizers. Path traversal (D215) also accepts a sanitizer imported by name
(from os.path import basename), but only when the module can't swap it out: no
local function with the same name, no star import, exec/eval or other write
to its own namespace, and no attribute write of the same name on any object
(os.path.basename = …, setattr(x, "basename", …), del x.basename) or
setattr with a computed name. D325 uses the same sanitizer handling. Other checks recognise sanitizers only by their qualified name.
D338 reports reading sensitive files. It also reports a sensitive-file reader
(cat, sed, base64, tar, ...) whose redirect writes into a sensitive path
such as ~/.ssh/config, ~/.aws/config, ~/.kube/config, ~/.npmrc,
~/.claude/settings*.json, ~/.codex/config.toml, ~/.docker/config.json,
~/.config/gh/ or /run/secrets/, because those files run code, steer
authentication or installs, or hold secrets. Redirect parsing is quote-aware: a
quoted ">" is an argument, <> file is a read, and a here-string's $(...)
still reads. Routine credential setup is not reported, and only in GitHub Actions run steps:
a reader command writing ~/.ssh/known_hosts, ~/.ssh/id_* (SSH key files,
including .pub, -cert.pub and .pem forms), ~/.netrc or ~/.pypirc under the home directory (~, $HOME, /root, /home/<user>),
when no workflow, job, container or step env sets HOME and no run block in the
job assigns HOME or writes it to $GITHUB_ENV; and a project-relative .env, in
a bash/sh step on a Linux or macOS runner whose working directory is in the
workspace, with no BASH_ENV/ENV set, and whose script has nothing that may
change directory or hide a command (cd, pushd, popd, source, ., eval,
exec, ln, trap, case, alias, function definitions, PowerShell location
cmdlets, env -C, or a command word built from a variable, glob or brace
expansion, including escaped or quoted spellings). Shell scripts, GitLab CI and
Dockerfiles report these writes as before. TLS certificate writes (*.pem,
*.crt, *.cer outside ~/.ssh/id_*), targets with .., a glob or a
variable, and every other sensitive path stay reported. A
reader writing into a persistence file that is also sensitive
(~/.ssh/authorized_keys, ~/.ssh/rc) is reported as both D338 and D339. A redirect (>,
>>, >&, &>) from any command into a persistence target is D339 (HIGH):
authorized_keys, ~/.ssh/rc, ~/.ssh/environment, shell startup files,
/etc/profile*, cron files, systemd units, sudoers, /etc/ld.so.preload,
/etc/rc.local, /etc/init.d/, or git hook folders outside the project. A glob
target that could name one of these (for example ~/.ssh/authorized_ke*) is
D339, and redundant //, /./ and .. segments do not hide one.
Rust Unix permissions reviews (--danger) remain visible in full and diff scans and are exempt from the security gate. SKY-D415 reports a literal false passed to std::fs::Permissions::set_readonly, including permission values obtained from standard filesystem metadata. On Unix this sets the owner, group and other write bits in memory. Applying them to a file requires a separate operation. SKY-D416 reports decimal and hexadecimal permission mode literals greater than seven on identified standard Unix extension APIs: PermissionsExt::from_mode and set_mode, OpenOptionsExt::mode, and DirBuilderExt::mode. The analyzer tracks imports and local bindings and skips recognized Windows-only code. Named flags, octal and binary literals, and computed masks remain outside the mode check.
Rust security findings (--danger) come from a bounded, flow-sensitive
analysis of one file at a time: locals, branches, match, if let, loops,
closures, format!-family macros (also inside other macros such as json!)
and calls to helpers in the same file, whose parameters are summarised (a
request value passed to a helper whose parameter reaches a sink is reported at
that call, naming the chain in metadata.rust_flow.via). Request data is: an
actix-web extractor (web::Path, Query, Json, Form, Bytes,
Payload, also through use actix_web::web::*), an axum extractor
(extract::Path, Query, Json, Form, RawQuery, RawForm,
Multipart, axum::Json/Form, axum-extra Query/Form/Json), a Rocket
Json/Form/Data guard, a Rocket route parameter named in the route
attribute (#[get("/x/<name>?<q>")], <path..>, data = "<body>") whose type
is &str, String or Cow<str> (or their Options; other FromParam types
were validated), and the request-data methods of HttpRequest/Request
(uri(), path(), query_string(), match_info(), headers(), body(),
into_inner(), ...; not app_data() or other server state). An extractor of
a number or bool (Path<i64>) carries no text. Environment variables,
std::env::args, configuration and library parameters are operator or
calling-code input: D212 and D215 sinks they reach are unlisted review items
(metadata.rust_source = "operator_input"), and D216/D228 need request data.
A value indexed by request data (items[i]) is the element, not request
text; a query that takes a database pool or connection argument (pool,
conn, db, tx, ...) returns stored rows, except a write named create,
insert, update, upsert, save, replace or store that returns what
it stored. A guard if !is_valid_x(v) { return } (a same-file function
declared -> bool, or a call named is_valid*, valid*, is_safe*,
is_allowed*) clears v after it. Rust D216 sinks are reqwest::get, the
get/post/put/patch/delete/head methods and request(method, url)
of a reqwest, reqwest-middleware, awc, ureq, surf, isahc or hyper client (a
parameter of that type, also inside Data<..>/Arc<..>/State<..>, or one
built by its constructor or builder), the ureq, surf, isahc,
attohttpc and minreq request functions, and webmention::Webmention::new
(the target). Only the part of the URL that chooses the host counts: a literal
scheme://host followed by /, ? or #, or a leading value with no request
data followed by one of them (format!("{base}/users/{id}")), fixes it, and
percent_encoding/urlencoding/form_urlencoded encoders clear the value.
Rust D228 reports request data inserted by format!/format_args!/write!/
writeln! into a template that contains an HTML tag; html_escape,
htmlescape, v_htmlescape, askama_escape and ammonia::clean (and the URL
encoders) clear it. D216 and D228 are not reported in test code. Not covered:
warp filters, tonic services beyond Request methods, values read from
outbound HTTP responses, and taint across files.
| ID | Severity | Name | File Types | Details |
|---|---|---|---|---|
| D260 | HIGH-CRITICAL | Prompt injection scanner | .py, .md, .rst, .txt, .yaml, .yml, .json, .toml, .env |
Multi-file scanner with text canonicalization. Bidirectional control characters in Python source are reported once, as D344; D260 keeps them in other files. A lookalike letter is reported when the word reads as Latin (Cyrillic а in аdmin); a word of another script with a stray Latin letter, an all-lookalike word in a file written in that script, and letters after an escape such as \n are ordinary text. Outside agent instruction and AI-reviewer files, one or two zero-width characters are not reported when they stand between string or code delimiters (replace("\u200b", "")), are a U+200B word break between letters of a script written without spaces, or sit outside a word on a line that spells out their code point; inside a word, in a longer run, and for bidirectional controls they are. Each invisible character is judged where it stands, so one misplaced character on a line does not also report the joiners its words need. A ZWNJ/ZWJ between two letters of a script that uses joiners (Arabic, Persian, Syriac, Indic scripts, Sinhala, Myanmar, Khmer) is spelling, and an emoji ZWJ sequence hides nothing. In text and data files (not Python source, where the character can sit in a compared string) a joiner that ends such a word or has a direction mark beside it is spelling too, and so is a left-to-right or right-to-left mark (U+200E/U+200F) beside right-to-left letters (runs of at most three such characters). In a translation catalog (a JSON, YAML or ARB file in an i18n/l10n/locales/lang/intl/translations folder named for a language, or a pt_BR.json-style file anywhere), a run of up to eight U+200B or U+2060 of one kind, pasted with the words, is not reported, nor is a lookalike letter of the script its line is written in (a Greek Ο typed in Greek text). Embedding and override controls (U+202A-U+202E), runs that mix invisible characters, joiners beside Latin letters and catalog lookalikes in a line of another script stay reported. Instruction patterns are matched after zero-width characters are removed. A quoted label followed by the control it names (the "Skip Check" button) is a mention. In YAML and TOML, comments document settings and are not scanned. YAML comment boundaries come from PyYAML's scanner (a # inside any scalar, quoted, block or flow, is value text); TOML ones from a string-aware lexer checked by tomllib. A file that does not parse keeps every line except whole-line comments. Terminology about generated LLM response text is distinguished from credential disclosure. Access tokens, environment credentials and API keys remain covered by the disclosure patterns |
Finding types:
literal_payload: direct instruction override, role hijacking, suppression, or exfiltration phrase.hidden_char: zero-width or invisible Unicode.obfuscated_payload: encoded string that decodes to injection content.mixed_script: Cyrillic or Greek homoglyphs mixed with Latin text.risky_placement: injection in a high-risk README, prompt field, YAML, or JSON field.
Literal-pattern messages quote the matching clause. Their JSON
metadata.instruction_pattern records up to 16 matching signals, their base
severity and line offsets in the extracted, normalized text. Those offsets are
not source line numbers; segment_start_line identifies the extracted segment's
source location. complete: false means additional signals were omitted from
the evidence. Each match and its context are limited to 240 characters;
matched_text_truncated marks a shortened match. The strongest matched signal
determines severity, including when multiple strings begin on the same source
line. Application prompts still
require review; their names or message roles do not establish safety.
| ID | Severity | Name | Languages | Details |
|---|---|---|---|---|
| D261 | HIGH | Untrusted input to LLM prompt | Python | Request-controlled data reaches an LLM prompt or message without a clear instruction/data boundary |
| D262 | CRITICAL | Unsafe LLM output handling | Python | Model output flows into code execution, shell, SQL, or network sinks without validation |
| D263 | HIGH | Sensitive data sent to LLM | Python | Secrets, credential fields, or sensitive environment values flow into LLM or embedding API input |
| D264 | HIGH | Excessive agent tool privilege | Python | Agent frameworks are granted shell, code execution, unrestricted HTTP, or broad file-management tools |
| D265 | HIGH-CRITICAL | Unsafe ML model deserialization | Python | Pickle-backed model/checkpoint loading such as torch.load, joblib.load, or numpy.load(..., allow_pickle=True) |
| D266 | CRITICAL | AI config instruction injection | Agent config and instruction files, AI code reviewer config files | D260-style hidden, obfuscated, or instruction-override payloads in AI assistant rule/config files. In AI code reviewers' own files (the SKY-A122 list, apart from .github/copilot-instructions.md, which stays a full agent instruction file), only HIGH signals become D266: instruction overrides, role changes, requests to reveal or send data, encoded payloads and invisible characters (an emoji joiner is not one). Reviewing vocabulary such as "do not flag" or "skip review" is what those files say, so it stays D260 at its usual severity, and a full scan that reaches a reviewer file inside a tool folder (.gemini/, .cursor/, .github/, .greptile/, .macroscope/), which it did not read before, reports only the HIGH signals there; a diff scan of a changed file reads it in full as before |
| D267 | MEDIUM | Unbounded LLM consumption | Python | LLM calls or agent executors lack token, timeout, iteration, or obvious loop bounds. Keys of a local dict unpacked into the call (completion(**params)) count as keywords when the dict is built and changed only where the checker can read it (a literal, dict(...), params["k"] = v, del, pop, setdefault, update, clear, ` |
For D260, a generic instruction not to report, flag, detect, scan, warn or alert needs a security/code-review subject in the same bounded clause or an explicit reviewer/scanner context. Domain output restrictions alone do not establish reviewer suppression. Agent and reviewer instruction files still check bare directives, and each match and decoded payload is checked separately.
| ID | Severity | Name | Languages |
|---|---|---|---|
| D240 | CRITICAL | MCP tool description poisoning | Python |
| D241 | HIGH | MCP unauthenticated transport | Python |
| D242 | HIGH | MCP permissive URI / path traversal | Python |
| D243 | CRITICAL | MCP server bound to 0.0.0.0 |
Python |
| D244 | CRITICAL | MCP hardcoded secrets in tool params | Python |
| ID | Severity | Name | Languages / Scope |
|---|---|---|---|
| D324 | HIGH | Symlink-following file write | Python |
| D325 | MEDIUM | Symlink-following file read | Python |
| D326 | HIGH | Unsafe archive extraction | Python |
Path(name).name strips directory components but can still select an existing
final symlink. D325 does not exempt a read solely because that basename is
joined to a fixed base directory.
Python open-mode checks distinguish read, write and update (+) modes,
including bounded sets of literal modes assigned in the same function before
the call. Shared namespaces, captured cells and visible reflection keep named
modes unknown. An unknown mode keeps both operations possible. Literal update
modes add a read warning when the same handle is observed reading or being
iterated; named or conditional update modes preserve existing read checks even
when their handle escapes or is rebound. Explicit modes captured before
**kwargs expansion cannot be replaced by that mapping.
For Python path checks (D215, D324, D325), direct
pytest.mark.parametrize decorators can establish that a filename parameter
contains only literal relative paths. Supported forms include import aliases,
multiple columns, stacked decorators, and pytest.param(..., id="...").
Only the proven columns lose parameter taint; other inputs remain checked.
This is a narrow static check for top-level test_* functions in test files.
It requires unchanged pytest API bindings and straight-line test bodies.
Indirect fixture values, dynamic lists, reassigned parameters, unknown
decorators, class/module parametrization, and unsupported control flow keep
the existing conservative behavior. Absolute paths and parent-directory
components are not accepted as evidence. Interpolation checks are unchanged.
Proof is limited to 256 rows per decorator, 32 parameter names, and 4096
characters per filename; larger inputs keep the normal parameter taint.
Skylos does not execute pytest or load conftest.py to resolve these values.
| ID | Severity | Name | Languages / Scope |
|---|---|---|---|
| D327 | CRITICAL | Data exfiltration command | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D328 | HIGH | Remote script piped to shell | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D329 | HIGH | Broad destructive command | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D337 | HIGH | Package registry or index override | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D338 | CRITICAL | Sensitive host scope access | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D339 | HIGH | Persistent environment mutation | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D340 | HIGH | Unapproved package or artifact publish | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D341 | HIGH | Untrusted package-managed tool execution | Shell, Python, TS/JS, GitHub Actions, GitLab CI, Dockerfile |
| D342 | HIGH | Dockerfile remote ADD without checksum | Dockerfile |
| D343 | HIGH | Dockerfile literal secret build value | Dockerfile |
| D344 | HIGH | Trojan Source bidirectional Unicode (U+202A-U+202E, U+2066-U+2069), one finding per line, test files included | Python |
| D345 | HIGH | Mutable Hugging Face artifact revision | Python |
| D346 | HIGH | Flask debug mode enabled | Python |
| D347 | MEDIUM | Unsafe logging config listener | Python |
| D348 | HIGH | Insecure temporary filename: tempfile.mktemp(), or os.makedirs/Path.mkdir with exist_ok=True on a fixed directory under the shared temp root. The root is a literal /tmp or /var/tmp, or tempfile.gettempdir(), followed through os.path.join, Path(...) / "name", an f-string, a local name, a self attribute set in the same function, and an a or default or conditional default. Every component after the root must be a constant; a random, caller-supplied or otherwise unknown component is not reported |
Python |
| D349 | CRITICAL | Server-side template injection (request data compiled as Jinja template source; Java Velocity evaluate, FreeMarker new Template(...) source, StringTemplateLoader.putTemplate, Groovy TemplateEngine.createTemplate; PHP Drupal inline_template render arrays) |
Python, Java, PHP |
| D355 | HIGH | Jinja environment with omitted or explicitly disabled autoescape | Python |
| D356 | MEDIUM | Cleartext outbound HTTP request. In Rust, a reqwest request targets a literal HTTP URL and carries Basic, Bearer or Authorization credentials. | Python, Rust |
| D357 | HIGH | Untrusted input used as a dynamic Python import name | Python |
| D358 | HIGH | Public Gradio launch without configured authentication | Python |
| D359 | MEDIUM | Cached Flask external URL derived from the request host | Python |
| D378 | MEDIUM | Incomplete path traversal defence: the code handles .. itself and the value still reaches a file operation in the same function. Reported when .. with a separator (../, ..\) is removed with a single replace, which ....// survives, or when .. is rejected or removed and the value is then joined after a base directory (os.path.join, Path(base, name), base / name), where an absolute path replaces the base |
Python |
| D379 | MEDIUM | Catastrophic regex backtracking: a pattern written as a string in a re call whose matching steps grow exponentially, or at least cubically, with the input length. The finding names the input shape that shows it |
Python |
| D385 | MEDIUM | A Django view reads a stored balance, checks it, subtracts the requested amount and saves the same field on the same row. Concurrent requests can overwrite a debit. | Python / Django |
D340 recognizes explicit release intent in a GitHub Actions workflow when it
runs only on the release event, including types: [published]. A publishing
step also qualifies when its own if, or its enclosing job's if, requires
github.event_name == 'release'. Additional && conditions are supported;
every branch of an || condition must require the release event. An unguarded
workflow that also runs on push, pull request or manual events still reports
D340. Workflow names, job names, tag names and comments do not establish release
intent. This exception applies only to D340; other command and publish-job
security checks still run. Standalone scripts and other command-scanning
contexts retain their existing checks.
Ambiguous YAML and unsupported conditions keep the warning.
D378 needs no proof that the value is attacker-controlled: the defence in the
code is the evidence that its author treats it as untrusted. It stays quiet when
the function also resolves the path and checks containment (is_relative_to,
relative_to, commonpath, or a normalized path with startswith on a prefix
that ends with a separator), keeps only
the file name (basename, secure_filename, .name), uses safe_join,
rejects or strips a leading separator or an absolute path, validates the value
with another call, pattern or allowlist, or removes the sequence in a while
loop. Plain string concatenation after a base is not reported as an absolute
path case, because it cannot replace the base.
D379 parses each literal pattern and counts the steps of a backtracking matcher
inside Skylos on generated inputs of growing length; nothing from the scanned
project runs. It reports only measured growth, so a pattern that merely looks
nested ((\d+\.)+) is not reported, and quadratic patterns are not reported.
Patterns built at run time, unknown flags, back-references, look-behind and
scoped inline flags give no verdict. re.compile, re.match and
re.fullmatch are measured as one attempt from the start of the text; the
other re functions as a search over every start position. It does not prove
that attacker-controlled text reaches the pattern.
D355–D359 require review of deployment and input context. D356 records a cleartext transport choice; it does not establish that sensitive data is sent. D357 requires an identified input source, rather than reporting every plugin import. D359 requires cache and request-host evidence. Related D215/D324/D325 checks at the same filesystem operation appear together in terminal reports; JSON, SARIF and gates retain each raw finding. Missing request timeouts remain SKY-L031 quality findings and should be reported separately in comparisons.
D329 flags rm -rf of /, ~, $HOME, ., *, .git, any other absolute
path, and $VAR/ or $VAR/* (an empty variable makes it /). Split flags
(-r -f) and --recursive --force receive the same checks. Removing
package-manager caches and scratch space is not a finding: /tmp/...,
/var/tmp/..., /var/cache/..., /var/lib/apt/lists/..., and .cache or
.npm under /root, ~ or $HOME. Cleanup targets containing parent traversal
or expansions after the cache prefix retain findings because they can escape
that directory.
Terraform checks read .tf and .tf.json without running Terraform or contacting
cloud accounts. SKY-D400 reports a declaration allowing worldwide TCP SSH/RDP
ingress; SKY-D401 reports explicit disabled storage encryption for a directly
created AWS RDS DB instance. These are declaration policies, not evidence of
live Internet reachability or deployed state. Literal locals can be resolved;
runtime variables, external modules and unsupported expressions stay unknown.
Snapshot and replica encryption stays unknown. File/resource coverage and
safe/unsafe/unknown/not-applicable checks are recorded under
analysis_summary.configuration_coverage.terraform. Unknown is never a safe
policy result. See the cloud corpus.
The additional AWS checks cover broad S3 canned ACLs and literal bucket policies, disabled bucket public-access protections, public RDS accessibility, explicitly disabled EBS encryption, optional EC2 metadata tokens, and worldwide database ingress. They report requested configuration for review. Account-level controls, ownership settings and network routing can change the effective deployment. No provider defaults or variable defaults are treated as observed cloud state.
Kubernetes workload policies read literal YAML Pod specifications and standard
workload templates, including init and ephemeral containers. They report
privileged containers, host namespace sharing and mounted sensitive host paths.
They do not render Helm charts, query a cluster or evaluate admission policies.
Ambiguous YAML, unsupported workload kinds and unresolved mount relationships
remain incomplete in analysis_summary.configuration_coverage.kubernetes;
requiring a policy that cannot be evaluated produces an analysis error.
Read-only mounts can still expose sensitive data or container-runtime sockets.
| ID | Severity | Name | Provider |
|---|---|---|---|
| D400 | HIGH | Terraform AWS worldwide administrative ingress (TCP 22/3389, IPv4/IPv6, inline and standalone security-group rules) | Terraform / AWS |
| D401 | HIGH | Terraform AWS new database storage encryption explicitly disabled (direct aws_db_instance; restores and replicas unresolved) |
Terraform / AWS |
| D402 | HIGH | Public or all-AWS-account S3 canned ACL requested | Terraform / AWS |
| D403 | HIGH | Unconditional wildcard-principal S3 grant in a bounded literal JSON or literal jsonencode bucket policy |
Terraform / AWS |
| D404 | HIGH | One or more S3 bucket public-access-block protections explicitly disabled | Terraform / AWS |
| D405 | HIGH | RDS publicly_accessible explicitly enabled |
Terraform / AWS |
| D406 | HIGH | New EBS volume encryption explicitly disabled; snapshot inheritance stays unknown | Terraform / AWS |
| D407 | HIGH | EC2 instance or launch-template metadata tokens explicitly optional; disabled endpoint is exempt | Terraform / AWS |
| D408 | HIGH | Worldwide TCP ingress on database/cache ports; inline and standalone security-group declarations | Terraform / AWS |
| D409 | HIGH | Kubernetes container explicitly privileged | Kubernetes YAML |
| D410 | HIGH | Kubernetes workload explicitly shares host PID, IPC or network namespace | Kubernetes YAML |
| D411 | HIGH | Kubernetes container mounts a sensitive host directory or container-runtime socket | Kubernetes YAML |
| D413 | MEDIUM | An Envoy downstream HTTP/1 listener explicitly enables allow_chunked_length. Review how the other proxies on this route interpret request framing. |
Envoy YAML |
| D414 | MEDIUM | A saved Terraform plan releases an S3 bucket name while a matching Route 53 CNAME survives. A delete-before-create replacement can leave a temporary gap. Run skylos rules terraform-plan plan.json before applying the plan. |
Terraform plan JSON / AWS |
| D290 | HIGH | Dangerous trigger (pull_request_target, workflow_run). issue_comment counts only when a job that accounts without write access can start checks out pull request code (a refs/pull/ ref, a step output assigned the pull request's head ref or SHA, gh pr checkout, a git fetch of a pull ref) and then runs it (a later command, run: step or local action) while holding a write or undeclared token, secrets, a write-capable cache-mode or a possibly self-hosted runner. Reach follows the job's if: and needs. Only a verified permission check stops outsiders: a known check action (actions-cool/check-user-permission with error-if-missing: true, prince-chrismc/check-actor-permissions-action, sushichop/action-repository-permission without relax, xt0rted/slash-command-action, lannonbr/repo-permission-check-action, skjnldsv/check-actor-permission, TheModdingInquisition/actions-team-membership, as their sources fail) that demands more than read access of the triggering account, or a script that looks the permission or association up and exits non-zero, with no continue-on-error and a later step that runs only on success; or a known check whose 'allowed' output the later step's if: requires. An action or step whose name or text only mentions permissions does not count, and a needed job gates only through such a failing check. github.event.pull_request and github.head_ref are empty on comment runs, so a checkout of them gets the default branch. |
GitHub Actions |
| D291 | MEDIUM-HIGH | Missing or excessive permissions. A job's own permissions replaces the workflow's, so workflow-level values are judged by the jobs that inherit them: missing permissions are one finding per workflow naming those jobs (none when every job declares its own), read-all/write-all need an inheriting job, and a workflow-level X: write needs two (with one it is already job-scoped). A job's own read-all/write-all is reported on that job |
GitHub Actions |
| D292 | HIGH (LOW for GitHub-owned) | Unpinned action or reusable workflow (not a full commit SHA). Valid same-repository job calls using ./.github/workflows/... or $/.github/workflows/... already select the caller's commit and need no additional SHA pin. GitHub-owned actions/* and github/* at a tag or branch are LOW (GitHub runs the workflow and owns them); a path with ., .. or empty segments gets no such discount. Every other owner, dynamic ${{ }} refs and refs with no @ are HIGH |
GitHub Actions |
| D293 | MEDIUM | Checkout persists credentials where they can reach someone new: a later actions/upload-artifact of the checkout (.git included: before v4.4, or with include-hidden-files: true, or a SHA pin), a pull request's code checked out in a job accounts without write access can start, or an explicitly write-scoped token beside a later third-party action. GitHub-owned and local actions already hold the token; an undeclared token scope is D291's finding |
GitHub Actions |
| D294 | HIGH-LOW | Template injection: a ${{ }} expression in code (run:, container and service options, code inputs of known actions such as actions/github-script script) whose value an attacker can shape. Each expression is parsed (format(), toJSON(), fromJSON(), join(), case() values, `a && b |
|
| D295 | HIGH | Self-hosted runner exposure | GitHub Actions |
| D296 | MEDIUM | Unpinned container image | GitHub Actions |
| D297 | HIGH | Secrets inheritance into reusable workflow | GitHub Actions |
| D298 | MEDIUM | Overprovisioned secrets | GitHub Actions |
| D299 | MEDIUM | Secret used outside protected environment in a job that accounts without write access can start (issues, issue_comment, pull_request_target, discussion, review events, workflow_run after a fork-reachable run), after the job's if, needs and approval environment are applied. Writer-started events and pull_request (no secrets for forks) are not reported |
GitHub Actions |
| D300 | HIGH | Unsafe environment file write. An echo of a quoted or bare literal without $ or a backtick is not reported, for GITHUB_ENV and GITHUB_PATH alike |
GitHub Actions |
| D301 | HIGH | Hardcoded container credentials | GitHub Actions |
| D302 | HIGH | Broad GitHub App token permissions | GitHub Actions |
| D303 | MEDIUM | Unsound contains() condition |
GitHub Actions |
| D304 | MEDIUM | Spoofable bot condition | GitHub Actions |
| D305 | MEDIUM | Unsound multiline condition | GitHub Actions |
| D306 | HIGH | Insecure commands enabled | GitHub Actions |
| D307 | MEDIUM | Anonymous action/workflow definition | GitHub Actions |
| D308 | MEDIUM-HIGH | Cache poisoning risk. Read side (MEDIUM): a step that runs on the release or tag-push event of a release-like workflow restores a cache, either because an input enables it or because the action caches without being asked: actions/setup-go v4+ (cache), jdx/mise-action, actions-rust-lang/setup-rust-toolchain, mlugg/setup-zig, Swatinem/rust-cache (unless lookup-only), oven-sh/setup-bun (unless no-cache), gradle/actions/setup-gradle (unless cache-disabled), ramsey/composer-install (unless ignore-cache), astral-sh/setup-uv v5-v9 on GitHub-hosted runners (enable-cache: auto; v10+ skips release and tag runs) and actions/setup-node v5+ after a checkout when the root package.json names npm in packageManager or devEngines.packageManager. A job whose cache-mode is none or write-only restores nothing; a commit pin needs a version comment to count. Write side (HIGH): GitHub gives low-trust runs that resolve to the default branch (pull_request_target, issue_comment, workflow_run, issue and discussion events) read-only caches unless cache-mode: write or write-only is declared; pull_request_review runs, like pull_request, write only to the merge ref. Reported when such a job, reachable by accounts without write access, has a step they reach that checks out pull request code, downloads the triggering run's artifacts or expands event text into a script. A called workflow gets the local caller's explicit cache-mode when it sets none, may request more when the caller sets none, and does not start when it requests more than the caller's. Defaults from each action's action.yml and GitHub's dependency-caching reference, 2026-10-21 |
GitHub Actions |
| D309 | HIGH | Broad secret environment exposure. A secret named for a location, setting or identifier (*_URL, *_REGION, *_ID) with no credential word is kept but hidden by default (non-credential-secret), as for D299 |
GitHub Actions |
| D310 | HIGH | OIDC token exposed to local build script | GitHub Actions |
| D311 | MEDIUM | Lax artifact upload | GitHub Actions |
| D312 | MEDIUM | JavaScript install scripts in CI | GitHub Actions |
| D313 | LOW | Privileged job missing a bounded timeout while reachable accounts without write access can run pull request code. The default is 360 minutes on both GitHub-hosted and self-hosted runners; trusted jobs and jobs that do not run PR code are not reported | GitHub Actions |
| D350 | MEDIUM-CRITICAL | AI agent on an untrusted trigger with no actor gate | GitHub Actions |
| D351 | MEDIUM-CRITICAL | AI agent action's write-access check widened (*) |
GitHub Actions |
| D352 | MEDIUM-HIGH | AI agent can run any shell command on an untrusted trigger | GitHub Actions |
| D353 | MEDIUM-HIGH | Untrusted event text interpolated into an AI agent prompt | GitHub Actions |
| D354 | LOW-HIGH | AI agent action or CLI version with a published advisory | GitHub Actions |
| D360 | HIGH | Dependabot insecure-external-code-execution: allow on a bundler, mix or pip entry that uses private registries. Code from the manifests then runs with those registries' credentials. Without registries the option changes nothing (these tools already run manifest code, and GitHub turns it off only when registries are configured), and other ecosystems ignore it |
Dependabot (.github/dependabot.yml or .yaml at the scanned root) |
| D361 | LOW | Dependabot version updates proposed less than 7 days after a release. The shortest wait per entry counts: SemVer-bump days where GitHub supports them for the ecosystem, else default-days, else GitHub's 3-day default; exclude: ["*"] removes the cooldown and an include list without * leaves the other dependencies on the default. Entries with open-pull-requests-limit: 0 (version updates off) are skipped. One finding per file listing the entries; an ignore comment on an entry's own line drops that entry. Security updates are never delayed |
Dependabot |
| D362 | MEDIUM | fromJSON() of a secret whose result reaches a value GitHub prints or shows: run:, step and job with:, env:, strategy.matrix, job outputs, names, runs-on, environment, container and service image, options, env, entrypoint and args. Covers fromJSON(secrets.X).field, fromJSON(secrets.X), and an env variable holding the secret. GitHub masks the stored text only. Conditions, comparisons, contains(), timeouts, max-parallel, continue-on-error and secrets: passed to a reusable workflow are not reported |
GitHub Actions |
| D363 | LOW-MEDIUM | Obfuscation. MEDIUM: a uses: path with ., .. or empty segments, which GitHub resolves but name-matching rules and allow lists do not. LOW: a ${{ }} part that folds to a constant (format('{0}', 'x'), 'a' == 'a', toJSON('x')), fromJSON(toJSON(x)), or format('{0}', x). A literal alone (${{ true }}) and fromJSON() of a literal, the language's only way to write a list, object or typed number, are not reported. Folding stops, with no finding, past 2,000 steps or a 4,096-character value (format('{0}{0}', x) doubles its input) |
GitHub Actions |
| D364 | LOW-MEDIUM | Publishing with a stored token where the registry offers trusted publishing: pypa/gh-action-pypi-publish with password, twine upload, uv publish, poetry/hatch/pdm/flit publish, maturin publish to PyPI or TestPyPI, and npm/pnpm/yarn/bun publish, changeset publish and semantic-release to registry.npmjs.org, when a secret-backed token reaches the step (env such as TWINE_PASSWORD, NODE_AUTH_TOKEN, NPM_TOKEN, a --password/--token argument, or an .npmrc/.pypirc written earlier in the job). Not reported for other indexes and registries, npm on runners not proven GitHub-hosted, PyPI from pull_request_target/issue_comment workflows (PyPI refuses them), or PyPI from workflow_call-only workflows (PyPI does not support reusable workflows; npm checks the caller and is reported). A password that is not a stored secret (one minted through OIDC) is not a long-lived token. When the job grants id-token: write, npm tries trusted publishing first and the token is a fallback: LOW |
GitHub Actions |
| D314 | HIGH | Mutable container image | GitLab CI |
| D315 | HIGH | Unpinned external include | GitLab CI |
| D316 | HIGH | Literal secret variable | GitLab CI |
| D317 | HIGH | Untrusted eval | GitLab CI |
| D318 | HIGH | Docker-in-Docker TLS disabled | GitLab CI |
| D319 | HIGH | OIDC local-script exposure | GitLab CI |
| D320 | HIGH | Release cache poisoning risk | GitLab CI |
| D321 | MEDIUM | Privileged job missing timeout | GitLab CI |
| D322 | MEDIUM | Dynamic runner tag | GitLab CI |
| D323 | MEDIUM | Ambiguous secret token | GitLab CI |
| D330 | HIGH | Privileged edge container | Docker Compose |
| D331 | HIGH | Host device exposure | Docker Compose |
| D332 | MEDIUM | Host networking on edge service | Docker Compose |
| D333 | HIGH | Edge service runs as root | systemd |
| D334 | HIGH | Root service executes mutable path | systemd |
| D335 | MEDIUM | Edge service missing sandboxing | systemd |
| D336 | HIGH | Broad edge service privilege | systemd |
For GitHub Actions, D290 and D295 point to the relevant trigger or job's
runs-on declaration. Their inline ignores apply to that line or an immediately
preceding standalone YAML comment, not to other declarations or text inside
quoted values and script blocks.
D295 reports at HIGH severity. Runner-label order does not affect the check. Simple literal matrices are exempt only when every possible runner value can be proved to be a known GitHub-hosted label. Runner groups, unknown expressions and matrix combinations that cannot be resolved conservatively still produce a warning.
Decided by the ca9 engine (ca9.api.agent_config, audit_workflows,
ci_inventory); Skylos keeps only rows naming a file inside the scanned folder
that Git lists (a diff scan: files Git tracks; a full scan: files Git tracks or
does not ignore). Links to agent folders or configs that stay inside the
repository are followed and reported under the path the client opens, once per
real file; a new or changed link that leaves the repository or points nowhere
is an analysis error in a diff (exit 2). A subfolder scan also reports the
repository-level workflows and agent configs at the Git top. See
docs/agent-config-and-publish-rules.md.
| ID | Severity | Name | Files |
|---|---|---|---|
| D365 | HIGH-CRITICAL | Agent hook command committed in the repository. CRITICAL when the command downloads remote code, decodes and runs a payload, or runs a script disguised as a font or image. Hooks skylos agent install-hooks wrote are not reported: the whole command must be skylos hook <event> --client claude|codex|cursor with one of Skylos's fixed || fallbacks and nothing else, the program skylos on PATH or an absolute /…/skylos outside the repository and temp folders, and the settings file's env must not set PATH or loader variables; python -m skylos.entry is reported |
.claude/settings(.local).json, .gemini/settings.json, .cursor/hooks.json, .codex/hooks.json, .codex/config.toml |
| D366 | HIGH-CRITICAL | Editor task that runs when the folder opens (runOptions.runOn: "folderOpen"); severities as D365 |
.vscode/tasks.json, *.code-workspace |
| D367 | MEDIUM | MCP server launched without an exact version (npx -y pkg, @latest, uvx pkg, an image without a digest) |
.mcp.json, .cursor/mcp.json, .vscode/mcp.json, .kiro/settings/mcp.json, mcpServers blocks |
| D368 | HIGH | MCP server launched from a hidden home-directory or temp path outside the repository | MCP configs |
| D369 | MEDIUM | MCP server package whose name imitates a vendor it is not published by | MCP configs |
| D370 | HIGH | Agent API base URL (ANTHROPIC_BASE_URL, OPENAI_BASE_URL) overridden in committed settings |
agent settings |
| D371 | HIGH | Tool installed without a pinned version or hash in a job holding publish credentials or id-token: write |
GitHub Actions, GitLab CI |
| D372 | HIGH | Download without a checksum or signature check reaching the publish step | GitHub Actions, GitLab CI |
| D373 | HIGH | OIDC publish job without a deployment environment: |
GitHub Actions (id-token: write), GitLab CI (id_tokens) |
| D374 | HIGH | Publishing workflow startable by workflow_dispatch or a push to any branch |
GitHub Actions |
| D375 | MEDIUM | --diff only: the change adds or modifies a CI job that publishes packages (base ci_inventory against head, line numbers ignored) |
GitHub Actions, GitLab CI |
| D376 | MEDIUM | Secrets (secrets: inherit or named) passed to a reusable workflow from another repository |
GitHub Actions |
| D377 | MEDIUM | Agent or editor config with duplicated keys, so what you read is not what runs | agent and editor settings, MCP configs |
Built-in gate: in a whole-repository scan D365-D374, D376 and D377 are listed
and not counted, except a CRITICAL D365/D366. In a diff scan D365, D366, D368
and D370 fail the gate on their own; D367, D369 and D371-D377 count under the
normal limits. With --diff a finding is new when its rule, path and identity
(event, task, server or job name plus the whole unredacted command) are not
among the merge base's findings, not by changed lines, so a folderOpen
trigger added to an existing task or a hook moved to SessionStart is new;
without a comparable base every such finding in a changed file counts
(analysis_summary.config_diff_basis). A baseline scan does the same only for
the rules its baseline covered (rule_coverage, recorded by skylos baseline
from the installed ca9); with an older baseline these findings are listed, not
new. They match the baseline by rule, file and a SHA-256 digest of that
identity (kept local, never uploaded), not by line or the redacted shown value.
Under SKYLOS_POLICY_BASE (pull-request CI and gated diffs) a baseline entry
for D365-D377, malware, UPG001, HRD001 or AGE001 counts only when the base
commit's baseline has it too. A diff that changes agent/editor configs,
workflows or lockfiles without a usable ca9 (missing, too old, or lacking the
function) is an analysis error ("upgrade ca9"), never a pass. Commands in
findings and uploads are redacted.
These rules look at steps that run an AI coding agent:
anthropics/claude-code-action, anthropics/claude-code-base-action,
openai/codex-action, google-github-actions/run-gemini-cli,
actions/ai-inference, the opencode action (anomalyco/opencode/github), and
claude, codex exec, gemini or copilot CLIs started from a run: block.
Input names and built-in checks were read from each action's action.yml and
source on 13 Oct 2026.
An event is untrusted when an account without write access can start it:
issues (opened, edited, closed, reopened), issue_comment,
pull_request_target (fork pull requests), pull_request_review,
pull_request_review_comment, discussion, discussion_comment, and
workflow_run when an upstream workflow (resolved by name, through chained
workflow_runs) runs on pull requests or other untrusted events. Types such as
labeled or assigned need triage access, so they count as trusted. A local
reusable workflow inherits its caller's events and gate (via caller.yml).
A finding needs a path for attacker-written text to reach the agent: the action
loads the triggering thread itself (claude-code-action without prompt, the
opencode action), the prompt interpolates event text, an earlier step or job
writes that text to a file or output the agent reads, an env var holds it, the
agent has a tool that reads issues or pull requests (gh, GitHub MCP, shell),
or the job checks out the pull request's code. A fixed prompt over the base
branch with no such tool is not reported.
Gates. The if: conditions on the job, its needs chain and the step are
evaluated per event. These count as gates: author_association of the account
that triggered the event equal to, or in a fromJSON list of, OWNER, MEMBER or
COLLABORATOR; an exact github.actor or sender.login; a same-repository
pull request check (head.repo.full_name == github.repository, !fork) under
pull_request_target; workflow_run.event of a trusted event;
workflow_run.pull_requests (GitHub leaves it empty for fork pull requests);
github.event.repository.private == true; a gated needs job; an earlier step
that calls a collaborator or membership API, a known permission-check action,
or a script comparing author_association with a member value; and an
expression-valued environment (the fork-approval pattern). A fixed
environment: name is noted in the message, not treated as a gate, because
required reviewers are a repository setting Skylos cannot see; such findings
are capped at HIGH. Another entity's association (for example
github.event.issue.author_association on a comment event), != 'NONE', or
CONTRIBUTOR does not gate. A job that runs only for one value of a dispatcher
job's output, when that job reads the event type, is not assumed to run for
every event (a deliberate false-negative risk).
Built-in checks. claude-code-action refuses accounts without write access
on issue, comment, review and pull request events (and on workflow_run from
v1.0.185); allowed_non_write_users turns this off only when github_token
is passed, and allowed_bots: "*" lets any GitHub App through.
codex-action checks write access on every event unless allow-users: "*".
The opencode action checks write access. claude-code-base-action,
run-gemini-cli, ai-inference and the CLIs have no check.
Capability. shell (any command: Bash, Bash(*), wildcard rules on an
interpreter or package manager such as Bash(python:*), Bash(npm:*) or
Bash(bash -c:*) (an exact rule such as Bash(bun install) is not),
--dangerously-skip-permissions, permission mode
bypassPermissions, codex sandbox: danger-full-access or
safety-strategy: unsafe, Gemini YOLO with no tools.core allowlist or a
pinned CLI before 0.39.1, Copilot --allow-all-tools); tools (can change
things: claude-code-action tag mode, edit or write tools, write-capable gh or
MCP tools, codex sandbox with network access); read (read-only tools, codex's
default sandbox without network, Gemini without
GEMINI_CLI_TRUST_WORKSPACE, which ignores workspace settings and turns off
auto-approval); none (no tools: tools.core: [], ai-inference without MCP or
copilot-allow-tools, every built-in tool denied). Agents with no tools are
not reported by D350 to D353.
- D350 — an untrusted event reaches the agent with no gate while the job
holds secrets, a write token, undeclared token permissions or
id-token: write. CRITICAL with shell, HIGH with tools, MEDIUM with read-only tools. The message gives the path, for exampleissue_comment (anyone who can comment) → run-gemini-cli (...) with shell commands (...) and secrets GEMINI_API_KEY. - D351 — the action's own check is widened with
"*"; same severity model, capped at HIGH forallowed_botsalone. - D352 — the agent can run any shell command and an untrusted event can start it (HIGH), or a maintainer starts it on a comment or review thread that others wrote (MEDIUM).
- D353 — untrusted event text (
issue.title/body,comment.body,review.body,pull_request.title/body/head.ref,github.head_ref,discussion.title/body,workflow_run.head_branch/display_title,toJSON(github.event...)) is interpolated into a prompt input. Text written by the gated account that starts the agent does not count. HIGH when anyone can trigger it and the agent can act, otherwise MEDIUM. - D354 — the pinned release (tag or known release commit) is affected by
GHSA-8q5r-mmjf-575q (CVE-2026-47751, claude-code-action 1.0.0-1.0.73, fixed
in 1.0.74) or GHSA-wpqr-6v78-jr5g (CVE-2026-12537, run-gemini-cli before
0.1.22, or
gemini_cli_versionbefore 0.39.1). The claude advisory range says< 1.0.74, but its text says@beta(which is v0.0.63) is fixed, so v0 is not reported. HIGH for a critical advisory on a workflow with an untrusted event, MEDIUM otherwise; LOW for the medium advisory without one.
Suppress with # skylos: ignore[SKY-D35x] on the reported line or the line
above it. SKY-D355 to SKY-D359 cover the Python checks described above.
| ID | Severity | What it reports |
|---|---|---|
| SKY-D380 | HIGH | Paramiko or Go SSH client configuration that accepts unknown host keys. |
| SKY-D384 | MEDIUM | ECB selected by a recognized Python cipher or Kotlin JCA block cipher. |
| SKY-D430 | HIGH | A recognized Python TLS configuration explicitly selecting TLS 1.0, TLS 1.1, or an older protocol. |
| SKY-D431 | HIGH | A browser Window sends runtime data to a wildcard origin, or unchecked Window message data reaches a supported sensitive action. |
| SKY-D432 | MEDIUM | A Spring Boot application configuration exposes all enabled Actuator endpoints over HTTP. |
| SKY-D433 | MEDIUM | A recognized Spring Security configuration explicitly disables CSRF protection. |
| SKY-D434 | HIGH | A sensitive value is written to Foundation UserDefaults in Swift. |
| SKY-D435 | MEDIUM | A direct unbounded C library write in C++. |
| SKY-D436 | HIGH | A source-visible C allocation is freed twice in the same straight-line C++ block. |
| SKY-D437 | HIGH | A source-visible C allocation is dereferenced after being freed in the same straight-line C++ block. |
Skylos correlates resources in one rendered multi-document Kubernetes file.
The scan is deliberately opt-in: the Ingress must declare
skylos.dev/network-scope: external (or public) and
skylos.dev/backend-protocol: http. Skylos then emits a finding only when it
can construct one unambiguous static chain inside that same file:
annotated Ingress path -> Service port -> selected workload -> one container
-> matching target port -> bare Flask/Uvicorn/Gunicorn executable, target, and binding
For SKY-DEP001, the workload Pod template also supplies the route contract:
metadata:
annotations:
skylos.dev/source-file: app/main.py
skylos.dev/required-guards: require_admin, require_employeeskylos.dev/source-file is a repository-relative Python file that must match
the server's literal module target. skylos.dev/required-guards is a
comma-separated list of guard names. Skylos checks direct, top-level literal
routes on the resolved FastAPI or Flask application symbol. A route is reported
only when its Ingress-reachable path contains a sensitive segment such as
admin, internal, debug, manage, metrics, or pprof and one or more
declared guards are missing. Recognized guard locations are application or
route dependencies, handler dependency parameters, and handler decorators.
Guard names match the declared expression identity exactly; for example,
auth.require_admin does not match other.require_admin. Sensitive route
names do not bypass an explicit required-guards contract.
SKY-DEP002 is narrower: it reports an effective Flask debugger enabled by
literal --debug / --no-debug and --debugger / --no-debugger precedence on
the resolved externally routed container. SKY-DEP003 separately reports a
literal --reload flag on a resolved Flask, Uvicorn, or Gunicorn container, or
Flask debug mode when it implies reload and --no-reload is absent.
These two command checks do not require the source-file or required-guards
annotations. All three rules require a literal 0.0.0.0 or :: server bind,
numeric server port, and a Service target port that reaches that binding.
Backend transport evidence must be explicitly plain HTTP; HTTPS, H2, gRPC,
passthrough, controller TLS/path rewrites, snippets, middleware chains, and
other unproved protocols make the scanner abstain. An Ingress
defaultBackend is correlated only when the Ingress has no explicit rules,
because explicit paths take precedence before the default backend.
The scanner abstains when a proof edge is missing, dynamic, invalid, or
non-unique. Scope, backend-protocol, source-file, and required-guards
annotations are repository-owned declarations, and emitted evidence remains a candidate
correlated-static proof. Skylos verifies exact framework wiring, not the
guard implementation's semantics. The source annotation also does not prove
that the analyzed file was built into the referenced container image, and a
literal executable name does not attest the server binary's provenance inside
the image. Direct route ordering and obvious route-graph mutation are checked;
ambiguous router composition makes the scanner abstain. It does not join
resources split across different files, inspect nested routers or
factory-registered routes for SKY-DEP001, render Helm or Kustomize, execute a
manifest, query a cluster, or infer live network policy. Direct LoadBalancer
and NodePort Services without an annotated Ingress are outside this rule
family. Kubernetes List wrappers and resources whose metadata cannot be
positioned precisely are also outside the proof surface. For security gates,
keep the annotations in protected deployment
policy because removing an opt-in contract makes this rule family abstain.
| ID | Severity | Category | Name | Correlated static evidence |
|---|---|---|---|---|
| SKY-DEP001 | HIGH | Security | Externally deployed route is missing a required auth guard | Annotated Ingress, Service, workload/container, explicit entrypoint, contracted source, direct FastAPI/Flask route, and exact required guard |
| SKY-DEP002 | HIGH | Security | External Ingress exposes the Flask development debugger | Annotated Ingress, Service, workload/container, matching Flask binding, and an effective literal debugger flag |
| SKY-DEP003 | MEDIUM | Reliability | External Ingress routes to a reload-mode application server | Annotated Ingress, Service, workload/container, matching Flask/Uvicorn/Gunicorn binding, and a literal flag that effectively enables reload |
Skylos treats .skylos/gpu-targets.yml version 1 as the repository's explicit
deployment truth. A target declares the NVIDIA driver, CUDA compute capability,
and platform that a release must support:
version: 1
targets:
- name: inference-t4
vendor: nvidia
driver: "535.104.05"
compute_capability: "7.5"
platform: linux/amd64These rules statically cross-check that target profile against Docker image, CUDA build, and TensorRT packaging evidence before release. They do not probe installed hardware or drivers, and they do not perform package CVE analysis. All targets in one profile are treated as recipients of the same release; repositories with separate per-device artifacts should scan each deployable with its own target contract.
The contract is fail-closed once present: malformed YAML, duplicate or unknown
keys, empty targets, invalid driver values, deletion in a changed-file scan,
unsupported platform values, and bounded evidence discovery that cannot finish
emit SKY-GPU000. Platforms are limited to linux or windows, optionally
with /amd64 or /arm64. The
default quality gate allows zero Reliability findings, so a proved GPU release
break blocks --gate without requiring --strict.
Explicitly selecting any SKY-GPU rule opts the scan into this contract: a
missing profile emits SKY-GPU000, and selecting SKY-GPU001, SKY-GPU002,
or SKY-GPU003 automatically retains that prerequisite finding. This prevents
a narrow --select ... --gate command from hiding an invalid or absent
contract and passing open.
SKY-GPU001 evaluates the effective final Docker stage, including its resolved
stage-alias ancestry, when it is an NVIDIA CUDA image
and compares the declared target driver with NVIDIA's CUDA-major
minor-compatibility branch floor. Windows targets use the Windows branch floor;
an omitted platform defaults to Linux. Skylos deliberately does not treat a
cuda-compat-* token as a waiver: NVIDIA forward compatibility also depends on
the exact package/driver matrix, loader configuration, supported GPU class, and
feature use. Teams relying on that path must document an explicit inline rule
waiver at the CUDA FROM instruction.
SKY-GPU002 models output kind and direction: unsuffixed CMake architectures
produce both real SASS and virtual PTX, -real and -virtual are distinct, and
PTX covers only equal-or-newer compute capabilities. A cubin covers compatible
devices in its compute-capability major family. An actual nvcc -arch=sm_*
command proves both cubin and PTX output; quoted examples and echo text do not
count as build evidence. Dynamic/conditional values, native, target-level
overrides, or multiple independent architecture evidence files produce
SKY-GPU000 rather than a confident compatibility result.
SKY-GPU003 ties a syntactically valid Python TensorRT build call to the exact
config object, a later binary write of that result, an exact repository-relative
engine path, and a COPY/ADD in the final Docker stage. C++ matching requires
NvInfer.h and ordered builder/config/output evidence. AMPERE_PLUS counts only
when applied to that config before serialization; it does not imply portability
across different operating-system/CPU platforms.
| ID | Severity | Name | Cross-file evidence |
|---|---|---|---|
| SKY-GPU000 | HIGH | GPU release contract is invalid or incomplete | Contract schema/deletion or bounded evidence proof could not complete |
| SKY-GPU001 | HIGH | CUDA image requires newer NVIDIA driver | CUDA container image and declared target driver |
| SKY-GPU002 | HIGH | CUDA target architecture missing from build | CUDA architecture flags and declared compute capability |
| SKY-GPU003 | HIGH | TensorRT engine is not portable across target GPUs | Serialized engine packaging, compatibility flags, and heterogeneous target GPUs |
| ID | Severity | Name | Languages / Scope | CWE |
|---|---|---|---|---|
| S101 | HIGH-CRITICAL | Hardcoded secret / API key | Python, TS/JS, Java, Kotlin, Go, PHP, Rust, Swift, Dart, C#, C/C++, shell scripts (including extensionless files with a shell #! line), Dockerfiles, Terraform (.tf, .tfvars, .hcl), .properties, XML, Gradle, .npmrc, .pypirc and config files |
CWE-798 |
| S102 | HIGH* | Secret material or server-only environment variable exposed to client-accessible code | TS/JS, HTML, client bundles | CWE-200 |
SKY-S101 is CRITICAL for provider tokens and for high-entropy values
under a secret-like name (key, token, secret, password, auth,
credential, private, api, session, cookie, signature/sig
before the value on its line, or the user-info, secret-named parameter or
webhook path of a URL), including when a type annotation sits between the
name and the value (API_TOKEN: &str = "..." in Rust, apiToken: string = "..." in TypeScript, API_TOKEN: str = "..." in Python,
var apiToken string = "..." and apiToken := "..." in Go). The Go engine's
own SKY-S101 (HIGH) needs a credential-named variable, struct field or map
key assigned a literal value; a keyword inside a message, format string, flag
name, case label or environment-variable name is not a secret. A generic high-entropy value with no such name is
HIGH with "severity_reason": "no_secret_name"; the default gate still
counts it under max_secrets. Two other lower-certainty shapes are HIGH:
a password embedded in a connection URL
(provider: url_credentials, e.g. postgres://app:<pw>@db/app) and a
non-placeholder literal under a password/secret/token/api-key field in YAML,
JSON, TOML, INI, .env, .properties, .tfvars, .npmrc or .pypirc files
(provider: config_credential). Env-var and template references
(${DB_PASSWORD}, {{ .Values.x }}, shell ${TOKEN:?message} and
$(command); a ${TOKEN:-literal} default is still checked), placeholders
(changeme, <password>, your_password_here) and secret names
(existingSecret, secretName, password_file) are not reported, and
previews are always fully masked.
Values that are not credentials by construction are not reported as generic
secrets: a sentence written for a reader under a credential-named key
(capitalised or in a script without case, natural words only in any script,
with their vowel signs and joiners, sentence punctuation including 。, ।,
۔, ؟, ။ and ។; placeholders such as {{length}}, {n}, %s, ICU
{n, plural, ...} branches and markup tags are left out; a lowercase run of
words can be a passphrase and stays), in a translation catalog (see SKY-D260)
any natural-language value, labels and single words included
("LABEL_CONFIRM_CURRENT_PASSWORD": "Confirm your current password",
"api-key": "API-ключ"), and tokens inside a gettext-style message id or
copied from it into the translation, prose under a key whose last word says it
describes the credential (api_key_description, token_hint), a storage or
field name that restates its key behind a short namespace
(LOGIN_CREDENTIALS: "app_login_credentials"), references such as
${oc.env:API_KEY}, ${var.db_password} and ${TOKEN:-$OTHER_TOKEN} (a
literal default stays), text built around ${...} interpolations with no
default and no random run (${var.project_name}-sqlite-data, a template
expression cut at an inner quote), a modular-crypt password hash ($2a$10$...,
$argon2id$..., pbkdf2_sha256$...) on a comment line or in documentation,
a camel-case name under a generic key (web3SandboxChallenge), an unnamed
base64 literal that decodes to printable text
holding no credential (binary data, a user:password pair and named values
stay), a CSS class in a class="..." attribute, tokens in the path of a
scheme-relative URL, and a word slug under a bare *_KEY name. bun.lock
integrity digests are recognised for lockfile versions 0 to 3, with the
commit id and tarball digest of a github: dependency.
Values that are public by structure are not reported as generic
high-entropy secrets, in skylos . --secrets and in skylos done alike:
hex digests that name their algorithm (sha256:<64 hex> in integrity or
contentHash fields; a bare hex value in an integrity field is still
reported), public keys and certificates (PEM PUBLIC KEY/CERTIFICATE
blocks whose body is DER, OpenPGP or SSH key data; ssh-ed25519 AAAA...
lines; the x/y/n/e members of a JSON Web Key), 0x + 40-hex
contract and wallet addresses, Base58Check pay-to-hash addresses whose
checksum verifies (Bitcoin 1.../3..., Litecoin, Dogecoin, Dash X...,
Tron T...; a WIF private key or an extended key has another length and
stays) and SegWit bc1.../ltc1... addresses with a valid bech32 checksum,
ordered character alphabets (a-z, A-Z, then 1234567890), a whole
string literal that is a shuffled standard encoding alphabet (base64,
base64url, crypt, base62, base58, base36 or a base32 variant, each character
once) passed to an alphabet constructor or bound to an *alphabet*/*charset*
name (Alphabet::new("AphruV…"); without that context it stays a finding
with public_identifier_evidence), ids in the
path of Google Docs/Forms/Drive,
YouTube, Figma and Notion share URLs, CSP source and subresource-integrity
hashes outside lockfiles ('sha256-<base64 digest>', integrity="sha384-..."
with a digest of the algorithm's exact length, unless a secret- or
session-named value holds it), parts of URLs other than user info,
secret-named query/fragment parameters (api_key=, access_token=, sig=,
X-Amz-Signature=) and webhook/bot/token paths, file paths (/srv/x/y,
./a/b, C:\\x\\y, dir/name.ext; not ab/<token> or a base64 value with
+/=), word slugs (What-is-the-build-volume, INTRA-001-amendment-v2,
ELBSecurityPolicy-TLS13-1-2-2021-06),
lines of minified .js bundles over 1,000 characters, &anchor/!!tag
decorated values outside YAML files (&mut DecompressionMatcherBuilder in
Rust is a reference to a type), and, under a
secret-sounding name, a whole file path, a URL with no credential and no
random component, whole-value references
(${{ secrets.X }}, ${X}, $X, %X%, {{ .Values.x }}; not
${X:-literal} or || 'literal'), lists of environment variable names
(GH_TOKEN,NPM_TOKEN), the key's own name in another case
(ADMIN_PASSWORD: "adminPassword"), URLs assigned to *_URL/*_URI/
*_ENDPOINT names (the URL's own parts are still scanned) and Secret Manager
references (NAME:latest). In JS/TS test files (*.test.*, *.spec.*,
__tests__/, __mocks__/), Go test files (*_test.go) and test-fixture
directories (testdata/) only provider-shaped tokens are reported, as in
Python test directories; in Rust the same holds for code under
#[cfg(test)] or #[cfg(all(test, ..))] wherever rustc accepts the
attribute (items, struct fields in a value, statements, match arms, enum
variants), #![cfg(test)] files, files their parent declares
#[cfg(test)] mod name;, test-module file names (tests.rs, test.rs,
*_tests.rs, *_test.rs), and functions whose attribute path ends in
test or bench or is rstest/test_case/test_matrix/quickcheck
(#[test], #[tokio::test], #[idm_test]), when the file parses cleanly.
In that test code a provider-shaped token whose payload is mostly long
keyboard runs (a sk_test_ prefix followed by 1234567890abcdefghijklmnop)
is a fixture; outside
tests such tokens stay findings. urn:ietf:params: URNs (RFC 3553, e.g.
OAuth token types) are public identifiers, not secrets. Cypress (cypress/, *.cy.ts) and end-to-end
(e2e/) suites count as JS test code, and the TS/JS literal check follows the
same policy. Minified and vendored front-end files (a .min
suffix, an average line length above 110 characters, or a library folder
under static/ or public/) are skipped like other generated files and
named in the scan's skip line. A private-key header in prose, markup or
before a placeholder (<code>-----BEGIN RSA PRIVATE KEY-----</code>,
\n...\n) is not a key, nor is a key body cut short by an elision line
(..., …, [...], <snip>); PKCS#8 (-----BEGIN PRIVATE KEY-----), encrypted PKCS#8 and
OpenPGP private keys are reported when key data follows the header.
Provider-shaped tokens (AWS, GitHub, GitLab, Slack, Stripe, Google,
SendGrid, Twilio) are never filtered by these shapes.
Descriptive *_token labels are also excluded from generic entropy
findings when the key has at least three words and the complete lowercase
literal restates every word in order, with ordinary spaces, slashes or hyphens.
One interior metadata qualifier, such as model, input or type, is
allowed; arbitrary extra words, prefixes, suffixes, digits and encoded
values and computed expressions are still scanned. Credential terms such as
api, access, secret or password prevent this exclusion. Spaces alone never exempt
a value: high-entropy passphrases and provider-shaped credentials remain
eligible for reporting. This behavior applies across the secret scanner's
supported source and configuration formats.
TS/JS SKY-S101 also reports a string literal of any length or entropy
passed where a library takes the key that signs or salts what it issues:
express-session secret, cookie-session secret/keys, cookieParser(secret),
jsonwebtoken sign/verify key, express-jwt secret, passport-jwt
secretOrKey, crypto.createHmac(alg, key) and the Hashids salt. The callee
must resolve to that package's import or require; the literal may be passed
directly, through a variable bound once, in an array, or as the fallback of an
environment variable (process.env.JWT_SECRET || 'superSecret', HIGH; a
direct literal is CRITICAL). The finding carries secret_sink. A key read
from the environment or a parameter, and test code, are not reported; private
keys and provider tokens are left to the provider signatures.
SKY-S102 preserves the SKY-S101 severity when it reclassifies a concrete
hardcoded credential; environment-reference exposure is HIGH. A file is
client-accessible by whole path segments of its path from the scan root
(public/, static/, assets/, .next/static/, build/client/,
dist/client/, out/); src/statics/ or mypublic/ is not.
| ID | Severity | Name | Scope |
|---|---|---|---|
| SC001 | HIGH | Security contract regression | Diff-aware CI/CD review |
The Go engine may emit SKY-G IDs. Cross-language equivalents are remapped to
SKY-D before normal reporting where possible.
| Go Output | Unified ID | Vulnerability |
|---|---|---|
| SKY-G203 | SKY-G203 | Defer in loop / resource leak risk |
| SKY-G206 | SKY-G206 | Unsafe package usage |
| SKY-G207 | SKY-D207 | Weak MD5 |
| SKY-G208 | SKY-D208 | Weak SHA1 |
| SKY-G209 | SKY-D250 | Weak random source |
| SKY-G210 | SKY-D210 | TLS verification disabled |
| SKY-G211 | SKY-D211 | SQL injection |
| SKY-G212 | SKY-D212 | Command injection |
| SKY-G215 | SKY-D215 | Path traversal |
| SKY-G216 | SKY-D216 | SSRF |
| SKY-G220 | SKY-D230 | Open redirect |
| SKY-G221 | SKY-D252 | Insecure cookie flags |
| SKY-G226 | SKY-D226 | XSS: request input marked safe for html/template |
| SKY-G228 | SKY-D228 | XSS: request input written to an HTML response |
| SKY-G260 | SKY-G260 | Unclosed resource |
| SKY-G280 | SKY-G280 | Weak TLS version |
| SKY-G305 | SKY-D215 | Archive extraction path traversal |
AI-defect grouping is based on finding category, not only the rule-ID prefix.
The CLI flag is --ai-defects, JSON reports use the top-level ai_defects
bucket, and individual findings use category ai_defect. Some hallucination
rules keep historical SKY-L or SKY-D IDs for compatibility with existing
suppressions, baselines, CI policies, and docs links; new AI-defect-only rules
use the SKY-A prefix.
| ID | Severity | Name | Languages |
|---|---|---|---|
| A101 | MEDIUM | Test assertion weakening: a specific assertion replaced by a broad one, an exception assertion removed or loosened (toThrow("message") to toThrow()/toThrow(/./)/not.toThrow(), pytest.raises losing match= or widened to Exception, assertRaisesRegex to assertRaises), mocks or expected values broadened |
Diff-aware tests |
| A102 | LOW | High-risk change without tests | Diff-aware PR signal |
| A103 | HIGH | CI permission expansion | GitHub Actions |
| A104 | MEDIUM | Public CLI surface drift | Diff-aware CLI |
| A105 | HIGH | Contract route guard missing | Python contract verify |
| A106 | LOW | Suspicious dependency version bump | Python manifests and lock files in Git changes |
| A110 | HIGH | Test deleted (skylos done; Python and JS/TS: for test files in other languages the check says "Skylos can't read tests yet, so deleted or skipped tests weren't checked" and does not pass, without blocking): a test that existed at the base is gone and no moved, renamed or rewritten test replaces it (a pasted copy of a test that is still there never does), it lost literal parametrize/.each cases, it is left with no countable assertion, or it was overwritten in place by a test of something else while the code it tested is still there. Advice: a test renamed, merged (also into a parametrized or .each test whose cases run at least as many assertions, in any file) or rewritten with a different body, fewer countable assertions, a new return before assertions, a deletion that goes with removed code (feature removal: a deleted module, export, function, method, object member, checked text, or a module the change stopped using) |
Python and JS/TS tests |
| A111 | HIGH | Test newly skipped (skylos done): skip, skipif, xfail, pytest.skip(), importorskip or skipTest added to an existing test or to an existing pytest.param row of its parametrize table; for JS/TS .skip, xit/xdescribe, .todo, .fixme, skipIf/runIf, .failing/.fails, or a runtime skip, and any newly added focus (.only, fit, fdescribe), which stops the other tests in the file from running |
Python and JS/TS tests (Jest, Vitest, Mocha, node:test, Playwright Test) |
| A112 | HIGH | Test settings loosened (skylos done): Playwright projects removed, pytest selection options, conftest.py hooks that drop tests or rewrite results, coverage floors, CI test steps that may fail; Jest/Vitest ignore, exclude, testMatch/testRegex/roots/include/dir and projects changes that stop running existing test files, passWithNoTests, lower coverage thresholds, package.json test scripts that filter tests, may fail or no longer run a test runner. Not reported: a brand-new pytest config or a filter that leaves out no existing test file, a project's first test script, ignored tests that run in their own CI step, a new advisory CI step |
pytest, coverage, Jest, Vitest, package.json, GitHub Actions |
| A113 | HIGH | Tests fail when Skylos runs them (skylos done), or an expected test did not run (a pytest test skipped here with the same body that passes on the base commit; for Go, Rust, Java and other languages without a test inventory: a test that passed on the base commit and here was reported skipped, or missing while its class or package ran, when the change edits their test files and the command writes JUnit; tests the base's own collection also leaves out, under unchanged pytest settings and conftest.py files, do not count): a Python test or parameter case, or a JS/TS test that passed on the base commit and was skipped or reported no result here although its file ran, with no skip or focus the inventory can see. A computed parametrize case list whose sources the change edits is counted by pytest's collection on the base commit; fewer cases here are reported, and the total stays unfinished only when the base cannot answer. Each failing test is rerun on the base commit and labeled with its failure origin (preexisting, introduced, new_test or undetermined); every failure still blocks unless allow_preexisting_failures is set |
Any test command; JUnit XML for details |
| A114 | HIGH | Skylos settings or hooks changed (skylos done): protected paths, [tool.skylos], the CI workflow that runs Skylos |
Repository files |
| A115 | HIGH | Test answer hard-coded in code (skylos done): an added branch, match/switch case, conditional expression or lookup table answers one test assertion's literal input with that assertion's literal expected value (if n == 3: return 6 for assert factorial(3) == 6), in a function that otherwise computes its answer, for an assertion that existed at the base. Advice: the same pattern for a test added in the change, a function that is only a table, a test that does not call the function, an input the code or docs already use, a word mapped to a word, an input a test passes with a different answer, small pairs a real edge case could produce, code in generated files or in a new script nothing imports or runs, a result that depends on a call count |
Python and JS/TS non-test code; Python/JS/TS tests and JSON input/output test data |
| A116 | HIGH | Code detects the test run (skylos done): added non-test code reads the variables pytest sets while it runs (PYTEST_CURRENT_TEST), checks "pytest" in sys.modules, sys.argv, sys._called_from_test or the call stack for a test, reads process.env.JEST_WORKER_ID/VITEST/other variables a runner sets, typeof jest/globalThis.vi and other runner globals, import.meta.vitest outside an in-source test block, or opens the tests' own files. Advice: NODE_ENV/import.meta.env.MODE or an environment variable compared with "test", and test files read by a new script nothing imports or runs or by repository tooling (scripts/, tools/, bin/, .github/, validate-*) that no production code imports. Test helpers, setup, config files and pytest plugins are left out |
Python and JS/TS non-test code |
| A117 | HIGH | Comparison rigged to always pass (skylos done): added __eq__ that always returns True or ignores the other value, __ne__ always False, __contains__ always True, JS equals()/isEqual() always true or ignoring its argument, compareTo() always 0, valueOf()/[Symbol.toPrimitive] returning a constant. Advice: constant ordering methods, constant __hash__, constant __str__/__repr__/toString() equal to text a test expects, wildcard classes such as ANY |
Python and JS/TS non-test code |
| A118 | LOW | Inline suppression added (skylos done, advice): a comment or attribute on an added line of non-test code that tells a linter, type checker, coverage tool or scanner to look away: # noqa, # type: ignore, # pyright: ignore, # pylint: disable, # nosec, NOSONAR, # pragma: no cover, eslint-disable*, @ts-ignore/@ts-expect-error/@ts-nocheck, istanbul/c8/v8 ignore, biome-ignore, //nolint, //lint:ignore, #nosec, #[allow(...)], @SuppressWarnings, # skylos: ignore and others. Says whether a reason is given and whether it covers a whole file. Also _ = x / void x; added only to hide an unused variable. Suppressions already at the base, moved or kept on an edited line, in test files or in generated files are not reported |
Python, JS/TS, Go, Rust, Java/Kotlin, C# |
| A119 | HIGH | Linter or scanner settings weakened (skylos done, advice by default; blocks with silenced_checks = "block"): a rule ignored, disabled, turned off or lowered, a path excluded that holds checked source files, strict or a strictness flag turned off, a type-checking mode or level lowered, a preset or selected rule dropped, a secret or finding allow-listed. Paths holding only test files are advice; skipLibCheck and new rules are not weakening |
ruff, flake8, pylint, mypy, pyright, bandit, tsconfig, ESLint, Biome, SonarQube, Semgrep, CodeQL, Snyk, gitleaks, detect-secrets, Trivy, OSV-Scanner, golangci-lint, Cargo lints, pre-commit, Checkstyle/SpotBugs suppressions |
| A120 | MEDIUM | Changed line not checked by tests (skylos done, advice by default): no test runs the line, or no test fails when Skylos deliberately changes it. A line tests run that no mutation applies to (a raise with only its message, return None) counts as checked |
Python with pytest |
| A121 | HIGH | CI check weakened (skylos done, advice by default; blocks with silenced_checks = "block"): a lint, type-check, format-check, scan or test step or job that can now fail without failing the build (continue-on-error, || true, --exit-zero, --max-warnings raised, allow_failure, when: manual), was removed and nothing else runs that tool, is disabled (if: false, when: never), whose workflow no longer runs on pull requests, or that an aggregate job no longer needs |
GitHub Actions, GitLab CI |
| A122 | MEDIUM | AI-reviewer settings changed (skylos done advice by default, blocks with guardrail_tampering = "block"; also in diff-aware scans): the change edits a file an AI code reviewer reads its instructions or settings from: .coderabbit.yaml, .coderabbit.config.ts, root REVIEW.md, .cursor/BUGBOT.md (any folder), .cursor/config/bugbot.yaml, greptile.json, .greptile/, .gemini/styleguide.md, .gemini/config.yaml, .pr_agent.toml, root best_practices.md, .macroscope/, macroscope_approvability.md, .macroscope-ignore, .github/copilot-instructions.md, .github/instructions/**/*.instructions.md, .github/skills/, .bito.yaml, .ellipsis/code-review.yaml. The message names each changed setting and says which branch the reviewer reads (Copilot, CodeRabbit, Macroscope and Bito read the pull request's head). Changes that narrow the review come first: exclusions or ignore patterns added, review or a review tool turned off, a higher comment threshold, fewer comments, a quieter profile, approval turned on, added "do not flag"/"ignore"/"approve" instructions. In root AGENTS.md/GEMINI.md and any CLAUDE.md, which Copilot code review and Claude Code Review also read, only added lines aimed at the reviewer count. Not reported: edits to comments, whitespace, formatting, key or line order, or reformatted YAML/JSON/TOML with the same settings, or a skill moved between .github/skills/, .agents/skills/ and .claude/skills/. Findings are kept by --diff off added lines, run when no supported source file changed, and are not hidden by a local baseline |
Any repository |
| A125 | MEDIUM | Scanner suppression marker added (skylos done advice by default, blocks with guardrail_tampering = "block"; also in diff-aware scans): a comment on an added line that tells a code-scanning platform to stop reporting: DeepSource skipcq, JetBrains/Qodana noinspection, Qlty qlty-ignore, CodeScene @codescene(disable...), CodeQL alert-suppression codeql[...]/lgtm[...], Checkov checkov:skip=, Trivy trivy:ignore:/tfsec:ignore:, KICS kics-scan; and NOSONAR/nosemgrep in languages SKY-A118 does not read (PHP, Ruby, Swift, Scala, Dart, C/C++, shell, Terraform, YAML, SQL and others). Says what stops being reported (line, next statement, function, resource block or file) and whether a reason is given. Not reported: markers SKY-A118 covers, markers in strings or documentation, NOSONAR on a comment-only line (prose), prose mentions of noinspection or qlty-ignore without their directive form, markers moved or kept on an edited line, test files in any language (counted), generated and vendored files. Not covered: Snyk Code deepcode ignore (undocumented) and Codacy (no marker of its own) |
Any language with comments |
| A135 | MEDIUM | Code left unused by the change (skylos done, advice by default; blocks with branch_orphans = "block"): a function, method or class (or a JS/TS file) that production code used at the base and that no production code calls at the head, most often in a file the change did not touch, where line-based diff checks never look. The message names the removed or changed line that called it ("`price_label` (not touched by this change) lost its last caller when app/checkout.py:6 changed") and says when only tests still call it. Liveness comes from the dead-code engine with test files left out on both sides (confidence 75 or more). A symbol the engine abstains on (for example a weak helper name) is still reported, as advice that never blocks, when a removed line used it and no static reference is left. Not reported: code already unused at the base, code moved with its callers, renames whose callers were all updated, and anything whose name appears in a file the analyzer could not parse or in a template or configuration file (counted as not judged) |
Languages the dead-code engine covers: Python, JS/TS, Java (private and package-private members), Kotlin (private members), Go (unexported, needs the skylos-go engine), PHP, Rust and others; an engine that is not installed is listed as not checked |
| A136 | LOW | New code nothing calls (skylos done, advice; blocks with branch_orphans = "block"): a function, method, class or JS/TS file the change added that nothing calls, or whose only callers are themselves unused. Entry points, framework roots (routes, views, fixtures, commands), exported public API and dispatch the dead-code engine recognizes are alive; a definition moved or renamed from elsewhere in the change is not new; a name that appears in a template or configuration file, or a symbol a decorator may register (@app.route(...), @bus.subscribe(...), a Java annotation), is not judged |
Languages the dead-code engine covers: Python, JS/TS, Java (private and package-private members), Kotlin (private members), Go (unexported, needs the skylos-go engine), PHP, Rust and others; an engine that is not installed is listed as not checked |
| A137 | LOW | New code only tests call (skylos done, advice even with branch_orphans = "block" unless listed in branch_orphans_block_rules): a symbol or JS/TS file the change added whose only callers are test files ("added foo() and a test for it, and no production caller"). The message names the test. Test files: tests/, test_*.py using a test framework, conftest.py, *.test.*/*.spec.*, __tests__/, *_test.go, src/test/ |
Languages the dead-code engine covers: Python, JS/TS, Java (private and package-private members), Kotlin (private members), Go (unexported, needs the skylos-go engine), PHP, Rust and others; an engine that is not installed is listed as not checked |
| L012 | CRITICAL | Phantom function, import, or module-member reference | Python, TS/JS, Go, Java |
| L023 | CRITICAL | Phantom decorator | Python |
| D222 | CRITICAL | Dependency hallucination (imports and manifests; Go modules are looked up on the module proxy with its case-encoding, github.com/!burnt!sushi/toml) |
Python, manifests (go.mod, package.json, requirements) |
| D224 | HIGH | API signature hallucination | Python |
| D225 | HIGH | Dependency version hallucination | Python, npm, Go |
Python import names can differ from distribution names. Skylos maps declared
distributions to import paths from installed distribution metadata, a curated
table of well-known mismatches (beautifulsoup4 -> bs4, djangorestframework
-> rest_framework, PyYAML -> yaml, Pillow -> PIL), the pipreqs table
and conservative name rules (django-guardian -> guardian), then checks
bounded PyPI wheel indexes for the rest. Requirements files are read like pip
reads them: -r/-c includes inside the project, \ continuations and
--hash options (pip-compile and uv pip compile lock files). Declared
dependencies come from requirements files, pyproject.toml (dependencies,
optional dependencies, dependency groups, Poetry), setup.cfg ([options]
install_requires/setup_requires/tests_require, [options.extras_require],
file: requirement lists inside the project) and literal setup.py keywords
(including module-level lists). These files are parsed, never run; a
setup(**kwargs), attr: or computed list leaves the declarations open-ended.
Nested projects use their own manifests.
Namespace packages require the imported portion's full path: a distribution
providing sphinxcontrib.applehelp does not establish
sphinxcontrib.serializinghtml. Target packages are never installed or executed.
setuptools and other build-backend imports in setup.py are not runtime
dependencies. The same holds for a module beside setup.py that it imports, and for
distributions listed in [build-system].requires (PEP 518) there. A script's own
PEP 723 block (# /// script) declares its dependencies for SKY-D223.
A missing PyPI project for an import name alone does not prove a hallucinated
dependency. "Could not verify" is never a finding: when a declared provider that
is related to the import (by name, mapping or partial inventory) is source-only,
private, dynamic, unsupported or unavailable, or the declarations are open-ended
(private index, dynamic metadata), the import is only counted in
analysis_summary.dependency_imports. An import that no declared distribution
resembles stays visible: MEDIUM SKY-D223 "Possible hallucinated import" while
some declared distributions are uninspected, SKY-D222 once all are. Installed
metadata naming a different, undeclared distribution is reported as an
undeclared import. An exact compatible pin with an unambiguous artifact
inventory can support absence evidence. Compatible platform wheels can confirm import paths
they contain, but cannot prove an import is absent, even with an exact pin.
Editable-install inventories can use compatible wheel paths as positive
evidence, but their incomplete RECORDs cannot prove that an import is absent,
even with an exact pin. Provider inventories and registry
answers are reused within the current analysis, and
repository cache files are not accepted as trusted evidence. Provider checks do
not resolve lockfiles into a deployed environment.
Additional Python environment definitions can supply positive declaration
evidence: plain Pipfile [packages] entries, environment.yml/environment.yaml
dependencies, supported straight-line setup-script installs and the unambiguous
final Dockerfile stage that copies the code. A nearer Python manifest sets the
environment boundary. Conditional shell execution, install-target changes and
ambiguous build stages do not establish that an import is provided. These files
are read as bounded text, never executed or installed; unsupported shapes
retain the normal import check.
A single unambiguous Compose configuration can also declare packages for the
exact Python file named by a service's command. The supported shape uses a
literal read-only repository mount, a selected official Python Dockerfile stage
and straight-line python -m pip install commands, optionally with literal
versions sourced from a copied .env file. This evidence applies only to that
entry file, not its siblings or imports. Overrides, interpreter changes and
unsupported build or runtime configuration retain the warning. Sourced shell
settings that change word splitting and alternate service launchers whose
environment cannot be resolved also retain it. This affects
undeclared-import checks (SKY-D223); it does not clear SKY-D222 hallucinations,
verify an installed image or change dependency vulnerability checks.
A distribution that a declared one requires unconditionally also provides its
imports (SKY-D223 only, never a hallucination): an edge recorded in the nearest
uv.lock, poetry.lock or pdm.lock (with the extras the lockfile's project
entry requests), or the Requires-Dist of an installed declared distribution
whose version satisfies the declaration. A locked package no such edge reaches,
an edge under a marker, an extra nobody requests and the project's own lock
entry do not count. Test, example and benchmark code that an explicit pyproject
package selection (setuptools packages/packages.find/py-modules, hatch
wheel packages/only-include, Poetry packages) does not ship has no
declared dependency scope, so a missing declaration there is not reported; a
hallucinated import still is. Automatic discovery, glob patterns, a requirements
file, setup.py/setup.cfg or an environment definition in scope keep the
normal check, and so does unshipped code outside test, example and benchmark
directories (a root-level app.py).
A full scan reports each missing or unknown package once per declaration scope
(files checked against the same manifest and environment declarations): the
first import site is the finding, metadata.import_site_count counts every
site and metadata.other_import_sites lists the rest (up to 50). The merge
runs after inline and config suppression, so an ignored site never hides
another. Diff scans (--diff) still report each added import, and
sibling-provider findings stay per file.
Two local import shapes resolve to the file beside the importer and are not
dependency findings. The first is a try: from .x import ... /
except ImportError: from x import ... pair whose sibling x.py imports only
the standard library or __future__ at import time and raises nothing, so
package mode loads it through the relative form; with a sibling that imports
anything else, the pair still needs a shebang or __main__ guard as before.
The second is an absolute import of a sibling module file from a #! script
that needs no submodule, has no x/ directory beside it, uses no relative
import or __package__, and that no other project Python file names and no
launcher or config runs with -m or as an entry point. A __main__ guard
alone does not qualify, because python -m pkg.script keeps package mode.
SKY-D224 rejects explicit keyword arguments that are not parameters of the
installed API's known signature (for example jwt.encode(..., expires_in=...)
with PyJWT). The inspected packages default to requests, pandas, boto3,
openai and jwt. Keyword checks are skipped when the signature is
unavailable. APIs accepting **kwargs remain supported, and
dynamic **payload contents are not inferred.
SKY-A106 warns when a dependency version change exactly matches the project's
own old and new versions in the same change. For example, a release from
3.4.1 to 3.4.2 that also changes inquirer==3.4.1 to inquirer==3.4.2
deserves a check. This is an advisory, not proof that the dependency version is
invalid. It does not query package registries or change dependencies.
Run skylos . --ai-defects --diff-base origin/main --format json for committed
PR changes, or omit --diff-base to compare local files with HEAD. PR checks
compare the merge base with HEAD and do not include uncommitted edits. Existing
gate thresholds still apply; the finding recommends review rather than blocking.
The initial rule supports literal project versions in pyproject.toml and
setup.py, dependency declarations in those files and requirements files, and
package versions in uv.lock and poetry.lock. It includes version exclusions
such as !=3.4.1, skips project self references, and keeps nested projects
separate. Dynamic project versions and other manifest formats are not inferred.
To disable this advisory, add SKY-A106 to [tool.skylos].ignore. This rule
uses project ignores, not inline comments, consistently across supported files.
| ID | Severity | Name | Languages |
|---|---|---|---|
| L001 | HIGH | Mutable default argument | Python |
| L002 | MEDIUM | Bare except block |
Python |
| L003 | LOW | Dangerous comparison (== True, == False, == None) |
Python |
| L004 | MEDIUM | Anti-pattern try block / too broad scope | Python |
| L005 | LOW | Unused exception variable | Python |
| L006 | MEDIUM | Inconsistent return paths | Python |
| L007 | MEDIUM-HIGH | Empty error handler | Python, TS/JS |
| L008 | MEDIUM | Missing resource cleanup: an open/connection/socket/session not in a with, including inside if/for/while/try/except/finally/match blocks. Not reported when closed on the next statement or in a finally that encloses the open or runs after it (a finally before the open closes an earlier handle), entered by the next with, returned or yielded (also inside a wrapper such as return Reader(f) or ctx.wrap_socket(s); a Reader class defined in the same module must store, close or pass on f in its __init__), stored on an attribute or container, registered with enter_context/callback/addCleanup, or assigned to self.x when the same class, a base or a subclass closes self.x, or any code closes x on another receiver such as conn.x.close() (also after taking it off the object, as in Flask's g.pop("db").close() teardown); statements inside another with block are not checked |
Python |
| L009 | LOW-HIGH | Debug leftover | Python |
| L010 | MEDIUM | Security TODO/FIXME marker left in code | Python |
| L011 | MEDIUM-HIGH | Disabled security control | Python |
| L013 | HIGH | Insecure randomness for security values | Python |
| L014 | HIGH | Hardcoded credential in code | Python |
| L016 | MEDIUM | Undefined config / ghost feature flag | Python |
| L017 | MEDIUM | Error information disclosure | Python |
| L020 | HIGH | Overly broad file permissions | Python |
| L021 | HIGH | Security control regression | Diff-aware review |
| L024 | HIGH | Stale mock target | Python |
| L026 | MEDIUM | Unfinished code or placeholder default | Python, TS/JS |
| L027 | LOW-MEDIUM | Duplicate string literal | Python |
| L028 | MEDIUM | Too many return statements | Python |
| L029 | MEDIUM | Boolean positional parameter trap | Python |
| L030 | HIGH | Broad exception with trivial handler | Python |
| L031 | MEDIUM | Missing network timeout | Python |
| L032 | MEDIUM | Mock or placeholder production data | Python |
| L033 | MEDIUM | No-effect statement | Python |
| L034 | MEDIUM | Repeated mutable alias from sequence multiplication | Python |
| L035 | HIGH | File-wide blanket ESLint disable | TS/JS |
| L036 | LOW | Import repeated inside function | Python |
| L037 | LOW | Conditional returning bool literals | Python |
| L038 | LOW | Conversion call inside f-string | Python |
| L039 | LOW | Except clause that only re-raises | Python |
| L040 | LOW | Constant assertion in test | Python; review |
| L041 | LOW | Empty test body | Python; review |
| L042 | LOW | Repeated test assertion | Python; review |
| L043 | LOW | Sleep used for test synchronization | Python; review |
| L044 | LOW | Test runs no project code | Python; review |
| L045 | LOW | Test assertion always true | Python; review |
| L046 | LOW | Test result never checked | Python; review |
| L047 | LOW | Duplicate test | Python; review |
SKY-L006 accepts an explicit return None next to value returns (PEP 8); only a
bare return is inconsistent. SKY-L014 does not treat raw ${NAME} or
{{ name }} strings under credential names as safe: Python does not expand
them, and they can become the literal password. Reference forms are accepted
under location names with no credential word, such as DATABASE_URL, DSN
or CONNECTION_STRING, unless a credential use establishes otherwise.
A name such as APP_URL_KEY and matching value "APP_URL" does not by itself
establish a credential. A resolved credential use still takes precedence over
a setting-key use. SKY-L016 is
not reported when the read declares a default other than
None (os.getenv("ENABLE_X", "False")).
An exact module-level declaration such as
ENABLE_X = os.getenv("ENABLE_X") also defines that external setting.
This says nothing about whether enabling the setting is secure; unrelated
environment reads and differently named assignments retain their checks.
SKY-L001 accepts an empty literal default used exclusively to construct fresh copies through a supported, unmodified constructor. The proof checks imports, shadowing, parameter uses and constructor replacement. Mutation, alias escape, nested captures, nonempty shallow copies and uncertain constructor identity retain the finding; ordinary unused mutable defaults are still reported.
SKY-L014 distinguishes credential names from ambiguous names ending in _key.
Credential-use or secret-literal evidence distinguishes known credentials from
ambiguous keys. Being exported, stored in a field, or used as a default is not
credential evidence. Static project import and reexport resolution connects
literal sources to credential consumers across files; a benign routing,
lookup or statistics use never cancels a credential use of the same source.
The same evidence checks apply to assignments,
annotated assignments and argument defaults. Conditional writes retain
possible credential sources; an uncertain overwrite cannot establish safety.
Lookup fallbacks follow their actual argument contracts: the attribute name in
getattr(obj, "password", "") is not a password. Anonymous FTP defaults
remain reviewable: one anonymous consumer cannot prove that every use is
public, or that a request cannot override only the username.
SKY-L024 checks module bindings without importing the target. Annotated values
and destructured assignments define valid patch targets, as do bindings in
evaluated definition headers. Explicit create=True allows a missing target.
Unresolved dynamic module attributes do not establish that a target is missing.
SKY-L026 recognizes resolved abstract/overload declarations and stub files.
An empty body alone does not establish an unfinished implementation. A body
finding requires an explicit local unfinished marker, a return-contract
mismatch, or evidence of an ineffective runtime security contract. Empty
FastAPI Security dependencies and placeholder results that bypass a denial
branch remain visible; uncertain wrappers or bindings require verification.
Optional hooks, null implementations,
matching empty return values and bare NotImplementedError are legitimate.
Unsafe Ellipsis defaults remain independently reportable. Silence for an
unknown empty hook does not certify that required side effects are present.
SKY-L033 does not assume that arithmetic, membership or overloaded operators are free of effects. Small literal expressions can be checked without executing target code; deliberate exception probes remain valid. Discarded comparisons, including ordering checks, still merit review for an intended assertion or branch; their diagnostic does not claim that overloaded operands are pure.
SKY-L036 to SKY-L039 are optional style advice. Their complete records stay
in JSON with listing metadata; --all-advice or an explicit rule selection
shows them and includes them in the gate. Explicit gate rule configuration
also includes them; they stay out of the default gate otherwise.
SKY-L036 to SKY-L039 report roundabout code that has a direct
form, and only when the file proves it and the suggested rewrite keeps the
behaviour. A builtin (str, repr, isinstance, ...) counts only when
the name resolves to the builtin in that scope, so a local def str, a
parameter or an assignment turns the check off. Golden test fixtures (input
and # output data a test reads as text) are not code and are skipped. When
the project's nearest ruff configuration ignores the ruff rule that suggests
the same rewrite (SIM103, SIM210 and SIM211 for L037, RUF010 for L038, TRY203
for L039), globally or for the file, the maintainers have already declined it
and the check stays silent; inline noqa comments still do not suppress these
findings. SKY-L036 reports an import inside a function that repeats an earlier
unconditional module-level import binding the same module object to the same
name: import m (one object per module in sys.modules), or
from pkg import sub when sub is a module file of a project package. A
function, class or constant imported with from m import n is not reported,
because a later import reads m.n again and tests patch it (mock.patch) on
purpose. Imports under if TYPE_CHECKING, try/except ImportError or other
blocks do not count, nor do names bound twice, declared global, exposed to
globals()/exec, or bound again in the function or an enclosing one, nor
modules this file writes through, passes to setattr-style calls or
reloads. Test and sample code is not checked, nor is a file that reads
function source (inspect.getsource), since it may run those functions
elsewhere where module imports do not exist. SKY-L037 reports
True if c else False, its negation and if/else blocks that return or
assign opposite bool literals; links of an elif chain are left alone. It
suggests bool(c) unless c is always a bool (is, in, not,
isinstance, hasattr, any, ...): == and ordering comparisons can be
overloaded to return other values (numpy arrays, SQLAlchemy expressions).
False if a == b else True and other negated comparisons of that kind are not
reported: a != b need not be the opposite, and not (a == b) is itself a
lint finding. SKY-L038 reports {str(x)}, {repr(x)} and {ascii(x)}
fields, which !s, !r and !a replace. Debug fields such as
{str(x)=:>8} are excluded because changing the expression changes the displayed
label. Source text must prove an ordinary field before a conversion is reported.
SKY-L039 reports the trailing except
clauses of a try whose only statement is raise (or raise e of the caught
name); an earlier re-raise that keeps a later handler away is not reported, nor
is except*, nor clauses with a comment in them (a documented placeholder).
SKY-L040–SKY-L043 add static Python test-quality review. They select directly
declared pytest tests under configured collection or proven unittest bases,
reuse existing literal/skip semantics and share the parsed module. They preserve
Done's separate diff-based checks for removed, skipped or gutted tests.
SKY-L040 reports only bounded literal-only assertions whose condition is true;
runtime names, calls, self-comparisons and overloaded values are not constant
proof. SKY-L041 reports docstring/pass/ellipsis-only bodies and abstains when
fixture inputs, usefixtures/autouse declarations, setup hooks or an ancestor
conftest may supply checks. Helpers and expected-exception bodies remain valid.
SKY-L042 reports the second adjacent identical assert only with proof of
plain local values, including a builtin len() result. Unknown application
returns, property/subscript reads, different messages and intervening mutations
are excluded. SKY-L043 requires stable standard-library bindings, a local
single-assignment Event, a fixed positive sleep and an immediately following
positive completion check. Explicit waits, timing tests, expected failures,
unknown escapes and patched objects stay quiet.
SKY-L044–SKY-L047 report tests that pass whether or not the project works.
They use the same test selection. SKY-L044 reports a test in which every name
it reads is one the test bound itself or a pure builtin (len, sum,
sorted, str, ...) that still resolves to the builtin: for example
model = "gpt-4"; assert model == "gpt-4", or logic re-implemented inside the
test. Nothing from the project can change its result. A parameter (fixture),
decorator, import, module-level name, a self attribute other than a standard
unittest assertion, a nested function, raise, or a builtin that can reach
outside the test (open, eval, print, getattr) leaves the test alone. A
test with no assertion at all is also left alone when fixtures, setup hooks or
a conftest.py may supply its checks. Placeholder bodies stay SKY-L041 and
literal-only assertions stay SKY-L040.
SKY-L045 reports an assertion that is true for every value of the names in
it, which SKY-L040 cannot prove because the condition is not literal-only: a
non-empty tuple (assert (x == 1, "message")), list, set or dict display,
x or True, len(x) >= 0 with the builtin len, isinstance(x, object),
x is x, and self.assertTrue(True) or self.assertEqual on equal literals.
x == x is not reported, because it can be false (NaN, a custom __eq__),
nor is a comparison of two displays.
SKY-L046 reports a test that ends by storing a call's result in a name it
never reads, when neither the test nor a function it calls in the same file
asserts, raises, expects an exception or has a name that says it checks
(assert, check, expect, verify, raises, fail, match,
snapshot, ...). A call whose result is not kept (run()), a name starting
with _, an xfail test and a test using a benchmark or snapshot fixture
are left alone.
SKY-L047 reports a test whose decorators, parameters and body (docstring
aside) repeat an earlier test of the same module or class under another name.
Tests whose name selects recorded data (vcr, cassette and snapshot fixtures or
markers), bodies that call nothing, and a second definition under the same
name are not reported.
skylos verify and the agent edit hook report SKY-L044 and SKY-L045 as
AI-code defects (vacuous_test); the hook passes them back to the agent as
notes and does not block the edit. Measured 2026-11-13 on eight open-source
repositories not used while writing the checks (56,596 collected tests): 32
findings, all 32 correct on review by one reviewer. None of these checks finds a test that calls project code and
asserts the wrong value; skylos done (SKY-A120) runs the tests for that.
These LOW Review findings retain a rule, test name, source location, explanation and evidence. They appear in the default cleanup queue and require manual review; no automatic test rewrite, runtime proof or AI-authorship inference is provided. See cleanup test-quality checks.
| ID | Severity | Name | Languages / Scope | Threshold / Notes |
|---|---|---|---|---|
| Q301 | WARN-HIGH | Cyclomatic complexity | Python, TS/JS, Java, Go | default >10 |
| Q302 | MEDIUM | Deep nesting | Python, TS/JS, Java, Go | default >3 |
| Q305 | MEDIUM | Duplicate condition / duplicate branch body | Python, TS/JS | control-flow correctness |
| Q306 | MEDIUM | Cognitive complexity | Python | Boolean operator sequences and control-flow nesting |
| Q401 | HIGH | Async blocking call | Python | blocking calls inside async code |
| Q402 | LOW | Await in loop | TS/JS | review bounded parallelism only when iterations are independent and ordering/rate limits allow |
| Q403 | HIGH | Inconsistent lock acquisition order | Python | potential deadlock from reversed lock order in nested or compound with / async with statements; includes non-adjacent pairs |
| Q404 | MEDIUM | Thread shared state mutation | Python | thread target mutates module state without an obvious lock |
| Q405 | HIGH | Async Promise executor | TS/JS | new Promise(async ...) ignores the executor's async result |
| Q406 | HIGH | Async callback passed to built-in Array.forEach |
TS/JS | callback promises are not awaited |
| Q407 | HIGH | Discarded result from built-in Array.map(async ...) |
TS/JS | mapped promises are not consumed |
| Q408 | MEDIUM | Undeclared npm dependency | TS/JS, Vue/Svelte/Astro scripts, MDX ESM, /// <reference types>, tsconfig types and supported literal tool configs |
A package is used but declared neither by the owning package.json nor, for tests, setup files, configs, scripts, stories, examples, .d.ts inputs and private packages, by an ancestor workspace; production source of a published package needs its own declaration. Workspace packages mapped to source by tsconfig paths or a bundler alias, and fixture text read by codemod harnesses, are excluded outside published production source. Stylesheets report only Sass pkg: and Tailwind @plugin names; framework aliases such as Docusaurus @theme/* are excluded |
| Q409 | MEDIUM | Unlisted npm script binary | package.json | A package script segment invokes an npm binary that no declared package (locally or in an ancestor, or in the --cwd/--prefix/workspace target it runs in) could provide, resolved through installed or workspace bin metadata, a map of differently named CLIs (ngc to @angular/compiler-cli, svelte-package to @sveltejs/package), or the command naming its package; configs, plugins and presets never provide a tool binary; system tools, shell builtins, npx/dlx and expanded command names are not reported |
| Q410 | MEDIUM | Discarded local async result | TS/JS | A stable local async callable returns a promise discarded as an expression statement; awaited, returned, stored, rejection-handled and explicit void uses are retained |
| Q411 | LOW | Unused pnpm catalog entry | pnpm-workspace.yaml | A catalog/catalogs entry that no package.json under the workspace references through the catalog protocol (dependency maps, resolutions, overrides, scripts); an unreadable manifest, pnpmfile hook or competing catalog source holds back every claim |
| Q412 | MEDIUM | Unresolved pnpm catalog reference | package.json | A workspace member declares catalog:, catalog:default or catalog:<name> for a package the referenced catalog does not define |
| Q413 | LOW | Referenced optional peer dependency | TS/JS, components, MDX | A peer marked optional in peerDependenciesMeta (and not also a dependency/devDependency) is imported by a static runtime import; type-only, dynamic and guarded loads stay quiet, and packages with subpath exports are skipped |
| Q414 | MEDIUM | Unresolved import | TS/JS, Vue/Svelte/Astro scripts | A literal relative or path-alias module request (import, export ... from, require(), import()) names no file; bare packages are Q408 |
| Q415 | LOW | Repository comment and docstring density | Repository | One quality finding when at least 20% of nonblank source lines contain a comment or a Python docstring |
| Q501 | MEDIUM | God class | Python | excessive methods or attributes |
| Q502 | MEDIUM-HIGH | God file | Python | excessive file size / definitions |
| Q701 | MEDIUM | High coupling | Python | resolved dependency edges; sharing an abstract base does not create sibling dependencies |
| Q702 | MEDIUM | Low cohesion | Python | LCOM-style signal |
| Q801 | MEDIUM | High architectural instability | Reserved | no current finding emission |
| Q802 | ADVISORY by default | Distance from main sequence | Python, TS/JS | included in actionable quality only with enforce_iad = true |
| Q803 | ADVISORY by default | Zone of Pain / Zone of Uselessness | Python, TS/JS | grouped with Q802 per module by default |
| Q804 | MEDIUM | Dependency Inversion Principle violation | Python, TS/JS | |
| Q805 | MEDIUM | Architecture layer policy violation | Python, TS/JS | |
| Q807 | LOW | Sibling package dependency cycle | Python | opt in with [tool.skylos.architecture] check_package_cycles = true |
| C303 | MEDIUM | Too many arguments | Python, TS/JS, Java, Go | default >5 required / >10 total; Python compares required positional arguments (keyword-only arguments count toward the total only) and accounts for implicit receivers |
| C304 | MEDIUM | Function too long | Python, TS/JS, Java, Go | default >50 lines; Python counts code lines (blank, comment-only and docstring lines excluded); direct test and suite callbacks in TS/JS test files are excluded |
| C401 | MEDIUM | Duplicated implementation fragments | Python | |
| P401 | LOW | Potential unbounded read() / readlines() |
Python | |
| P402 | LOW | Memory risk: resolved pandas.read_csv without a chunk or row bound |
Python | |
| P403 | LOW | Repeated iterable scans in nested loops | Python / generic | an inner collection repeatedly searched for the outer item (equality, membership or a predicate relating both items); exclusions require evidence of bounded work, partition traversal or required output for every pair |
| P404 | MEDIUM | Unbounded SQLAlchemy-style ORM .all() query |
Python | |
| T101 | LOW | Missing public parameter type annotation | Python | |
| T102 | LOW | Missing public return type annotation | Python | |
| T103 | MEDIUM | Chained assertion through any, unknown, object, or {} |
TypeScript | |
| T104 | MEDIUM-HIGH | Effective @ts-ignore or file-wide @ts-nocheck |
TS/JS | |
| T105 | MEDIUM | Unvalidated JSON result asserted as a domain type | TypeScript | |
| T106 | MEDIUM | Unsafe exported API type | TypeScript | |
| F101 | MEDIUM | FastAPI response model / return typing practice | Python | |
| F102 | MEDIUM/HIGH | Framework route auth guard or defeated ownership check; privileged action routes are SKY-D283 | Python | |
| R101 | MEDIUM | Repository missing Python type-check command | Repo policy (advice: listed after Defect/Review findings, never in the first-screen measurements, the Risk headline or a concise exit code on its own) | |
| R102 | MEDIUM | Repository missing Python lint command | Repo policy (advice: listed after Defect/Review findings, never in the first-screen measurements, the Risk headline or a concise exit code on its own) | |
| R103 | MEDIUM | Repository missing Skylos quality gate | Repo policy (advice: listed after Defect/Review findings, never in the first-screen measurements, the Risk headline or a concise exit code on its own) | |
| R104 | MEDIUM | Repository missing pre-commit config | Repo policy (advice: listed after Defect/Review findings, never in the first-screen measurements, the Risk headline or a concise exit code on its own) | |
| R105 | LOW | Repository missing TypeScript type-check command | Repo policy | recognizes tsc and Next builds with type errors enabled |
| CIRC | LOW | Circular dependency between modules (top-level imports). A design finding: severity does not grow with cycle length | Python, TS/JS |
SKY-Q414 (quality scans) reports a literal JS/TS module request that loads at
run time, in a scanned source file or a Vue, Svelte or Astro script block,
that is relative (./, ../) or matches a tsconfig paths pattern (not the
* catch-all) or a package.json imports key, when no file answers it.
import type, export type, all-type clauses and import("x").T type
references are erased by compilers and bundlers and are left to the type
checker. tsconfig paths, baseUrl and rootDirs follow TypeScript's
extends rules (the nearest config declaring paths wins whole;
${configDir} is substituted). Resolution tries the exact
path, every source, declaration, component and data extension (.ts .tsx .mts .cts .js .jsx .mjs .cjs .d.ts .vue .svelte .astro .json and any other single
extension), React Native platform variants, .js/.mjs/.jsx to TypeScript
source, index files, a directory with a package.json, tsconfig rootDirs,
and for aliases every mapped target with build output (dist/, out/) mapped
to source. It stays quiet for query or loader suffixes (?raw, ?url, !),
URL and virtual modules (virtual:, astro:, ~icons/, $app/, $env/),
loads inside a try body or with a .catch handler, specifiers matching an
ambient declare module in the project's TypeScript, specifiers under a
resolve.alias key of a JS bundler config (Vite, webpack, Rollup, Nuxt,
SvelteKit, Babel module-resolver and similar; an alias value Skylos cannot
read statically holds back every alias specifier below that config), alias
targets in node_modules or matching an installed or declared package,
targets outside the project or in excluded or Git-ignored paths, importers in
fixture, codemod test-fixture, snapshot, test-data and template directories
(fixtures, __fixtures__, __testfixtures__, __snapshots__, testdata,
templates), files under a test directory (test, tests, __tests__,
spec, e2e, __mocks__) that are neither test files nor imported by any
module (compiler or plugin inputs read as text), and alias requests under a
tsconfig whose relative extends
names a generated config that is not on disk (./.svelte-kit/tsconfig.json,
./.nuxt/tsconfig.json). Config files are parsed, never executed.
analysis_summary.unresolved_import_analysis counts checked and held-back
requests.
SKY-Q415 counts nonblank source lines across a quality scan of the repository
root, honoring the scan's file exclusions. It counts a line once when it
contains a comment, including an inline comment, or belongs to a Python
docstring. It reports one repository-level advisory at 20% or higher. The
advisory stays outside quality gate limits. Set
ignore = ["SKY-Q415"] under [tool.skylos] to turn off the rule.
SKY-CIRC also covers JS/TS: an edge is a literal import, export ... from
or top-level require() that resolves to another scanned JS/TS file or a
Vue/Svelte/Astro component script. import type, export type and clauses
whose every specifier is type are erased, and import() or a require()
inside a function is lazy, so they are not edges. Each strongly connected
group of files is reported once, LOW, with the shortest cycle through its first
file in path order (cycle, paths relative to the project root);
component_files lists the whole group when it is larger than that cycle.
Like Python cycles, JS/TS cycles appear on every scan unless
check_circular = false. SKY-Q414 covers unresolved imports and JS/TS
SKY-CIRC covers import cycles. Unlike Knip, Skylos reports each cyclic group
of files once rather than every cycle in it.
T101/T102 report missing public-signature annotations required by an applicable
declared mypy policy. strict and disallow_untyped_defs require complete
signatures; disallow_incomplete_defs applies only to definitions that already
have signature typing intent. Checker presence, check_untyped_defs, a partial
signature, a typed sibling or a typing import alone establishes no requirement.
Missing annotations are LOW-priority policy or coverage advice, not type errors.
Valid function and parameter type comments
count as contracts alongside inline annotations. Supported mypy settings include
the standard project config precedence, literal file/directory selections,
structured module overrides and inline options. Package markers and declared
package bases determine module identity; directory names alone do not. Checked-in
literal mypy commands can replace a default file selection, with supported
allow/disallow annotation flags and --strict taking precedence over global
config; output-only flags and literal --platform / --python-version values
do not change file selection. Missing, invalid or dynamic values remain unknown.
Command discovery reads tox
command values (including {posargs:DEFAULT} defaults and {[section]key}
references), Make recipes and workflow run entries; environment names and
workflow titles do not establish checker scope. Non-root or unknown Tox/workflow
working directories and directory-changing shell blocks do not establish
root-relative selections. A strict setting with neither a
files selection nor a discovered invocation has unknown scope. An explicit
allow_incomplete_defs without a required-annotation setting is an opt-out.
An applicable ignore_errors also disables annotation-policy advice unless
the effective inline policy explicitly re-enables diagnostics.
Unsupported or unresolved policy contributes coverage information rather than
default per-function advice. Standard .pre-commit-config.yaml selections can
establish scope for the official pre-commit/mirrors-mypy hook with explicit
arguments, or a local hook whose entry directly invokes mypy. Global and hook
file filters, supported Python type filters, argument overrides and exclusions
determine applicability. Hook scope uses the declared project root for a
standalone source tree; an enclosing Git root, when present, must match it.
A nested project's config is not silently treated as the parent repository's
default hook config. Historical reads require the reader's matching Git root
context instead of current filesystem metadata.
Filename passing and supported file-bearing stages
must be established; manual-only hooks and filename-less invocations remain
unknown. Implicit mirror defaults establish ordinary .py selection only;
stub selection needs explicit supported type filters. Unknown providers,
wrappers or unsupported filters do not add a
requirement or erase independently established policy.
Extra files or directories named in hook arguments are not independently
inferred as policy scope outside the hook's filename selection.
Non-mypy checker policy formats are not interpreted as mypy requirements.
Pyright's missing-parameter and unknown-type diagnostics have different
semantics, and its strict mode does not require return annotations on all functions.
Those settings must not enable both T101 and T102 through a generic strict flag.
Diff comparisons read policy at the base
revision rather than applying the current checkout's policy to old source.
The rules exclude pytest fixtures resolved from imports and test-support
helpers reached from a non-root conftest suite when no production importer is
found; modules imported by a non-test package __init__ are production code.
Test folders are judged relative to the project root. A directory named t
alone does not establish that role. Shared helpers
retain applicable policy advice. This typing-only scope does not filter security findings.
A complete literal __all__ limits T101/T102 to the module's exported
functions and classes. Set [tool.skylos] typing_coverage_advice = true to opt
into optional API coverage advice. Optional advice requires a source-declared
boundary: a stable explicit export or an import-proven interface declaration.
Public spelling alone, dynamic/mutated exports, unknown decorators and replaced
owners are insufficient. Complete proven overloads and exact compatible sibling
stubs can supply the optional caller contract; explicit implementation-annotation
requirements still take precedence. Inherited/re-exported contracts and arbitrary
runtime class construction are not resolved by this bounded check.
Concrete procedures with
only implicit, bare or literal None returns do not receive redundant T102
advice unless an applicable mypy policy explicitly requires annotations.
Decorators, generators, abstract placeholders and unknown value returns do not
establish that inference. Missing parameter annotations remain independent.
T101/T102 on the same unambiguous function share one human entry, retaining both
original records in JSON and gate inputs. Coverage is separately disclosed in
analysis_summary.typing_coverage and one terminal summary. Its denominator is
public source definitions (including overload declarations), not runtime
callables; explicit missing annotations can coexist with a supplied stub or
overload contract. --all-advice expands generated advice but does not enable
optional annotation checks; use typing_coverage_advice for that opt-in.
Python C303, Q501 and Q702 resolve implicit receivers and distinguish instance,
class and static methods. Nested functions have their own bindings; captured
receivers and local aliases contribute to the owning method. Unknown decorators
leave receiver binding uncertain. C303 reports only when the minimum number of
required positional arguments exceeds its threshold; keyword-only parameters
count toward the total-parameter threshold only. Q501 does not count dunder
protocol methods toward its method threshold. Q702 checks possible receiver
connections before reporting disconnected implementation groups and includes
bounds for uncertain bindings. Methods connect through shared attributes, calls,
bound-method references (self.m passed as a callback or a property read),
constructor calls (cls(...), type(self)(...)) to __init__/__new__, and
implicit dunder use (len(self), self[k], k in self, iteration, truth
tests, f-strings). A method that passes bare self out or writes attributes
dynamically has uncertain connections. Empty declarations (pass, ellipsis,
docstrings, or a proved builtin NotImplementedError stub) do not form
implementation groups, and Protocol classes and fully abstract ABCs are not
measured. A method that touches no receiver state is not a group on its own,
and a report needs at least two groups that each use attributes the class
assigns. Raw declared graph components remain available separately as
declared_lcom4 in findings. These measurements alone do not prove that a
class should be split.
Q501 excludes proven declaration-only records, while unknown descriptors, decorators and inherited constructors remain measured. Q702 distinguishes immutable, read-only class configuration from owned mutable instance state; writes and uncertain values retain the ordinary cohesion checks. Q701 resolves class identities and shadowing in their lexical scope. Its incoming dependent count is file-local, not a project-wide coupling measurement. Q804 excludes proven import/export-only facades from concrete-collaborator advice; dynamic exports and runtime consumers remain subject to the check.
Q501 reads pytest's configured python_classes patterns without executing the
project, and recognizes collected classes only in evidenced test modules.
Quality scope also reads root pytest TOML/INI settings for python_files and
python_functions, including native [tool.pytest]. Custom paths require a
matching file pattern and actual collected functions or classes; testpaths
alone does not establish test code. Configuration is selected by pytest's
precedence without merging, and invalid or symlinked files add no exemptions.
Fixture-only files, collection opt-outs and unresolved class inheritance add no
new exemptions. Existing convention-based scope remains available independently.
Typing advice (T101/T102) uses the same guarded configured-test evidence, so
custom collected filenames are not treated as public library APIs. Unknown
function decorators, rebound or shadowed pytest aliases and patched marker
names cannot establish configured collection evidence. This quality-only
classification does not change security or dead-code scope.
When testpaths is configured, a broad python_files pattern alone cannot
exempt production files outside those root-discovery selections. Unknown or
escaping selections add no test-only evidence; conventional test rules remain
independent.
Import-proven typing.overload signatures with a concrete implementation in
the same class do not add runtime methods; property accessor counting is
unchanged. Ordinary helpers and uncertain decorator bindings remain measured.
Q502 counts consecutive, import-proven overload declarations and their runtime
implementation as one callable; .pyi overload groups need no implementation.
Raw code_lines remains an inventory measurement. Q502 uses
implementation_code_lines for its size threshold, excluding literal catalog
spans and proven declaration-only classes; unknown declaration mechanisms and
behavioral code remain measured. Literal catalogs receive the same exclusion
at module and class scope; computed catalogs and method bodies remain measured.
C303 reports one warning per such group,
preserving the strongest violation and each signature's parameter layout in
overload_signatures. Custom decorators and incomplete runtime groups retain
their separate measurements.
Design, size and memory advice (C303, Q501, Q502, Q702, C401, P401, L027 and
L029) is not reported for test, example, benchmark, documentation-build or
packaging-script code: files the project-relative test convention identifies,
test_*.py/*_test.py modules that define test functions, examples/
benchmarks folders, a top-level docs/doc folder and the root setup.py.
This scope does not filter security, secret or correctness findings. C304 still
applies to tests. C304, Q502 and C401 count code lines: blank lines,
comment-only lines and docstrings are excluded. C401 also requires at least
four statements in each fragment body and names members by project-relative
path.
C401 distinguishes test-suite helper imports from production importers and
preserves helpers reached by production, including package initializers.
Clone normalization uses an independent AST for each fragment, preserves literal
types and variable binding relationships, and keeps external API names and
member selectors distinct. Identifier normalization consistently renames proven
local bindings within their lexical scopes. Original function arguments remain
part of the unnormalized candidate identity, so identical bodies with different
positional bindings do not bypass the binding comparison.
Test-data input/expected-output pairs require a matching text-reader harness
before their clone groups are excluded. These branches apply to clone advice;
security and correctness rules still analyze those files.
T101 does not prescribe annotations for a possibly implicit method receiver;
proven static methods and free functions retain their first ordinary parameter.
P401 reports read()/readlines() calls that request everything: no size,
None, a negative size or readlines(0), including sizes resolved from simple
local constants. A caller-chosen size is a bound by construction, so chunked
reads are not reported. Resolved open(...) receivers get file-specific advice.
read() on a proven standard-library io.BytesIO/io.StringIO receiver is
not reported, including synchronous with bindings to that same buffer.
The proof checks imports, aliases, method replacement and
visible field writes or object exposure; an earlier buffer assignment alone
does not establish the receiver's current type. Unbounded buffer readlines()
can allocate a new list and is reported with that explanation, unless the
contents are a fixed literal with no growth or escape. Other whole reads
remain LOW advice; the rule cannot know the source's size, and some consumers
need the whole value.
Lambda bodies are expression scopes. Resolving a captured read size considers
enclosing bindings without iterating the lambda's expression as statements;
unknown or shadowed sizes retain the ordinary P401 behavior.
P401 does not recommend chunking a direct read passed to a resolved whole-buffer
consumer: builtin compile, or standard-library ast.parse, json.loads,
tomllib.loads, pickle.loads, marshal.loads, gzip.decompress and
zlib.decompress. It also recognizes a direct returned read, optional await
or .decode(), in a nondecorated callable with a stable builtin str/bytes
return annotation, including supported optional/union aliases. Unknown helpers,
rebound types and read-then-process bodies retain advice. These contracts make
the chunking suggestion inapplicable; they do not prove that memory is bounded
or suppress separate security or resource findings.
P402 resolves pandas imports and aliases before advising on read_csv.
An unrelated object's same-named method is not evidence of pandas. A positive
chunksize, nonnegative nrows or caller-supplied row budget establishes a
bound for this advice; explicit None and nonpositive chunksizes do not.
With current project context, known local pandas providers and uncertain
filesystem paths do not establish the external pandas API. Provider checks use
metadata only. Source-only and historical readers retain their import evidence
instead of consulting another revision's filesystem.
L029 recommends named Boolean arguments and makes a keyword-only rewrite
conditional on the public or callback contract permitting it. @overload
stubs, @override methods, methods overriding a same-module base method and
functions used as values (callbacks, registrations, dispatch entries) are not
reported. Private and nested functions are reported only when a call in the
module passes a Boolean literal positionally, and the message names that call. A literal Boolean default remains independent signature
evidence even when an annotation contradicts it; the annotation does not enforce
runtime values. Definition-level advice does not establish an actual ambiguous
positional call, and changing an inherited or callback signature needs separate
compatibility evidence.
Positional-only Boolean parameters receive advice that does not suggest an
impossible named call. A private-method call requires a resolved receiver;
an unrelated object's same-named attribute is not evidence for that method.
Public signature findings also retain observed calls in call_evidence, so
focused advice does not hide a proven positional call as signature-only advice.
The static resolver accepts stable local bindings and bounded receiver chains,
including constructor fields assigned from same-module annotated parameters.
Rebinding, uncertain decorators, custom attribute hooks and ambiguous receivers
do not establish new call evidence. Familiar public flag names retain their
existing exemption; familiar private flags require a proven positional call.
L027 excludes import-proven typing/typing_extensions cast type strings and
matching declaration names in TypeVar, ParamSpec, TypeVarTuple and NewType.
Runtime values in sqlalchemy.cast remain eligible. It also excludes recognized
CLI declarations' standard action values and documentation fields, import-proven
operator selectors, gettext message-ID positions and SQLAlchemy schema-name
positions. Module/class declaration collections, uniform class-field catalogs
and formatting-only skeletons are excluded; outside these contexts, runtime
defaults and message text remain eligible. Mapping lookups and membership keys
require source evidence; an arbitrary get method is not enough. Builtin field
access and mutation require a proven builtin plus static attribute, method or
slot evidence, and preserve ordinary private state names. Immutable
object.__setattr__/__getattribute__/__delattr__ operations and their proven
bound aliases use the same field-selector rule. Unknown, conditional or rebound
setters remain eligible. Import evidence rejects shadowing, rebinding and
recognized module mutations.
Identical literal defaults for the same named parameter on import-proven overload
signatures and their concrete implementation count once for that callable.
Distinct defaults, incomplete overload groups and uncertain decorators remain eligible.
These detector exclusions reduce raw occurrence counts and can remove findings
from JSON and gate inputs; the configured repetition threshold is unchanged.
Bounded occurrence context records function-body counts, non-function
occurrences and roles without extra literal values. L027 is counted, not
listed, unless --all-advice or --select asks for it. Secret masking evaluates opaque tokens
individually, so ordinary sentences stay readable while credential patterns
and sensitive values remain masked.
L028 counts returns in the measured function's branches, loops, exception
handlers and match cases, excluding nested function and class bodies. The
default limit remains five returns. Counting match cases corrects previously
missed returns; the count alone does not establish that refactoring would
improve the function.
C303 retains its required-positional and total-parameter measurements, limits
and overload evidence. Additive argument_evidence records the known caller
parameter shape and, when provable, an identical project-base signature.
Source-proven Click callbacks whose entire signature is supplied by declared
CLI inputs and plain record constructors that only assign parameters directly
to unique fields are excluded. Unknown decorators, custom command classes,
descriptors, behavioral constructors and ambiguous bindings retain findings.
Focused reports make total-only wide signatures and confirmed inherited
contracts optional. Unresolved bindings and independently widened signatures
stay visible. JSON, SARIF and uploads retain all records with a shared listing
mark and reason. Terminal views and gates use that mark; explicitly configured
or selected rules are always enforced. --all-advice lists every generated check.
docs/cli-output.md lists which advice the scan lists by default and which it
only counts.
L004 evaluates error-catching scopes. Handlerless try/finally cleanup, and
handlers that only clean up and re-raise, catch nothing and are not reported; a
finally that returns, breaks or continues swallows exceptions and is. The
length check requires both excess code lines and excess protected operations;
one multiline call with simple arguments remains one operation, while nested
calls count separately. An inner try that isolates items inside a
loop, only falls back between imports, or protects a narrow operation is not
confusing nesting. Broad nested catching remains reported. A
try that is the function's whole body, or its last statement after only a
docstring, imports, nested definitions or guard clauses, is an error boundary:
its length and control flow are left to C304/Q301/Q306. The same applies to
literal/name local initialization followed by the try and a plain result
return; arbitrary setup, transformation or persistence calls do not establish
that boundary. Broad nested catch scopes remain checked within boundaries.
L005 recognizes an exception variable read explicitly through proven builtin
locals() or no-argument vars(), using the exact variable name as a
subscription or .get() key. Shadowed or rebound namespace builtins and
lookups inside a different nested scope do not establish use. Genuinely unused
captures remain reported.
L007 distinguishes discarded errors from meaningful handler work and narrow
trivial fallbacks. Broad placeholder returns belong to L030 rather than a
second L007 report. A narrowly resolved filesystem deletion inside a finally
cleanup can be excluded when its callable and path evidence support that
purpose; a handler that swallows BaseException, KeyboardInterrupt,
SystemExit or GeneratorExit does not receive that cleanup exemption.
Q301 counts refutable match patterns and their guards. A wildcard or capture
pattern does not add a decision; its guard still does. A match without a default
retains the path where no case matches. Nested callable bodies stay independent.
Q306 scores only the measured function's body; a nested function's decorators,
defaults and annotations count at the enclosing level and its body one level
deeper (except the decorator-wrapper shape, which a leading docstring does not
break). Lambda bodies are one level deeper, and match subjects and guards are
scored. Q302 traverses match cases and treats a with around a top-level
try like the try alone.
Q306 records additive cognitive_scope evidence: its source end line, own-scope
score, nested contributions and nearest containing function. The numeric score,
threshold and original findings stay unchanged. Human reports can use this
evidence to present overlapping enclosing/nested metric entries together while
retaining every child location and measurement. No ownership proof means no
cross-function grouping.
Q804 does not report a package __init__ importing its own submodules (a
package composing its public surface) or test modules. U005 reads dependency
declarations from the scanned project and does not climb past a directory that
has its own pyproject.toml or .git.
If a quality rule fails on a file, that file's quality findings are replaced by
a quality_scan_error analysis error; its security, secret and dead-code
results are kept.
F101/F102 do not exempt decorators based only on an import spelling such as
unittest.mock.patch: an attribute, exception binding or another project file
can replace that callable with a real route decorator. F102 describes matching
decorators as a conditional route review. Ordinary mock decorators can still
produce false positives; removing those requires stronger route-identity
analysis, not a name-based exemption.
One narrow F102 branch recognizes an unmodified stdlib mock patch decorator
with a literal Python attribute target on a collected unittest.TestCase
method. Import spelling alone, URL-like targets, rebound APIs and independent
route decorators do not satisfy that proof.
PUT, PATCH and DELETE remain state-changing methods for F102. POST can also
serve read-only query/RPC operations: a query-like route is checked for body
side effects, including supported same-module helpers, shared-state writes and
opaque calls. Constructing a local result or logging alone does not establish
a persistent state change. A state-changing route name or a POST outside the
query-like scope retains review. These heuristics do not prove authorization
or that an endpoint is safe to expose.
L010 scans actual comments and genuine module, class and function docstrings,
excluding ordinary string payloads. It recognizes credential components such
as access_token and certificate_pinning, and explicit SQLi/SSLContext
topics, without treating lexer token_stream, tokenize, author, certainly
or oracle as security terms.
Generic maintenance words such as hack, workaround and temporary require
an independent security subject. They do not make an ordinary formatter or
retry-maintenance TODO a security finding by themselves.
Docstring TODOs remain review markers even when surrounding text calls them
examples. L017 distinguishes exception text from a formatted stack trace and
names the call receiving it, without claiming the value was sent to a client.
It also reports traceback.format_exc() passed to an HTTP response constructor
from an unnamed handler. It does not suppress a response or nested helper
solely because it appears discarded or unused: indirect calls and constructor
mutation can still disclose the data.
SKY-F102 retains its MEDIUM review for mutating routes without an obvious auth
guard. It also reports a HIGH review when a FastAPI route contains an explicit
owner or tenant comparison but returns or changes a selected object without
that check protecting it. This includes identity changes through principal
aliases, replacing the checked object, and late-bound local presenters.
Copied authenticated IDs and captured, checked objects retain their proof.
Conditional assignments keep the identities from each reachable path;
literal branches that cannot run do not create findings. A checked literal
dictionary lookup also remains checked when repeated as get(key, None).
Fetching an object without an ownership comparison does not alone trigger
this additional review. Arbitrary permission helpers, ORM query scoping,
Django/Flask ownership flows, and unsupported control flow remain outside
this narrow check; absence of F102 is not proof of authorization.
SKY-D283 is the security finding for a route SKY-F102 would review when its
function name, path (path parameters excluded) or HTTP method names a
privileged action: device or host control (arm, disarm, takeoff,
fire, power, poweroff, reboot, shutdown, restart, halt,
control), destruction (delete, drop, destroy, purge, wipe, erase,
truncate, or the DELETE method), administration (admin, superuser,
sudo, impersonate) or commands (exec, execute, shell, command,
cmd). Words are whole words, and letters with trailing digits stay one word
(farm, alarms and arm64 are not arm). launch and eval are left out:
LTI launches, campaign launches and model evaluation are ordinary routes.
It is reported only when nothing can authenticate the caller, otherwise the
route keeps its SKY-F102 review:
- the route is registered on an app object the same module creates
(
FastAPI(),Flask(),Quart(),Starlette(),Sanic()), or on anAPIRouter/Blueprintthe module creates and mounts on that app with no guard options; routers mounted from another module are not judged, since the mounting site can add a guard; - the route has no decorator besides its route decorators, no decorator
option other than routing metadata (
auth=,guards=,dependencies=and unknown options count as guards), and noDepends/Security/Header/Cookie/security-scheme parameter, including through a module alias such asCurrentUser = Annotated[User, Depends(...)]; - the handler does not read request (or Flask
g) headers, cookies, session, user or client, name authentication in an identifier or string (url_for("login")), reject with 401/403 (includingreturn body, 401), or pass the request to other code; - the module has no middleware other than CORS/GZip/TrustedHost/HTTPS
redirect (including
app.wsgi_app = ...wrapping), no app/router guard options, no hook registered by call, and no request hook (@app.middleware,before_request) that may authenticate. A hook another module registers on the same app object is not visible here. It is CRITICAL when the module also starts the server on every interface (0.0.0.0or::, literally or as the default of anos.environ.get/os.getenvlookup bound once), shows no authentication anywhere (no name reading as auth, includingsession), and the handler performs the action (a call named for a specific action word, notcontrol/command/admin, or a process, signal or file-removal call). Unlike SKY-D280 (any Next.js mutating route without auth), SKY-D283 needs the privileged action evidence; other open mutating routes stay SKY-F102.--diffreports SKY-D283 only when the route itself changed. A scan with security checks reports SKY-D283 and drops the SKY-F102 review of the same handler; a--quality-only scan keeps SKY-F102.ignore[SKY-F102]and a bare# noqado not hide SKY-D283. Plain reads (GET) are never reported.
P401 reports read()/readlines() calls that request everything: no size,
None, a negative size or readlines(0), including sizes resolved from simple
local constants. A caller-chosen size is a bound by construction, so chunked
reads are not reported. Resolved open(...) receivers get file-specific advice.
For a proven ZipFile receiver, read(name) loads an archive member; its name
argument does not establish a byte bound.
read() on a proven standard-library io.BytesIO/io.StringIO receiver is
not reported, including synchronous with bindings to that same buffer.
The proof checks imports, aliases, method replacement and
visible field writes or object exposure; an earlier buffer assignment alone
does not establish the receiver's current type. Unbounded buffer readlines()
can allocate a new list and is reported with that explanation, unless the
contents are a fixed literal with no growth or escape. Other whole reads
remain LOW advice; the rule cannot know the source's size, and some consumers
need the whole value. Resolved whole-buffer consumers and stable, declared
str/bytes materialized-return contracts are excluded from the chunking
suggestion as described above; this does not prove memory safety.
SKY-P403 excludes proven fixed bounds, shared-iterator consumption, terminal
cleanup scans and bounded partition traversal only while that proof holds.
Repeated aliases and mutations that replenish an iterator invalidate it.
An outer-dependent expression can still return the same collection, and
assigning a collection to itself does not make the scan cheaper. Direct aliases
and builtin list/tuple copies retain size provenance across recurring iterations.
Aliases keep the value captured when assigned; phase flags, correlated exits and
opaque escapes do not establish new shared-source evidence. The inner
source must support repeated traversal: an independent iterable or a locally
resolved shared collection can establish it; an unknown per-item property or
helper alone cannot. Reopening a stable path or a finite literal path map also
establishes repeated file-search work; arbitrary per-item paths do not. Selection
inside a builtin filter lambda or single-source generator is checked as well
as the loop body. The inner scan must search for the outer item; ordinary all-pairs computation and
proven required output for every pair are excluded. A conditional value
that later gates a lookup still counts as a search, including comparisons
assigned to Boolean variables. Source aliases and dominating dictionary-cell
writes retain collection identity. Required-output checks summarize normal
and continue paths; transparent local writer methods require resolved
constructor bindings and an unconditional write to a fresh builtin list.
Findings include the
outer/inner iterable evidence and call for review: nesting alone does not
prove a performance bug. An index is appropriate only when the keys and
required duplicate or ordering behavior permit it.
Resolved standard-library regex search/match/fullmatch dispatch is not an
indexable equality join. This includes loop elements with source-resolved
re.Pattern sequence or tuple annotations. Unknown .search() methods and
unresolved pattern collections do not establish that exemption; independent
equality or membership searches remain checked.
SKY-L009 does not assume ordinary print() or pprint() output is debugging.
It reports explicit DEBUG:/DBG: labels, raw locals()/globals()/vars()
or .__dict__ dumps, and source-confirmed f-string debug expressions such as
f"{value=}" as LOW advisories to review. Status messages, JSON, stderr output
and ordinary representation formatting are accepted. Unlabelled prints such
as print(value) can still be debugging, but intent cannot be established
from that call alone. Debugger calls remain HIGH in CLI, script and test files.
Architecture metrics include scanned TS/JS modules and use package.json
workspace boundaries for package aggregates. TS/JS Q802 and Q803 use parsed
interfaces, abstract classes, concrete classes, and functions as a file-level
abstractness heuristic. Default Q802/Q803 signals are grouped per module under
architecture_metrics.advisories and excluded from quality_count and local
gate inputs. Complete SARIF and Cloud uploads retain those records with their
Advice type; they remain in the maintainability assessment. Setting [tool.skylos.architecture] enforce_iad = true
places them in actionable quality instead. If a TS/JS source cannot be parsed or opened with
no-follow directory descriptors on the host platform, its module still
participates in the dependency graph, but Q802/Q803 are suppressed for that
module and its name appears in
architecture_metrics.abstractness_unavailable_modules. Q804 and Q805 can
still use its resolved imports. Q801 is cataloged but does not currently emit
findings in any language.
SKY-Q807 reports groups of sibling Python packages that depend on one another
through resolved top-level imports. It includes the source location of each
contributing import, including dependencies between files that do not form a
cycle themselves. Run skylos lint to check for them. Set
check_package_cycles = true under [tool.skylos.architecture] to include
this rule in quality scans and the cleanup queue.
For Python modules with both .py and .pyi files, architecture measurements
come from the runtime file represented by the dependency graph. A stub cannot
overwrite its abstractness, line count or main-guard evidence. This can remove
an incorrect threshold warning or restore a previously missed one. Stub-only
typing analysis remains available. Focused human reports make advisory
file-level I/A/D optional with --all-advice; explicit enforcement and raw
report/gate policy remain unchanged.
TS/JS namespace imports keep only the exports selected by static member reads
such as api.render() and api["render"], including stable const aliases and
literal destructuring. A parameter, block variable or other local binding with
the same name does not count as a read of the imported namespace. Unknown keys,
namespace escapes, reflection and mutation preserve the whole export surface.
This follows resolved module edges, including wildcard barrels. In a closed
source scope, named re-export chains propagate the selected original binding
through aliases and wildcard hops. Package APIs and escaping namespaces retain
their export surfaces. Competing wildcard providers, unmodeled local export
bindings and opaque source decline that narrowing. Enumerating a literal
module namespace also supplies positive reads through resolved export paths,
respecting explicit shadows and the exclusion of default from star exports.
Direct namespace exports (export * as tools) preserve member identity through
named, default, wildcard and nested forwarding. Selected literal member paths
leave unused exported siblings reportable; public APIs, mutation, dynamic keys
and escapes retain the possible exported surface. Escaped export spellings
behind wildcard barrels and cross-file classic JS globals remain limited.
Position-preserving parser repairs cover native-valid tagged template escapes
and generic import-type queries, including queries the grammar otherwise reads
as relational runtime expressions. Other syntax errors remain incomplete.
TS/JS local parameter and value reads do not reference unrelated module functions with the same name. Function values passed or captured still count. Imports from a proven disconnected ESM consumer do not keep its providers alive. This requires resolved imports in the selected source scope and known entry points; runtime loader capabilities such as computed imports, eval, Function and createRequire prevent that negative proof. Test-inclusive scopes retain consumers called by tests. Ordinary unused-import reporting still follows lexical reads inside a disconnected file, alongside its unused-file finding.
Go uses a declaration-use graph for packages that can be fully type-checked.
Standard-library types are read from an installed host Go toolchain without
building export caches or running cgo.
Visible imports within the scanned Go module use the same static type proof.
Nested modules, external dependencies, opaque providers, excluded or unreadable
source and incomplete types retain conservative references. Private free helper
functions in internal _test.go packages are reportable only with complete
native unreachability evidence; test entries, callbacks, hooks, public APIs and
live helper chains remain roots. External test packages keep their prior policy.
An explicitly required dependency with a unique unversioned local replacement
can also supply type identity when its matching module and package sources are
already inside the native scan. Unsupported metadata, workspace overrides,
version-specific or remote replacements, excluded providers and paths outside
the scan retain conservative handling. This does not fetch dependencies or add
general external dependency resolution. An active contained go.work can supply
source identity for its ordinary use modules when the exact admitted file
inventory is available. Omitted package members, excluded or outside providers,
unsupported workspace metadata, invalid module requirements, unsupported Go
versions and type errors decline that additional proof. The module's declared
Go language version is honored; target commands and dependency fetching remain
disabled. This does not implement general workspace replacement or build-variant
resolution.
Private functions that only recurse or call one another are reported when no
entry point reaches them. Local variables and parameters with matching names
do not keep unrelated package functions alive. Exported APIs, interface methods,
main, init, test and generated consumers, package initializers and reachable
function values remain roots. Assembly, unresolved imports, conflicting build
variants and type errors retain the earlier conservative reference handling;
they do not establish that a function is unreachable.
Python liveness follows literal logging factory paths into a proven
logging.config.dictConfig consumer and callbacks on registered Flask
blueprints imported through project modules. A dotted string or an unregistered
blueprint alone is insufficient. Analysis is static and bounded; unresolved
dynamic configuration remains a limitation.
C# constructors are not reported as unused functions, except a private
constructor with at least one parameter that no new T(...), target-typed
new(...), : this(...) with a matching argument count or typeof(T)
reaches, and that is not the (SerializationInfo, StreamingContext)
deserialization constructor, has no attributes and is not in a partial type
(Roslyn IDE0051's rule). Controller, dependency-injection, model-binding and
serializer constructors are called by the framework; a class that nothing
references, instantiates or registers is still reported as an unused class.
C# dead-code references also follow: extension methods called with instance
syntax (the method and its static class); method groups passed as named
arguments; calls whose only argument is a string literal; every overload of a
member when a call cannot choose between same-arity overloads; namespaces
brought in by global using directives of a file in the same or a parent
directory; methods of a type whose methods are enumerated with
typeof(T).GetMethods()/DeclaredMethods in the same file; and names written
in .razor, .cshtml, .xaml and .axaml markup outside comments (when
several types share a name and C# code already references one, markup is read
as naming that one). A non-public method or type that carries an attribute
other than a compiler or diagnostic marker ([Obsolete], [MethodImpl],
[Serializable], [StructLayout], [SuppressMessage], ...) is treated as
consumed by reflection or a source generator ([RelayCommand],
[DbContext(typeof(...))]). Fields of a [StructLayout] type are storage
layout and are not reported. A primary constructor is part of its type, not a
separate function.
Ruby initialize belongs to its class and is not reported on its own. In a
class whose superclass is defined in another file, a symbol passed to a
receiver-less class-body call (before_action :load, validate :check,
helper_method :title, rescue_from E, with: :handler, if: :active?) keeps
the instance method of that name, unless the file itself defines that class
method. Visibility and definition calls (private :x, attr_reader,
alias_method, define_method) are not uses.
PHP: a non-abstract class named *Test in a *Test.php file (or under
tests/) whose base class name ends in TestCase or Test is run by PHPUnit
and is not reported. A use const import is used when the bare constant is
read.
Dart: an import is used when the file reads a top-level getter or setter, a
typedef or a typed top-level variable it supplies. An extension member called
on a receiver whose static type the file does not state (a call result or a
property chain, not a local, a dynamic value or a type name) keeps every
visible extension member of that name and the import that supplies it. Calls
in field initializers resolve to members of the enclosing class.
Swift: shorthand optional bindings (if let x, guard let x) read the outer
x, and a nested CodingKeys enum conforming to CodingKey inside a
Codable, Decodable or Encodable type is used by the synthesised
conformance.
Rust references include qualified function values passed as callbacks. Exact
matching cfg predicates can preserve imported filesystem providers inside the
same feature condition; this does not evaluate Cargo features or macros. Rust
also follows function values in let initializers. Reads of local variables and
parameters do not keep unrelated module functions with the same name alive.
Bindings apply within their lexical scope, including closures, match arms and
loop patterns; an initializer is read before its new binding applies. Rust
dead-code candidates retain their experimental confidence cap of 40.
Rust enum variant payloads and attribute expressions contribute import reads. Scoped API contracts recognize imported extension traits and associated constants, including calls inside macro arguments; strings and unrelated inherent methods do not supply those uses. Unique root-module private free functions can be reported as an unrooted group, including recursion cycles, after project references are collected. Cross-file calls, function values, static initializers, conditional entries and unknown macro expansion preserve roots. These bounded checks do not add Cargo feature or macro expansion.
Within a closed Rust source file, local trait declarations and concrete receiver
types can establish which import supplies a method, including aliases and
borrowed receivers. Unknown or competing implementations, conditional items,
unexpanded macros and out-of-line modules decline that proof. Standard writer
macros can establish a std::io::Write import use for a proven writer receiver;
local write_fmt traits, inherent methods and shadowed macros/providers remain
separate controls. A feature-matched cfg_attr wrapper can read its attribute
import without treating predicate strings or inactive wrappers as uses. These
checks preserve Rust's experimental confidence cap of 40 and do not evaluate
Cargo's active feature set.
Ordinary mod name; source closures rooted at a fully scanned main.rs or
lib.rs can also establish local trait import use across files. Every module
must be admitted, readable and unambiguous; attributed, excluded, missing,
macro-generated or over-budget closures add no proof. Repeated import aliases
retain their own source-bound identities, so an inner read cannot hide an unused
outer import. Attributed repeated bindings keep conservative grouping without
guessing the active Cargo configuration.
Rust crate model: Skylos reads every Cargo.toml ([lib], [[bin]],
[[test]], [[bench]], [[example]], build, and the autodiscovered
src/main.rs, src/bin, tests, benches, examples) and walks each
target's mod tree (#[path] included), so every file has a crate and a
crate-relative module path. use trees are resolved leaf by leaf (nested {}
groups, self, globs, as aliases) and through pub(crate) use re-export
chains: flags::generate_fish() after pub(crate) use crate::flags::{complete::fish::generate as generate_fish} credits the
re-export and fish::generate; Separator::new() after use lowargs::ContextSeparator as Separator credits ContextSeparator::new. A
method called on a receiver whose type the file names through a re-export
(args: &HiArgs) credits that method on the crate's types of that name. A
reference in one crate is never captured by a bare-named definition of another
crate (a tests/ or crate-root Config): the definitions its own file and
crate can see are credited. These steps only add references; a path Skylos
cannot resolve keeps the earlier behaviour.
Rust unused imports (SKY-U002) are reported only when the import cannot be a
trait used through its methods: a module, function, macro or constant; a
project item that is not a trait; an enum variant (use syn::Fields::Unit); a
known non-trait standard type (HashMap, PathBuf, Arc...); a prelude trait
the crate's edition already imports (use std::convert::TryInto in 2021+); or
a trait whose member list Skylos knows (project traits, common std traits)
none of whose members the import's scope calls or names. An external or
unresolved item of unknown kind is reported only when its scope calls no method
and names no associated item. Everything else (use bstr::ByteSlice, use diesel::RunQueryDsl, a project Crud trait whose create is called) is an
abstention, listed in dead_code_abstentions. use Trait as _ creates no
definition. Writer macros count as write_fmt: on a String for
fmt::Write, on a byte buffer for io::Write, on an unknown receiver for
both; a local macro_rules! body counts where it is invoked.
Rust entry points and positions: any function whose attribute path ends in
test or bench (#[test], #[bench], #[tokio::test(...)],
#[divan::bench], #[sqlx::test]), or #[rstest], #[test_case],
#[test_matrix], #[wasm_bindgen_test], is an entry point, also with doc
comments between the attributes and fn. Read positions include associated
types and constants in impls (type InsertForm = X;), a bare type alias
right-hand side, tuple-struct fields, identifier patterns naming an imported
capitalised item (Unit => ...), inline format arguments ({EXE_SUFFIX},
{x:>width$}; locals excluded), calls in attribute arguments
(#[diesel(select_expression = f())], #[default(f())]), serde paths inside
cfg_attr, a glob import of an enum's variants, and the item paths of a local
macro_rules! body at each invocation.
Rust lint levels: an item under #[allow(dead_code)] or #[expect(dead_code)]
(unused and warnings too, also through cfg_attr) on the item, its impl,
its module (#![allow] in the file, #[allow] on mod x;) or the crate root
is not reported: it is listed in whitelisted with reason #[allow(dead_code)] in scope and stays a liveness seed for its callees, as in rustc;
allow(unused_imports) does the same for imports. #[cfg(...)] alternatives
of one function in one scope (#[cfg(unix)] fn imp / #[cfg(not(unix))] fn imp) share liveness. Rust keeps its experimental confidence cap of 40.
Swift dead-code checks parse .swift sources and follow private/fileprivate
declarations, owner and lexical bindings, function values, callbacks and private
call cycles. Public/internal APIs and runtime or compiler-generated consumers
remain roots. Import usage is not inferred from textual module-name matches:
imports may supply extensions and operators. SwiftPM .build source products
are excluded from directory scans; an explicit file target is still inspectable.
Missing grammar, unreadable source and syntax errors report incomplete analysis.
Swift security-flow analysis, quality rules and local API verification are not
implemented; existing secret scanning also reads Swift sources.
A Python module or class variable is kept alive by an attribute read x.NAME
elsewhere only when x could be its owner. For a module variable that is the
module itself (import alias or dotted path), a module that star-imports it,
Django's settings object, or an unknown receiver (parameter, local, call
result) once the module object can reach one: it is imported as a module,
named by a dotted string such as config_from_object("app.celeryconfig"), or
the project loads modules dynamically (import_module with a computed name,
sys.modules, runpy.run_path). For a class variable it is self/cls of
the class, a subclass or a base, the class or a subclass by name, or an unknown
receiver. self.NAME in an unrelated class without __getattr__,
other_module.NAME and literals are proof of another object, so
RETRY_LIMIT = 3 in settings.py is reported when the only RETRY_LIMIT
reads are self.RETRY_LIMIT on another class and policy.RETRY_LIMIT on a
parameter while settings is never imported as a module. Grep verification
then ignores those attribute-only lines in analysed .py/.pyi files.
Classes with a base outside the project, a decorator, a metaclass or an
enclosing scope keep name-only liveness, because code Skylos cannot see may
read their attributes.
Java, Kotlin, Rust and Dart definitions with the same name in different files
(two Util classes in different packages, private helper functions in two
crates) are separate definitions. A reference reaches the ones its file can
see: its own file, then (Java/Kotlin) its package and its imports, then (Rust)
its crate; with no such evidence it reaches all of them. Package and import
lines are read with comments and string literals blanked, so a commented-out
or quoted import b.Util; is not an import. Overloads in one file
share one definition, since name-only references cannot tell format(int)
from format(String).
| ID | Severity | Name | Scope |
|---|---|---|---|
| U001 | INFO | Unused function | Upload/API normalized dead-code category |
| U002 | INFO | Unused import | Upload/API normalized dead-code category |
| U003 | INFO | Unused variable | Upload/API normalized dead-code category |
| U004 | INFO | Unused class | Upload/API normalized dead-code category |
| U005 | MEDIUM | Declared dependency appears unused. Run-time declarations only: requirements files, [project].dependencies, and install_requires in setup.cfg/setup.py (extras, setup_requires and tests_require are not reported). Compiled lock entries (pip-compile/uv, --hash, # via) are never reported; their .in inputs are checked instead. Imports, Django settings strings, import_module strings, Procfile/Dockerfile/compose/Makefile commands, entry points and mypy plugins count as uses; type-stub and database-driver packages are skipped; npm dependencies/devDependencies also count source imports, package scripts, CI/Dockerfile/Makefile/Procfile commands and supported tool-config uses, and unused @types/ packages are reported when their package is used nowhere; unresolved consumers prevent absence claims only for the dependencies they could reach |
Python and npm dependencies |
| U006 | INFO | Unused parameter | Debt normalized dead-code category |
| U007 | LOW | Unused TypeScript enum member | An unread member of a used module-local enum, or of an exported enum in an internal module (the SKY-E004 notion) with resolved direct named imports; public, tagged, escaping, reflective, mutated and opaque enum surfaces are retained |
| U008 | LOW | Unused TypeScript namespace member | An unread variable, type or interface member of an export namespace in an internal module, when every read of the namespace names its members; escaping, merged, tagged and public namespaces are retained |
| DC001 | MEDIUM | Unused function | LLM report dead-code ID |
| DC002 | LOW | Unused import | LLM report dead-code ID |
| DC003 | MEDIUM | Unused class | LLM report dead-code ID |
| DC004 | LOW | Unused variable | LLM report dead-code ID |
| DC005 | LOW | Unused parameter | LLM report dead-code ID |
| DC006 | LOW | Empty or unused file | LLM report dead-code ID |
| UC001 | MEDIUM | Unreachable code after control-flow exit | Python |
| UC002 | MEDIUM | Unreachable code after return/throw/break/continue | TS/JS, Java |
| E002 | LOW | Empty or docstring-only file | Python |
| E003 | LOW | Unused TypeScript/JavaScript file | TS/JS |
| E004 | LOW | Unnecessary export | TS/JS (values, re-exports, types and interfaces) |
| E005 | LOW | Duplicate export | TS/JS: one binding exported under two names |
SKY-E003 counts every literal module request as an edge, including
import() and require() whose specifier follows a leading comment
(import(/* webpackChunkName: "x" */ "./x")). index, main and cli
files are entry points by name, except an index file that a sibling
index with an earlier extension shadows for directory imports (index.js
over index.tsx in a Docusaurus site, index.ts over index.js elsewhere).
A module published only as declarations by a types-only wildcard export is
not reported when it declares exported types (type, interface,
namespace); a value-only module there is.
SKY-E003 also takes entries from the commands a project runs, read with one command model shared with the npm dependency
rules: package.json scripts, GitHub Actions run: steps (workflows and
composite actions), .husky/* hooks and lefthook and simple-git-hooks
commands. Per-binary argument specifications say which words name files: a
runtime's script and its -r/--require/--import/--loader preloads, a
-c/--config file of vite, vitest, playwright, jest, webpack, rollup,
rolldown, tsup or tsdown (-C/--config-file for cypress), and tsup, tsdown
and esbuild positional entries. A build script such a command runs hands its
literal entry/input strings (config.entry = "../packages/app/index-node")
to webpack or rollup; they are resolved against the script's folder and the
command's folder. A type-check command (tsc, tsgo and vue-tsc with
-p/--project or -b/--build, ngc -p, svelte-check --tsconfig, also
run as node node_modules/typescript/lib/tsc.js) names a tsconfig project:
its files are entries, and its include set (patterns that climb out of
the declaring config's folder excluded) is the entry set only for a package
that has no other entry, such as a type-check fixture. The exports of those
files are public only when the project emits declarations (declaration,
composite or emitDeclarationOnly, and no noEmit). An import resolves to
the file a symlink names, so every engine sees one identity. Vue, Svelte and
Astro components that no JS/TS file or component imports (pages, routes,
auto-registered components) are graph roots, like MDX documents: what they
import is live and its imported names are used. Files under scripts/ and
example(s)/ are no longer roots by path alone: one needs a live importer, a
command that runs it, a path reference, a shebang, or its file name written in
another repository file, and is reported otherwise. Files that import each
other in a cycle no entry reaches are reported too (the importer fixpoint never
saw them), unless the unreachable region spans more than 8 files. An unused
file is one finding: SKY-E004, SKY-E005, the unused-symbol rules,
SKY-U007, SKY-U008, SKY-Q408 and SKY-Q414 findings inside a file SKY-E003
reports are folded into it and counted in
analysis_summary.dead_code_folded_into_unused_files.
A public instance method of a class that implements a type from outside the
project (an imported dependency type such as Lit's ReactiveController, or an
ambient library type such as EventListenerObject that the project neither
imports nor declares) is not judged: the framework or platform calls it.
Protected, private, # and static members stay judged, as do the methods of a
class that implements a project interface.
SKY-E004 also reports an unused re-export (type: "reexport" in JSON): an
entry such as export { a } from "./a", export type { T } from "./t", an
imported binding listed in export { x }, or export default x where x is
another export or an import, when no file in the project requests that name
from the module, directly or through other re-exports, export * or a
namespace import. Each entry is reported on its own line. An imported
binding re-exported beside a requested value export whose shape names it
(export type { GateResult } next to notify(result: GateResult)) stays
silent, so that export's callers can name it. Public modules
stay silent: package.json main, module, types, exports, bin and
browser targets (a build output maps to its source: dist/ and out/
to src/, or the bundler entry that emits it, read from the entry/input
option of a tsdown, tsup, rolldown or rollup config beside the
manifest, globs and wrapper calls included; when it cannot be mapped, every
module with the same file name stays silent). A conditions-only exports
object (no . key) is the . entry, and every condition's target is tried
(a custom source condition such as "@scope/source": "./src/index.ts"
names the source). Published packages are read before private ones, so a
monorepo with many examples keeps its packages' API; tool, framework,
test and script entries, files named by path elsewhere, index/main/cli
files at a package root or its src/, and modules no file imports. A call
with a literal relative path (importActual("./x"), a createRequire
result) loads the whole module; mock registrations (vi.mock, jest.mock)
do not. A computed import()/require() keeps every module under the
directories its static path pieces name silent. A module whose name matches
the last segment of an unresolved import stays silent, unless that import
is a bare specifier of a declared external npm dependency (next/server,
react-dom/client): it resolves into node_modules, never to a project
module. An unresolved stylesheet, data or media file (@ui/kit/index.css,
./logo.svg, ./data.json) names no module either. Relative, #,
path-alias, workspace-package and undeclared bare specifiers still count. A whole-module use that only runtime code sees in a
TypeScript importer (an import * as ns passed as a value, import(),
require(), an import glob) requests every value export but no type, since
a runtime object holds no types; the importer's ns.X reads, types
included, stay requested. JavaScript importers (which may name types in
JSDoc), import type * as ns and the other whole-module uses still request
everything. Files that load modules without being JS/TS sources are read
as text (never compiled) and request names like any importer: Vue, Svelte
and Astro component scripts, inline <script type="module"> blocks of HTML
pages and MDX import/export statements (an ESM block runs to the next
blank line; front matter, fenced code and code spans are prose). A
<script type="module" src> target is an entry. What cannot be parsed (a
script in another language such as lang="coffee", a syntax error, an MDX
expression import()/require(), a Marko template) holds back only the
modules its text names, which then count as wholly used; the rest of the
project keeps exact checks. Only a consumer that cannot be read at all (a
symlinked file, one over 32 MB) or a project past 200,000 walked files turns
the check off (export_surface_unavailable in
namespace_member_analysis). A wildcard export with only a types
condition ("./*": {"types": "./dist/types/*.d.ts"}) publishes each
module's declarations, not its values: the module's type exports, type
re-exports and namespace members stay silent (mapped through the package
tsconfig outDir/rootDir, else the folder the declaration path names),
while its value exports are still checked. Code in __testfixtures__ and
__fixtures__ folders is test data read as text (jscodeshift fixtures) and
is never reported by SKY-E003, SKY-E004, SKY-E005, SKY-U007, SKY-U008 or the
unused-symbol rules; its imports still count as edges.
SKY-E004 also reports an exported TypeScript type alias or interface
(type: "type" or "interface"; export declare type and a local type
exported by export type { T } included) that no project file requests from
its module: named or import type imports, import("./m").T type
references, namespace-import member reads in type positions, re-exports and
export * chains all count as requests. The same public modules stay
silent, and .d.ts files, declare global/declare module blocks and a
module named in another file's declare module "./m" are never reported.
A type used only inside its own file is still reported, because its export
keyword is unnecessary; the message then says "used in this file". A type in
the shape
of a value export some file requests stays silent, since that export's
callers may need to name it: its parameter, return or annotation types, the
body of a function whose return type is inferred (but not what a JSX element
renders: the element is a JSX.Element whatever its components and props),
and the module-local declarations those reach (Knip follows fewer of these).
A requested type does not hold the types it names, and the walk does not continue through
another exported type. A type merged with a value of the same name
(const Config plus type Config, a class plus an interface) also stays
silent.
Release tags in a JSDoc or // comment directly before an export mark it as
published API: @public, @alpha, @beta (and @alias) keep a
value, class, re-export, type, enum, enum member or namespace member out of
SKY-E004, SKY-U001/U003/U004, SKY-U007 and SKY-U008. @internal gives no
protection. A // comment that ends the previous statement's line does not
tag the next one.
SKY-E005 (LOW) reports one binding exported under two names (public modules
included): export const B = A where
A is an earlier export of the module, and export default A where A was exported
by its own declaration (a component exported by name and as default). The
binding must not change: A is a const, function or class that is never
reassigned, and B is a const. Specifier lists (export { a, a as b },
export { x }; export default x), imported bindings, @alias-tagged
statements, internal modules an importer uses whole (Object.keys(ns),
import(), require()) and the modules they forward through export *,
.d.ts files, text fixtures, stories and tool configs stay silent; a
package entry or its export * target is checked like any module, even when
a test uses it whole (vi.spyOn(ns, "x"));
an unrequested alias in a specifier list is SKY-E004's unused re-export. The
finding names the group (NAV_ITEMS|ALL_NAV_ITEMS) on the alias's line and
lists the names in duplicate_names.
SKY-UC001 preserves a sole unreachable yield/yield None that establishes
generator semantics in its enclosing function. Nested function/class bodies
do not supply that marker. Redundant markers and later unreachable statements
remain reportable.
SKY-U005 resolves namespace child imports, canonical distribution providers and
explicit plugin/tool use in fixtures, markers, commands and configuration.
Incomplete source/configuration evidence, unresolved dynamic imports and
ambiguous namespace ownership do not prove non-use. The rule abstains from an
unused-dependency finding when those limitations leave usage unresolved.
One analysis_summary.unused_dependency_analysis receipt records coverage,
reasons and abstentions. Candidates absent from a resolved usage inventory
retain value = "unused". Dependency vulnerability inventory and scanning
remain independent of this usage decision.
For npm, SKY-U005 also checks dependencies and devDependencies in each owning
package.json. Literal source imports, package scripts, type references and
supported plugin configuration count as uses. Vue, Svelte and Astro script and
style blocks, top-level MDX ESM (not fenced code or prose) and stylesheet
@import/@use/@forward/@plugin/@config/@reference rules are read as
text; a component also uses its framework runtime and a .scss/.sass/.less
file its compiler. Literal PostCSS plugin maps, TypeScript
types/importHelpers/JSX runtime options (also from relative extends
parents, which are followed), /// <reference types> directives, source a
tsconfig include/files pulls in from outside the package, package names in
tool config strings (Nuxt modules, Docusaurus presets, Storybook addons, Jest
presets, Vitest coverage providers, angular.json builders, Expo plugins),
literal ESLint/Babel/Prettier configs written as JS modules, runner flags and
subcommands that load a package (vitest --ui, astro check), @size-limit/*
plugins next to a size-limit config and the peers a used framework requires
(installed or workspace peerDependencies, or well-known contracts such as
next to react-dom and Angular's framework peers) also count. Peer
contracts and typescript in TypeScript packages are retained. An @types/x
package is reported only when x is used nowhere in the project, no tsconfig
types entry or reference directive names it and no source uses its ambient
global (@types/node stays while any source uses Node built-ins or process).
A dependency declared in several sections is reported once per section.
A nested package.json that declares no name, dependency map, workspaces,
scripts or binaries (a {"type": "commonjs"} format marker) does not own
files: they belong to the enclosing package, as only the root and declared
workspaces own files. A marker at the scan root keeps ownership.
Node resolution walks up to ancestor node_modules, so an ancestor
workspace's declaration satisfies SKY-Q408 for tests, test setup files, tool
configs, scripts, stories, examples and benchmarks, for compile-time inputs
(.d.ts files, /// <reference types>, tsconfig types) and for every file
of a private package, and that ancestor declaration counts as used. By
default it also satisfies production source of a
published (non-private) package; the receipt counts those imports as
ancestor_declared_production_imports. With strict_dependencies = true
such source needs its own declaration, because consumers install only that
package's dependencies, and the finding names the ancestor_manifest. A sibling workspace's declaration never
satisfies an import. A workspace package that a tsconfig paths entry (of the
file's own tsconfig or of another package's tsconfig that compiles the file)
or a readable bundler resolve.alias key maps to project source is not an
unlisted dependency outside published production source, where the emitted
bare specifier still needs a declaration. Files that codemod and transform
test harnesses read as text (__testfixtures__/, __fixtures__/, and
fixtures/**/input.*/output.*) are usage evidence only, and a JSDoc
import() type is an unlisted claim only in published production source; a
type-only import is satisfied by the matching @types/ declaration. A script
binary that no declared package could provide is SKY-Q409; configs, plugins,
presets and @types/ packages never provide a tool binary, and an unknown
command holds back only uninstalled, name-related dependencies that could
provide it, recorded under abstained_dependencies[].binaries. Lockfiles are
read as data for binary names and peers when node_modules is absent:
package-lock.json/npm-shrinkwrap.json (bin, peerDependencies), Yarn
Berry yarn.lock (bin:, peerDependencies:), bun.lock and the
peerDependencies of pnpm-lock.yaml entries (pnpm records only hasBin).
They only credit: a binary maps to the package whose lock entry lists it, and
a used package's locked peers count as used; a lock entry without a bin
never removes a hold.
Package scripts, GitHub Actions run: steps, Dockerfile RUN/CMD/
ENTRYPOINT lines, Makefile recipes, Procfiles and GitLab CI scripts are read
with one command parser: each &&/;/||/| segment on its own, $VAR
expansions in arguments and assignments, redirections, command substitutions,
cross-env/env prefixes, yarn --cwd <dir>/npm --prefix <dir>/pnpm -C/
--filter/yarn workspace <name> targets (a target's own script is read
there) and runtime script files (node ../../scripts/build.js, followed
through its relative imports). CI and container commands credit every
declaration that provides them; a CI line the parser declines holds back only
dependencies named like its words. An expanded command name, node -e code,
opaque wrappers, a missing script outside the package and unparseable files
still prevent absence claims. Computed module specifiers proven to be a local
path (path.resolve(...), ${__dirname}/..., a constant relative path) or a
literal (["fs"].join()) do not; other dynamic loaders do. An unresolved
consumer holds back only the ancestor declarations its resolution can reach
(those it and nearer ancestors do not declare), and an unread ESLint, Babel,
Prettier or manifest tool config holds back only that tool's family. pnpm
catalogs are checked for unused entries (SKY-Q411) and unresolved references
(SKY-Q412), and static imports of optional peers are SKY-Q413. The receipt is
analysis_summary.npm_dependency_analysis with limitations_by_package,
abstained_dependencies (with binaries or limitations),
catalog_analysis and optional_peer_limitations. Package code, configs and
scripts are never executed by these checks.
SKY-U007 reports unread members of a used module-local TypeScript enum, and
of an exported enum whose module is internal by the SKY-E004 notion (not a
package.json entry, tool or framework entry, file named by path, module no
file imports, or wholly consumed module), when a complete source graph
resolves direct named imports and literal member reads. A package need not
be private: true. An unresolved import does not hold back every enum: a
relative specifier that matches no file cannot load an existing module, so
only the module its last segment names (./status.js?raw names
status.ts) and, for a path alias or workspace package specifier, the
modules of that package abstain (unresolved_import_may_reach_module); the
specifiers are listed in unresolved_imports. Package entries,
ambient/classic-script enums, namespace imports, re-exports, dynamic module
loads, reflection, mutation, escapes and effectful initializers prevent
narrowing. A Vue, Svelte or Astro component, HTML module script or MDX
document that imports an enum's module is an opaque consumer of its enums
(a template can read Status.Spare without the script naming it); other
modules keep exact narrowing. Importing such a component from TypeScript does
not stop the check when Skylos can read the component; only an unreadable one
holds the enums back. A @public/@alpha/@beta
enum or member stays live. An entirely unused enum stays with the existing
owner finding. Findings carry their explicit rule ID and type: "enum_member" in unused_variables; analysis_summary.enum_member_analysis
records the bounded local_and_internal_module_enums scope and abstentions.
Review numeric member values before removing a declaration: implicit values
can change.
SKY-U008 reports an unread member of an export namespace N { export ... }
in an internal module: a variable, type alias or
interface, including members of nested namespaces (N.Inner.x). A member
is read by N.x (also in type positions) in any file, by a destructuring of
N, or by any reference in the namespace body. Functions, classes and enums
declared in a namespace keep their existing SKY-U001/SKY-U004 findings, so
they are not reported twice. The check abstains for the whole namespace when
it escapes (passed as a value, spread, Object.keys(N), N[key],
re-exported, export default N, requested whole through export *), is
merged with another declaration of the same name, is ambient (declare), is
tagged @public/@alpha/@beta, when no other file imports it, or when a
types-only wildcard export publishes its module's declarations
(public_type_declarations).
Findings are in unused_variables with type: "namespace_member";
analysis_summary.namespace_member_analysis records the
internal_module_namespaces scope, checked namespaces and abstentions.
SKY-U009 reports a private Rust enum variant in a Cargo binary when the scanner
resolves a qualified use of a sibling variant and finds no other occurrence of
the candidate's identifier in the observed targets. Patterns, import aliases
and same-spelled names keep the variant. The check requires a complete scan
of the Cargo targets and abstains on macros, conditional compilation and
unobserved modules. FFI or unsafe code in the candidate crate also prevents
reporting. Results carry type: "enum_variant" in unused_variables and
appear with --confidence 40. Review discriminant values before removing
a variant.
Dead-code findings skip code a framework or tool loads by convention rather than by an import. These conventions apply to TS/JS, PHP and Python:
| Convention | Scope | Kept live |
|---|---|---|
| Next.js App Router | app/, or src/app/ when there is no root app/, in a Next.js project, outside private _folders |
page, layout, template, loading, error, global-error, not-found, default, route files (.js, .jsx, .ts, .tsx, or the literal pageExtensions of next.config.*), their default export, route handlers, metadata/generateMetadata/viewport/generateViewport/generateStaticParams and route segment config exports (dynamic, revalidate, runtime, ...) |
| Next.js metadata routes | app/, or src/app/ when there is no root app/, in a Next.js project, outside private _folders |
robots, sitemap, manifest, icon, apple-icon, opengraph-image, twitter-image files and their default export; alt, size, contentType, generateImageMetadata in image routes; generateSitemaps in sitemaps |
| Next.js Pages Router | pages/** |
default exports, getServerSideProps, getStaticProps, getStaticPaths, getInitialProps, _app/_document/_error/404/500; config and _app's reportWebVitals in a Next.js project |
| Next.js root files | project root or src/ |
middleware, proxy, instrumentation, instrumentation-client, mdx-components and their hook exports |
| Tool config files | any directory | next.config.*, postcss.config.* and tailwind.config.* (.js, .mjs, .cjs, .ts, .mts, .cts), the usual Vite, Vitest, ESLint, Jest, Playwright and tsup config names, and their default export, including const config = {...}; export default config |
| Package tool configs | <tool>.config.<ext> (.js, .mjs, .cjs, .ts, .mts, .cts) next to a package.json, and turbo/generators/config.* |
every export: metro, babel, drizzle, stylelint, openapi-ts, Expo app.config, a turbo gen generator, ... |
| Expo Router | a package whose dependencies/devDependencies list expo-router; router root from app.json (expo-router plugin root / extra.router.root), else src/app if present, else app |
every .js/.jsx/.ts/.tsx file under the root, its default export, unstable_settings, ErrorBoundary, generateStaticParams, loader; HTTP method exports of +api files; redirectSystemPath/legacy_subscribe of +native-intent |
| React Email | a package depending on react-email; ./emails plus any --dir/-d in an email dev|build|export script |
.js/.jsx/.tsx files with a default export, outside _-prefixed and static folders, and their default export |
| Jest manual mocks | any __mocks__/ directory |
the file and all its exports |
| Plugin table tools | a package (or an enclosing one) that declares a row's enabler (@remix-run/dev, vike, @react-router/dev, @tanstack/react-router, gatsby, @builder.io/qwik, mocha, cypress, @storybook/*, ... 200 tools) or has its marker file |
the row's config files, entry and production patterns (relative to each enclosing package root) plus entries its literal config keys name; every export unless the row narrows it. See Plugin table (JS/TS) in the glossary |
jscodeshift transforms (table row jscodeshift) |
defineTest(__dirname, "name", ...)/runTest(__dirname, "name", ...) in a test file |
<test dir>/../name (with .js, .cjs, .ts, ... resolution): the transform and what it requires; __testfixtures__/__fixtures__ files are text and never reported |
SolidStart (table row solid-start) |
a package depending on @solidjs/start |
src/app, src/entry-server, src/entry-client and their default export; modules under src/routes with their default export, route and HTTP method handlers |
Nuxt (table row nuxt) |
a package depending on nuxt |
plugins/, middleware/, pages/, layouts/, components/, modules/ (also under Nuxt 4's app/), server/api, server/routes, server/middleware, server/plugins, app.config and their default export; every export of the auto-imported composables/, utils/ (top level and <dir>/index), server/utils/ and shared/utils/shared/types; the server/tasks, app/error and router.options patterns |
Astro (table row astro) |
a package depending on astro or with astro.config.* |
src/pages/** endpoints (default, HTTP methods, getStaticPaths, prerender, partial), src/content.config (collections), src/middleware (onRequest), src/actions/index (server) |
Docusaurus (table rows docusaurus, docusaurus-v1) |
a package depending on @docusaurus/core (or docusaurus 1) |
docusaurus.config.*, sidebars.*, src/pages/**, src/theme/** (v1: siteConfig.js, core/**, pages/**) and their default export |
SvelteKit routes (table row sveltekit) |
a package depending on @sveltejs/kit or with svelte.config.* |
src/routes/**/+*.{js,ts}, src/hooks*.{js,ts}, src/params/*, src/service-worker and every export |
Lit reactive controllers (table row lit) |
a module importing lit, lit-element, lit-html or @lit/* |
hostConnected, hostDisconnected, hostUpdate, hostUpdated of a class that implements ReactiveController (imported from Lit) or calls host.addController(this) |
| Knip config entries | entry (top level for the root workspace, workspaces[dir].entry) of the repository's literal Knip config |
the files and every export |
| Docusaurus aliases | an importer inside a site with docusaurus.config.* |
@site/x resolves from the site root and @theme/X to a swizzled src/theme/X; extensionless paths follow the site's webpack order (.mjs, .js, .jsx, .ts, .tsx; plain webpack 5 defaults to .js, .json, .wasm, TypeScript tries .ts/.tsx first), so index.js shadows a sibling index.tsx |
SvelteKit $lib (table row sveltekit, aliases) |
a package depending on @sveltejs/kit (or with svelte.config.*) |
$lib/x resolves to src/lib/x, including Svelte 5 rune modules ($lib/state.svelte loads state.svelte.ts) |
| esbuild entry points | entryPoints of a top-level esbuild.build/context call in a script a package.json script runs (also under an excluded folder such as dev/build), including path.join(import.meta.dirname, ...) values and objects that later gain new keys |
the entry files and all their exports (the bundle's interface) |
| Laravel Vite plugin | vite.config.* |
each input of laravel(...) from laravel-vite-plugin |
| Laravel | a composer.json whose require lists laravel/framework |
Illuminate\Console\Command subclasses in app/Console/Commands (bases resolved through imports and the PSR-4 map); classes in app/Listeners with a handle*/__invoke method whose first parameter has a class type, when event discovery is on (a provider's shouldDiscoverEvents() returns true, or the Laravel 11 Application::configure() builder without withEvents(discover: false)); *Factory in database/factories when the model in app/Models or app uses HasFactory (directly or through a project parent); *Policy in app/Policies when the model exists; classes in app/Livewire, app/Http/Livewire, app/View/Components, database/migrations; DatabaseSeeder and any other Illuminate\Database\Seeder subclass in database/seeders (run by db:seed --class); and the public methods of those classes |
| Blade templates | *.blade.php |
helper functions called in the template, classes named with new, :: or a fully qualified name (@inject, @use), and methods called as ->name(...) |
| PHP class strings | any PHP string literal | fully qualified class names ('App\Services\Mailer', generated-PHP strings in Blade directives) |
| Flask | modules importing Flask | module-level create_app/make_app factories (Flask CLI discovery) and what they register; Blueprint before_app_request/app_errorhandler/... hooks once the blueprint is registered; functions passed to app.teardown_appcontext(...), before_request, register_error_handler, ...; the parameters Flask passes to callbacks (close_db(e)) |
| Declarative class attributes | class bodies of classes with a base | attributes built by Relationship, relationship, mapped_column, Column, column_property, association_proxy, backref, synonym, composite, deferred, ForeignKey, ParentalKey, GenericRelation, GenericForeignKey, TaggableManager, ClusterTaggableManager or any *Field(...) constructor (Django model/form fields, Wagtail RichTextField/StreamField, DRF); *Filter(...) on a *FilterSet; *Block(...) children of a Wagtail *Block; every field of a table=True SQLModel class |
Meta classes |
any class named Meta |
the class and its options (Django models/forms, DRF, django-filter, Wagtail blocks, factory_boy) |
| Wagtail | modules importing wagtail |
Page attributes (content_panels, promote_panels, settings_panels, search_fields, api_fields, template, subpage_types, parent_page_types, max_count, preview_modes, ...), snippet/ModelViewSet options (list_display, list_export, sort_order_field, menu_label, ...), Task.task_state_class, AccessibilityItem axe_* options; the parameters of Page, preview, workflow-task and block hook methods (serve, serve_preview, get_preview_template, get_context, user_can_access_editor, get_actions, ...) |
| Django | modules importing django |
parameters of class-based-view handlers (get, post, ..., dispatch, setup), of system checks registered with register(...) (app_configs, **kwargs), and of documented ModelAdmin/Inline, Widget, Field and Form hooks; model classes in an app's models module (fields or a model-like base); UPPERCASE names in locale/<lang>/formats.py and FORMAT_MODULE_PATH format files |
| Registration decorators | class decorators named register* |
the class (@register_setting, @register_snippet, @admin.register) |
| Python registration decorators | any Python module | functions decorated @<object>.<attribute> where the attribute is a route or registration verb (get, post, route, api_route, on, on_event, or has an underscore-separated word such as tool, resource, prompt, task, command, event, handler, listener, subscriber, hook, signal, register, fixture, job: @mcp.tool(), @server.call_tool(), @client.event, @sio.on("chat"), @celery_app.task), and a bare @tool, @function_tool, @task, @shared_task, @hookimpl, @hookspec, @register* imported from outside the project (also through an import alias). Cache and wrapper decorators (functools, contextlib, st.cache_*) never make a function used; a decorator the project defines (in the module or imported from the project's own package) counts only when its body registers the function |
| Python package entry points | pyproject.toml [project.scripts], [project.gui-scripts], [project.entry-points.<group>], Poetry scripts and plugins; setup.cfg [options.entry_points]; the literal entry_points= of setup() in setup.py (parsed, never run) |
the named function or class (extras ignored), the class owning a module:Class.attr target, and the public methods and class attributes of a class that is itself an entry point (the plugin host calls them). A module-only entry (pytest11 = "pkg.plugin") keeps no symbol by itself |
A project is a Next.js project when a next.config.* file or a package.json
that depends on next sits in the file's directory or a parent. Only the named
convention exports stay live: an unused helper exported from page.tsx or
opengraph-image.tsx, and an unused private method of a Laravel listener, are
still reported. A helper that only a convention root calls, such as a data
loader called by a page's default export, stays live; in JS/TS that applies
only when the file itself is one Next.js routes, Storybook loads or a tool
reads as config, not to name-only marks such as use* hooks or a page.tsx
outside app/. With discovery off, a Laravel listener stays live only through
its ::class registration in $listen or Event::listen.
Code outside a repository imports a library's public API, so a public name that nothing in the repository uses is not dead when the library declares it public. Skylos recognizes a conservative static subset of common documentation, typing and lazy-export declarations. Its exclusions below are Skylos policy; documentation builders and type checkers have their own configurable selection rules.
| Declaration | Kept live |
|---|---|
__all__ |
the names it lists (it is the module's exact API) |
__init__.py re-exports |
names imported into a package __init__ without __all__, and import x as x aliases |
Attribute docstring or #: comment |
a public module-level name in a public module with no __all__: URL = "..." followed by """Doc.""", #: Doc. on the line above, or URL = "..." #: Doc. |
| Sphinx object directive or role | the named object: .. autofunction::, .. autoclass::, .. autodata::, .. py:function::, autosummary entries, :func:/:class:/:data:/:const:/:obj:/:meth: roles, resolved through .. currentmodule::; reST, .txt and MyST ({eval-rst}, ```{autofunction}, {py:func}) |
automodule and mkdocstrings ::: |
the module's selected documented public members; supported explicit member lists and undocumented-member options can also select undocumented members. Local mkdocstrings filters apply to automatic selection. None of these widen __all__. |
.pyi stub |
explicit declarations, including explicitly declared public methods, limited by the stub's and implementation's __all__; explicit re-exports in an __init__.pyi, or relative imports used by a proven lazy_loader.attach_stub getter |
| Lazy exports | names whose supported getter flow returns an attribute from the exact imported module, or names supplied to canonical lazy_loader.attach / attach_stub calls. Unused tables and unresolved owners supply no export evidence. |
Private _names, names in private _modules, tests, scripts, docs and
examples are never declared public this way, nor is a name marked
:meta private: or @private. Changelog, history and release-note files are
not read. A function docstring alone does not make a function public, and a
documented class does not make its undocumented methods public. A
__getattr__ that only raises or warns does not export anything.
Literal examples, comments and escaped documentation markup do not declare API. Evidence files must be regular files inside the scan root; symbolic links and oversized files do not supply evidence. Skylos does not build documentation or import the scanned package. Unsupported documentation options, complex filters, custom lazy-module replacements and unresolved dynamic behavior remain available for review rather than implicitly rescuing names.
A project can declare public API that has no such marker with a dead-code entrypoint rule:
[[tool.skylos.dead_code.entrypoints]]
full_name = "mypkg.datasets.*"
reason = "public dataset catalog"Generated sources (a leading comment such as // Code generated ... DO NOT EDIT., @generated, This file was automatically generated by ... or This file is auto-generated by ...) are parsed for references, but their
dead-code, quality and AI-defect findings are not reported, like Django
migrations; --include-generated reports them.
Known limitations: tool config and Storybook story files are recognised by file
name, so a stale scripts/old/vite.config.ts or an unused *.stories.tsx
keeps its callees live; a Laravel policy stays live while its model file
exists, even if the model is dead; and a class referenced only from a dead
class (for example an event type-hinted only by an unregistered listener) is
not reported, as with any other reference from dead code.
PHP classes named only in type positions count as used: parameter, return and
property types (including nullable, union, intersection and promoted
constructor parameters), instanceof, catch, attributes, ::class, and
PHPDoc types (@param, @return, @var, @throws, @extends,
@implements, @use, @template ... of, @method, @property, @mixin,
including generics and multi-line array shapes). As in PHP-CS-Fixer, an import
that a docblock only mentions in prose or in a cross-reference (@see,
@uses, PHPUnit @covers, {@see}, {@link}) stays used, but that mention
does not make the class itself used. A class's own docblock naming the class
(@method static Builder|Self query(), @mixin Self) does not make it used.
Pretty output and the TUI use short display labels such as
dead-code/function, dead-code/import, dead-code/class,
dead-code/variable, dead-code/parameter, and dead-code/file. Those labels
are UI grouping text, not stable rule IDs; use the SKY-* IDs above for
suppression, integrations, and public references.
| ID | Severity | Name | Scope |
|---|---|---|---|
| SCA-* | varies | Software composition analysis vulnerability | Dependency manifests / installed packages |
| SKY-SCA-LIC001 | HIGH (configurable via license_severity) |
Dependency license policy violation | Declared dependency license (offline lockfile / installed metadata) cannot be satisfied without a license in license_deny, or outside license_allow; NOASSERTION never fires |
| SKY-SCA-NPM-PUB001 | WARN (review only) | npm publisher change after release dormancy | Direct npm dependency pinned in a package lockfile; verify the publisher and release provenance before upgrading or deploying |
| SKY-SCA-SRC001 | CRITICAL (direct) / HIGH (transitive) | Possible dependency confusion | A package matching [tool.skylos.supply_chain] internal_packages resolves from a public or merged index (--extra-index-url, a public lockfile registry); decided by the ca9 engine, reported only with configured patterns and registry evidence |
| SKY-SCA-SRC003 | MEDIUM | Mutable dependency source | A Git dependency not pinned to a full commit, or a URL dependency without a hash, in a requirements file, pyproject.toml, package.json without a lockfile, or a lockfile Git/URL entry; local paths are not reported |
| SKY-SCA-SRC004 | HIGH | Package moved to a source this repository did not use | In a pull request, a lockfile points a package at a private, Git or URL source it did not use, or at a new host. Advisory databases do not cover it. Packages matching internal_packages on the target branch are exempt |
| SKY-SCA-INT001 | MEDIUM | Lockfile entry without integrity hash | A registry entry in package-lock.json, npm-shrinkwrap.json, pnpm-lock.yaml, yarn.lock, uv.lock or poetry.lock with no (or an empty) integrity hash; never requirements.txt or npm inBundle entries |
| SKY-SCA-AGE001 | HIGH | Dependency version younger than the release-age window | The locked version was published less than min_release_age_hours ago; scans check this only when the policy sets it |
| SKY-SCA-NEW001 | MEDIUM (HIGH when unproven_packages = "block") |
Dependency name is new or barely used on its registry | A direct npm or PyPI dependency first published under 30 days ago, or under 180 days old with at most 2 releases (ca9.api.package_history). An AI-invented name that someone registered exists, so only its history gives it away. Asks for a check; listed in approved_packages it is not reported. Fails a gate only in block mode |
| SKY-SCA-MAL000 | CRITICAL | Malware feed match without an advisory ID | Offline fallback: the installed ca9 malware feed matched a package but named no advisory ID (matches with an ID use SKY-SCA-<id>) |
| SKY-SCA-UPG001 | CRITICAL | Dependency upgrade adds install-time or start-up code | --diff/--diff-base with --review-upgrades: an npm or PyPI lockfile version change whose new artifact adds a .pth or sitecustomize with code, an install/prepare hook, decode-and-exec, a Git/URL dependency, shipped agent/editor hooks, archive entries that install to the same path or differ only by case, an executable named like a system command, sourceless bytecode run at import or start-up, or an artifact that does not match the lockfile's integrity (ca9.api.review_upgrades); evidence names the file inside the package and a redacted snippet. Fails a diff gate on its own |
| SKY-SCA-UPG002 | MEDIUM | Dependency upgrade adds code worth reviewing | As UPG001 when only ca9's warn list has deltas (new import-time network or exec, obfuscation growth, a native binary, a publisher change, changed install-time code, or anything ca9 flags in a newly added package, block list included, since there is no earlier version to compare against); otherwise findings follow ca9's lists, never the delta kind. Listed, not counted by the built-in gate. Changes ca9 did not review (timeout, unreachable registry, size cap, over 100, complete: false) and changed lockfiles Skylos could not read (over 64 MB, a link, rejected by the parser) are an analysis error (diff gate incomplete); internal packages and entries the lockfile resolves from a private registry are skipped with a warning; changed requirements pins, pdm.lock and pylock.toml are listed as not read |
| SKY-SCA-API001 | MEDIUM | Your line uses API a dependency upgrade removed | --diff/--diff-base with --review-upgrades: a Python package's locked version changed and a line of yours uses a public name, module, method or keyword argument that exists in the old release and not the new one. Both releases are read statically through ca9.artifacts, never imported or run. Advice: no gate counts it, it is not uploaded to Cloud, and whatever could not be read is listed as could not check |
| SKY-SCA-HRD001 | HIGH | Change weakens install hardening | --diff/--diff-base with --sca: ca9.api.hardening_regressions between the merge base and the tracked working tree (cooldown removed, lowered or bypassed for a package, ignore-scripts off, allowBuilds/allowScripts/trustedDependencies additions, strictDepBuilds off, SHA-pinned action moved to a tag). Packages in the base commit's [tool.skylos.supply_chain.hardening_exceptions] with a reason are skipped. Fails a diff gate on its own; a check_failed comparison is an analysis error (incomplete), never a pass |
SKY-SCA-LIC* IDs are reserved for license policy and are not OSV advisory IDs.
SKY-SCA-NPM-PUB001 is a publisher history review signal, not an OSV advisory ID.
SKY-SCA-SRC*, SKY-SCA-INT*, SKY-SCA-AGE*, SKY-SCA-UPG* and SKY-SCA-HRD*
are supply-chain checks from the ca9 engine (ca9.api), not OSV advisory IDs. OSV advisories for malware
(MAL-* IDs or aliases, malicious-packages-origins, CWE-506) keep their
SKY-SCA-<id> rule ID and are reported CRITICAL with metadata.malicious.
Declared licenses are normalized to SPDX; ambiguous values (for example BSD,
GPLv3) are NOASSERTION, never guessed.
These IDs appear in API normalization, audit workflows, LLM schemas, prompts, or agent workflows. They are not always emitted as first-class static-analysis findings.
| ID | Meaning |
|---|---|
| SKY-D000 | Generic security fallback ID for normalized external findings. |
| SKY-Q000 | Generic quality fallback ID for normalized external findings. |
| SKY-S000 | Generic secret fallback ID for normalized external findings. |
| SKY-SCA-000 | Generic dependency fallback ID for normalized external findings. |
| SKY-U000 | Generic dead-code fallback ID for agent workflows. |
| SKY-D101 | Legacy compliance alias for code injection. |
| SKY-D102 | Legacy compliance alias for code injection. |
| SKY-D103 | Legacy compliance alias for insecure deserialization. |
| SKY-AUDIT | Deep-audit candidate or artifact marker. |
| SKY-AUDIT-ENTRYPOINT | Deep-audit entrypoint candidate marker. |
| SKY-AUDIT-LOGIC | Deep-audit repository investigation logic finding. |
| SKY-AUDIT-PATH | Deep-audit security-sensitive path candidate marker. |
| SKY-AUDIT-SECURITY | Deep-audit repository investigation security finding. |
| SKY-DEAD | LLM dead-code verifier marker. |
| SKY-DEAD-CHALLENGE | LLM dead-code challenge marker. |
| SKY-DEBT | Agent command-center debt marker. |
| SKY-FIX | Agent remediation / fix generation marker. |
| SKY-L000 | Generic logic fallback ID for LLM schemas. |
| SKY-C399 | Structure placeholder ID used in prompt examples. |
| SKY-Q499 | Quality placeholder ID used in prompt examples. |
| SKY-P499 | Performance placeholder ID used in prompt examples. |
| SKY-S199 | Secret placeholder ID used in prompt examples. |
Prompt text may also use range notation such as SKY-D226-228,
SKY-L001-004, or SKY-P401-404 to describe groups of concrete rule IDs.
Custom rule packs may emit project-defined IDs from .skylos/rules/*.yml.
Prefer a stable project prefix, for example ORG-SEC001, to avoid colliding
with Skylos-owned SKY-* IDs. Scans with --quality or -a load the packs
in every .skylos/rules/ folder from the scanned file up to the repository
root (nearest pack wins per rule ID), plus ~/.skylos/rules/*.yml and Cloud
rules. With SKYLOS_POLICY_BASE set (PR CI), project packs are read from that
commit only. A pack's rules only add findings; one with a SKY-* ID does not
replace or hide the built-in finding. Packs that are symlinks, over 1 MB,
invalid YAML, use YAML aliases or have no rules list are skipped and named
in a scan warning.
Run skylos . --quality --danger with the postgres extra. Set
[tool.skylos.sql] dialect = "postgresql" in pyproject.toml or use a
Prisma migration lock in the scanned migrations tree. SQL files with uncertain
dialects or parse errors appear in analysis_summary.sql_analysis.
-
SKY-Q503flags a read-only SELECT common table expression unused by the statement or by a potentially effectful CTE. It follows references through CTE chains. A data-changing CTE can still execute when its output is unread. -
SKY-Q504flags ordinary equality or inequality against a literal NULL in supported PostgreSQL filters. Use IS NULL or IS NOT NULL. -
SKY-Q505flags a requiredNOT INfilter with a literal NULL in a literal list. With ordinary equality, even unmatched values fail the filter. It skips subquery lists and branches under OR or NOT. -
SKY-D417flags a SECURITY DEFINER function or procedure created without a fixed local search path. It also checks an ALTER that explicitly selects SECURITY DEFINER and removes the path in the same statement. Verify the effective role and schema permissions before changing a routine. -
SKY-Q506flags a concurrent index build or drop within an explicit transaction. -
SKY-Q507flags a concurrent index drop that names several indexes or uses CASCADE. -
SKY-Q508flags an explicit foreign key with unequal column counts. -
SKY-Q509flags a CASE arm shadowed by a preceding arm. -
SKY-Q510flags COUNT of a CASE returning a non-null literal for every branch and ELSE. -
SKY-D418flags schema CREATE privileges granted to PUBLIC. -
SKY-D419flags a role configured to log in and bypass row-level security. -
SKY-D420flags table or column write privileges granted to PUBLIC. The PUBLIC grant checks also cover default privileges on future objects.
These are advisory findings for review.