What the scanners find
Every rule, measured on 10,007 public repositories. No project names, paths or code are published — only aggregates.
Old TODO / FIXME
warning91% confirmed in a hand check of 101
How to fix
Do it, delete it, or move it to an issue tracker and link it — a years-old TODO is a decision nobody made.
// TODO: handle timeouts
const res = await fetch(url)// Timeouts: see #482
const res = await fetch(url, { signal: AbortSignal.timeout(10_000) })Old single-author file
info85% confirmed in a hand check of 33
How to fix
Have a second person review or touch this file, and add a short comment or doc explaining what it does and why.
Duplicated block
info72% confirmed in a hand check of 54
How to fix
Extract the repeated block into one function and call it from both places.
const a = items.filter(i => i.active).map(i => i.id)
// … elsewhere
const b = users.filter(u => u.active).map(u => u.id)const activeIds = <T extends { active: boolean; id: string }>(xs: T[]) =>
xs.filter(x => x.active).map(x => x.id)
const a = activeIds(items)
const b = activeIds(users)First-party action pinned to a mutable tag
info99% confirmed in a hand check of 120
How to fix
Pin the action to a full commit SHA and keep the tag as a comment; Dependabot or Renovate will keep it updated.
- uses: actions/checkout@v4- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2Export nothing imports
info85% confirmed in a hand check of 20
How to fix
Delete the export (or the whole symbol) if nothing uses it; if it is public API, document it as such.
export function formatLegacyDate(d: Date) { … }// removed: no imports anywhere in the repoThird-party action pinned to a mutable tag
warning99% confirmed in a hand check of 124
How to fix
A third-party tag can be moved to malicious code at any time. Pin to a full commit SHA.
- uses: some-org/deploy-action@v2- uses: some-org/deploy-action@3f1c2a9e0b7d4c5a6e8f9b0c1d2e3f4a5b6c7d8e # v2.1.0Commented-out code
info55% confirmed in a hand check of 206
How to fix
Delete it — git history keeps the old version.
// const total = items.reduce((s, i) => s + i.price, 0)
const total = sum(items)const total = sum(items)Broken relative link in docs
warning66% confirmed in a hand check of 47
How to fix
Point the link at the file's new path, or remove it.
See [setup](docs/setup.md).See [setup](docs/getting-started/setup.md).Workflow token permissions not restricted
warning100% confirmed in a hand check of 86
How to fix
Declare the minimum token permissions at the top of the workflow and widen per job only where needed.
on: [push]
jobs:
test:on: [push]
permissions:
contents: read
jobs:
test:Skipped or focused test
info81% confirmed in a hand check of 27
How to fix
Fix and re-enable the test, or delete it; a .only silently skips the rest of the suite.
it.skip('parses dates', () => { … })it('parses dates', () => { … })End-of-life Node.js version
warning97% confirmed in a hand check of 37
How to fix
Move to a supported LTS line in CI, engines and Dockerfiles.
- uses: actions/setup-node@…
with:
node-version: 16- uses: actions/setup-node@…
with:
node-version: 22No tests
warning55% confirmed in a hand check of 11
How to fix
Start with one test of the most important function, and run it in CI.
import { test, expect } from "vitest"
import { parse } from "../src/parse"
test("parses a basic input", () => {
expect(parse("a=1")).toEqual({ a: "1" })
})No CI
info71% confirmed in a hand check of 14
How to fix
Add a minimal workflow that installs and runs the tests on every pull request.
# .github/workflows/ci.yml
on: [push, pull_request]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@<sha>
- run: npm ci && npm testEnd-of-life Python version
warning89% confirmed in a hand check of 35
How to fix
Move to a supported Python version and update requires-python.
python-version: "3.7"python-version: "3.12"No LICENSE
info75% confirmed in a hand check of 12
SQL built by string interpolation
critical30% confirmed in a hand check of 94 · 4,727 more hidden as low confidence
How to fix
Use a parameterised query; never build SQL from strings.
db.query(`SELECT * FROM users WHERE id = ${req.params.id}`)db.query("SELECT * FROM users WHERE id = $1", [req.params.id])Two configs, one ignored
info95% confirmed in a hand check of 20
How to fix
Keep one config file and delete the one the tool ignores.
Base image uses :latest
warning60% confirmed in a hand check of 15
How to fix
Pin the base image to a version (or a digest) so builds are reproducible.
FROM node:latestFROM node:22.11-alpineNo lockfile committed
warning90% confirmed in a hand check of 20
How to fix
Commit the lockfile your package manager generates, and install with it in CI.
- run: npm install- run: npm ci # package-lock.json committedCI does not run on pull requests
info56% confirmed in a hand check of 9
Badge points at something gone
warning85% confirmed in a hand check of 13
Password hashed with MD5/SHA-1
critical81% confirmed in a hand check of 36
Admin/database port open to the internet
critical83% confirmed in a hand check of 35
How to fix
Restrict the source range to your VPN or bastion, never 0.0.0.0/0.
from_port = 22
cidr_blocks = ["0.0.0.0/0"]from_port = 22
cidr_blocks = [var.office_cidr]End-of-life CI runner image
critical100% confirmed in a hand check of 17
Unused UI kit
info60% confirmed in a hand check of 5
Shell command built from variables
critical16% confirmed in a hand check of 31 · 2,364 more hidden as low confidence
How to fix
Call the program with an argument array and no shell, so input cannot become a command.
exec(`convert ${file} out.png`)execFile("convert", [file, "out.png"])ADD downloads a remote URL
info83% confirmed in a hand check of 6
Self-hosted runner on public triggers
warning50% confirmed in a hand check of 4
Docs mention a missing script
warning63% confirmed in a hand check of 8
Request input echoed unescaped
warning67% confirmed in a hand check of 6 · 14 more hidden as low confidence
Server fetches a URL from a variable (SSRF)
critical6% confirmed in a hand check of 82 · 12,199 more hidden as low confidence
CI job disabled
warning91% confirmed in a hand check of 11
No README
warningnot hand-checked yet
Docker socket mounted into a container
warning69% confirmed in a hand check of 13
Publicly readable storage bucket
critical50% confirmed in a hand check of 22
eval() on a dynamic value
critical18% confirmed in a hand check of 11 · 679 more hidden as low confidence
Password in infrastructure code
criticalnot hand-checked yet
Rust TLS server verification disabled
critical60% confirmed in a hand check of 5
Lockfile out of sync with manifest
warningnot hand-checked yet
innerHTML set from a variable
warning0% confirmed in a hand check of 15 · 1,055 more hidden as low confidence
How to fix
Use textContent, or sanitise HTML with DOMPurify.
el.innerHTML = comment.bodyel.textContent = comment.bodySecret signed with plain MD5/SHA-1
warning80% confirmed in a hand check of 10
CI errors swallowed
warning60% confirmed in a hand check of 5
PHP unserialize() of a variable
warning20% confirmed in a hand check of 10 · 338 more hidden as low confidence
libcurl TLS server verification disabled
criticalnot hand-checked yet
File included from request input
criticalnot hand-checked yet · 10 more hidden as low confidence
dangerouslySetInnerHTML
warning11% confirmed in a hand check of 19 · 953 more hidden as low confidence
new Function() on a dynamic value
critical25% confirmed in a hand check of 12 · 257 more hidden as low confidence
Value marked as trusted HTML in a Go template
warning0% confirmed in a hand check of 8 · 218 more hidden as low confidence
Python eval()/exec()
critical0% confirmed in a hand check of 20 · 750 more hidden as low confidence
subprocess with shell=True
critical11% confirmed in a hand check of 9 · 569 more hidden as low confidence
How to fix
Pass a list of arguments and drop shell=True.
subprocess.run(f"git clone {url}", shell=True)subprocess.run(["git", "clone", url], check=True)os.system() call
critical0% confirmed in a hand check of 10 · 389 more hidden as low confidence
pickle.load() of untrusted data
warning10% confirmed in a hand check of 21 · 584 more hidden as low confidence
Java native deserialisation
warning33% confirmed in a hand check of 6 · 354 more hidden as low confidence
Marshal / unsafe YAML load
warning0% confirmed in a hand check of 5 · 108 more hidden as low confidence
Unsafe yaml.load()
critical0% confirmed in a hand check of 4 · 52 more hidden as low confidence
How to fix
Use yaml.safe_load.
data = yaml.load(f)data = yaml.safe_load(f)Unsafe .NET deserialiser
warningnot hand-checked yet · 94 more hidden as low confidence
Env var used but not in .env.example
14% confirmed in a hand check of 7 · 14,325 more hidden as low confidence
How to fix
Add the variable to .env.example with a placeholder and a comment.
# .env.example
DATABASE_URL=# .env.example
DATABASE_URL=
# Stripe secret key (sk_test_… locally)
STRIPE_SECRET_KEY=Leftover debug statement
27% confirmed in a hand check of 15 · 9,718 more hidden as low confidence
Large or binary file in git
47% confirmed in a hand check of 17 · 8,910 more hidden as low confidence
How to fix
Remove the file from the repo and keep it in Git LFS, a release asset or object storage; add it to .gitignore.
git add assets/demo.mp4git lfs track "*.mp4"
git add .gitattributes assets/demo.mp4Container runs as root
24% confirmed in a hand check of 17 · 3,984 more hidden as low confidence
How to fix
Switch to an unprivileged user before the final command.
COPY . /app
CMD ["node", "server.js"]COPY --chown=node:node . /app
USER node
CMD ["node", "server.js"]Provider credential (AWS, Stripe, GitHub…)
0% confirmed in a hand check of 14 · 3,836 more hidden as low confidence
How to fix
Revoke the key at the provider first, then read it from the environment or a secret manager. Removing it from the file alone is not enough.
const stripe = new Stripe("sk_live_51H…")const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)High-entropy secret assignment
11% confirmed in a hand check of 9 · 2,985 more hidden as low confidence
How to fix
Rotate the value and load it from the environment.
API_TOKEN = "9f8e7d6c5b4a39281706f5e4d3c2b1a0"API_TOKEN = os.environ["API_TOKEN"]Unused dependency
8% confirmed in a hand check of 13 · 2,677 more hidden as low confidence
Env var documented but never used
20% confirmed in a hand check of 10 · 1,651 more hidden as low confidence
CI never runs the tests
0% confirmed in a hand check of 10 · 1,285 more hidden as low confidence
Base image has no tag
36% confirmed in a hand check of 11 · 960 more hidden as low confidence
torch.load / shelve / dill on a file
not hand-checked yet · 747 more hidden as low confidence
Go query builder handed a formatted string
not hand-checked yet · 629 more hidden as low confidence
CI step failures silenced
36% confirmed in a hand check of 11 · 532 more hidden as low confidence
How to fix
Let the step fail. If it is truly optional, say so with continue-on-error and a comment.
- run: npm test || true- run: npm testSecret still in git history
6% confirmed in a hand check of 16 · 514 more hidden as low confidence
How to fix
The secret is in past commits: revoke it. Rewriting history (git filter-repo) only helps after revocation.
TLS verification disabled
7% confirmed in a hand check of 27 · 500 more hidden as low confidence
Secret in localStorage
17% confirmed in a hand check of 12 · 441 more hidden as low confidence
How to fix
Keep session tokens in an HttpOnly, Secure cookie set by the server, out of reach of page scripts.
localStorage.setItem("token", jwt)res.cookie("session", jwt, { httpOnly: true, secure: true, sameSite: "lax" })No .env.example
8% confirmed in a hand check of 12 · 375 more hidden as low confidence
Java XML parser open to XXE
27% confirmed in a hand check of 15 · 341 more hidden as low confidence
Weak hash (MD5/SHA-1)
0% confirmed in a hand check of 5 · 214 more hidden as low confidence
Container shares host network/PID
11% confirmed in a hand check of 44 · 156 more hidden as low confidence
Python XML parsed without entity protection
not hand-checked yet · 150 more hidden as low confidence
Privileged container
21% confirmed in a hand check of 38 · 109 more hidden as low confidence
Math.random() for a secret
13% confirmed in a hand check of 8 · 81 more hidden as low confidence
Container configured to run as root
10% confirmed in a hand check of 21 · 68 more hidden as low confidence
Docs use the wrong package manager
17% confirmed in a hand check of 6 · 66 more hidden as low confidence
pull_request_target checks out PR code
29% confirmed in a hand check of 7 · 62 more hidden as low confidence
Script injection in a workflow
22% confirmed in a hand check of 9 · 61 more hidden as low confidence
How to fix
Pass the untrusted expression through an environment variable instead of splicing it into the script.
- run: echo "${{ github.event.issue.title }}"- run: echo "$TITLE"
env:
TITLE: ${{ github.event.issue.title }}Expression engine evaluates a computed string
not hand-checked yet · 42 more hidden as low confidence
Security value from Python's random module
not hand-checked yet · 29 more hidden as low confidence
Dangerous Linux capability added
17% confirmed in a hand check of 6 · 20 more hidden as low confidence