SKY-L026 · Logic and resilience
Unfinished code or placeholder default
A function whose whole body is pass, ..., raise NotImplementedError or an empty return was never written. SKY-L026 reports such a body only when something proves it matters: a "TODO: implement" note, a return type the body cannot meet, or a security check it lets through. It also reports ... used as a parameter default.
- Languages
- Python, TypeScript, JavaScript
- Quality gate
- counted toward the gate limits (full and diff scans)
- Finding type
- review
Why it matters
A stub called from a permission check returns None, which reads as "not blocked", so every request passes. Code generators leave such stubs behind, and the program still imports and runs without an error.
What Skylos flags
"""Refund rules for the support console.""" from fastapi import HTTPException def account_is_frozen(customer_id: str) -> bool: pass def issue_refund(customer_id: str, amount_cents: int) -> dict: if account_is_frozen(customer_id): raise HTTPException(403, "Account is frozen") return {"customer": customer_id, "refunded": amount_cents}What Skylos leaves alone
"""Extension points for refund processing.""" class RefundNotifier: def notify(self, customer_id: str, amount_cents: int) -> None: """Hook for subclasses; the default sends nothing.""" pass class PaymentProvider: def refund(self, charge_id: str, amount_cents: int) -> str: raise NotImplementedErrorWhy Skylos leaves it alone
An empty hook that is declared to return None, and a bare raise NotImplementedError in a base class, are normal Python. Neither has a "TODO: implement" note, a return type the body breaks, or a security check that depends on it, so Skylos leaves them alone.
More languages
TypeScript
Flagged
import { createHmac } from "node:crypto"; export function verifyWebhookSignature(payload: string, signature: string): boolean { throw new Error("Not implemented");}Not flagged
export function parseCurrency(code: string): string { throw new Error(`Unsupported currency: ${code}`);}Why Skylos leaves it alone
The function only throws, but its message describes a real error, not missing code. In TypeScript and JavaScript, Skylos reports a throw-only function only when the message says "not implemented", "unimplemented", "implement me" or starts with "TODO".
How Skylos decides
- Runs with
--quality. In Python, skips.pyistubs, files whose name starts withtest_orconftest, functions underif TYPE_CHECKING:, and Protocol methods and functions decorated withabc.abstractmethodortyping.overload(resolved through the imports) unless a security check depends on them. - Looks at functions whose body, after an optional docstring, is a single
pass,...,raise NotImplementedError,return,return None,return ""or an empty[],{},(),set(),list(),dict()ortuple(), or only a docstring. - Reports such a body only with evidence. A security check: the function is a FastAPI
Security(...)dependency, or its result decides anifthat raisesPermissionErroror anHTTPExceptionwith 401 or 403, and the placeholder value skips that branch. A return type: the annotation is a builtin such asbool,int,strorlistthat the placeholder does not match, orNoReturn/Never. An unfinished note: aTODO: implementorFIXME: finish the …comment inside the function, or "not implemented yet" in its docstring or error message. - Separately reports a parameter whose default is
..., unless the annotation accepts Ellipsis or the function checks for it. - In TypeScript and JavaScript, skips test, story, mock and fixture files, and reports a function whose only statement throws an error whose fixed message says "not implemented", "unimplemented", "implement me" or is a TODO note.
- Every finding is MEDIUM. Python findings point at the placeholder statement or the
...default; TypeScript findings at the function.
How to fix it
Write the check, or delete the stub and its caller. A stub that must stay should fail closed, for example raise NotImplementedError, so callers cannot treat it as "allowed".
"""Refund rules for the support console.""" from fastapi import HTTPException Added: from app.risk import risk_client Added: def account_is_frozen(customer_id: str) -> bool:Removed: passAdded: return risk_client.is_frozen(customer_id) def issue_refund(customer_id: str, amount_cents: int) -> dict: if account_is_frozen(customer_id): raise HTTPException(403, "Account is frozen") return {"customer": customer_id, "refunded": amount_cents}When it can be wrong
- A deliberate no-op annotated with a builtin type, such as
def is_enabled(self) -> bool: passin a base class, is reported for its return type. - When a decorator or another dependency supplies the real behaviour, the finding carries
verification_status: unverified; Skylos cannot see that behaviour. - An empty stub with no TODO, no return type and no security caller is not reported, even if nothing implements it.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
Put the marker on the reported line: the placeholder statement, or the line of the
...default.Python pass # skylos: ignore[SKY-L026] filled in by the plugin at import time[tool.skylos] ignore = ["SKY-L026"]turns the rule off for the project.