Skip to main content

SKY-L010 · Logic and resilience

Security TODO marker

Medium

The catalog gives no severity for this rule; the detector always reports MEDIUM.

A TODO, FIXME, HACK, XXX or TEMP comment that talks about a security control: authentication, permissions, validation, escaping, encryption, tokens, sessions, TLS and similar. It marks protection that someone meant to add and has not added yet.

Languages
Python
Quality gate
counted toward the gate limits (full and diff scans)
Finding type
review
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

The code ships without the missing check, and the comment is often the only record that it is missing. In the example below any signed-in user can delete any account until someone remembers the TODO.

What Skylos flags

accounts/views.py · PythonReported on line 7
"""Account management endpoints.""" from accounts.models import Account  def delete_account(request, account_id):    # TODO: add a permission check so users can only delete their own account    account = Account.objects.get(pk=account_id)    account.delete()    return {"deleted": account_id}

What Skylos leaves alone

accounts/views.py · Python
"""Account management endpoints.""" from accounts.models import Account  def delete_account(request, account_id):    # TODO: temporary workaround until the bulk delete API ships    account = Account.objects.get(pk=account_id, owner=request.user)    account.delete()    return {"deleted": account_id}

Why Skylos leaves it alone

Words such as "temporary", "workaround", "hack" or "disable" are not enough on their own. Skylos reports a TODO only when it also names a security subject, and "bulk delete API" is not one.

How Skylos decides

  1. Runs with --quality on Python files. Reads every comment, and the docstrings of modules, classes and functions; other strings are not read.
  2. Looks for TODO, FIXME, HACK, XXX or TEMP followed by : or a space, then a security word later on the line: for example authentication, authorization, permission, credential, sanitize, validate, escape, encrypt, injection, OAuth, rate limit, CSRF, XSS, SQLi, TLS, SSL, certificate, CORS, session, cookie, JWT, API key, ACL, RBAC, login, password, secret, token, security or unsafe.
  3. The generic words disable, bypass, hardcode, hack, workaround, temporary and fixme only count when the rest of the comment names a security subject, which also includes MFA, 2FA, OTP, passkeys, signatures, HMAC, HTTPS, mTLS and SSH.
  4. Reports MEDIUM once per line, on the line of the comment.

How to fix it

Do the work the comment describes, then delete the comment. Here the query only finds accounts that belong to the signed-in user.

accounts/views.py · Python · the fix, against the flagged file
"""Account management endpoints.""" from accounts.models import Account  def delete_account(request, account_id):Removed:     # TODO: add a permission check so users can only delete their own accountRemoved:     account = Account.objects.get(pk=account_id)Added:     account = Account.objects.get(pk=account_id, owner=request.user)    account.delete()    return {"deleted": account_id}

When it can be wrong

  • A TODO about non-security work that happens to use a listed word, such as "validate the CSV header" or "cache the session list", is reported.
  • A TODO that describes a security gap without any listed word, such as "check that the caller owns this account", is missed.

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 at the end of the comment line. Better still, move the task to your issue tracker and delete the comment.

    Python
    # TODO: validate the CSV header  # skylos: ignore[SKY-L010] not security
  • [tool.skylos] ignore = ["SKY-L010"] turns the rule off for the project.

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.