SKY-L010 · Logic and resilience
Security TODO marker
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
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
"""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
"""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
- Runs with
--qualityon Python files. Reads every comment, and the docstrings of modules, classes and functions; other strings are not read. - Looks for
TODO,FIXME,HACK,XXXorTEMPfollowed 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. - 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.
- 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.
"""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.