Cybersecurity
OWASP Top 10:2025 with a Local Scanner: What Tools Find and What Is Left for Review
The OWASP Top 10:2025 is the eighth edition of OWASP's list of the most critical web application security risks, released at the end of 2025. It works as a map: each category groups concrete weaknesses, numbered in MITRE's CWE catalog, and explains how to prevent them. What the list does not say is which of those weaknesses a tool can find and which ones only show up when someone reads the code.
A small example makes the point. An invoice API has two routes: a search that pastes the user's text into the SQL, and a lookup by id that uses parameters but never checks that the invoice belongs to the customer asking for it. The local scanner in this post flags the first one under A05 (Injection), with file and line. No tool flags the second, and yet it shows any customer's invoices to anyone who changes a number in the URL: broken access control, A01. The report covers it with a question, not a finding.
The post walks through the 2025 list and what changed since 2021, which part of each category a tool can check, the full example and its fix, and owasp-top10-local-scanner, the open source tool from NippysoftLabs: how it runs with Python or with Docker, how an AI agent uses it, and where its limits are.
What changed in the Top 10:2025
The 2025 edition draws on data from over 2.8 million applications. According to its introduction, OWASP ranked 12 categories from that data and let the community survey promote or highlight two, because the data looks at the past and some risks barely show up in it. The introduction sums up the change as two new categories and one consolidation.
| 2025 category | Change since 2021 |
|---|---|
| A01 Broken Access Control | Still first. It absorbs server-side request forgery (SSRF), which was A10 in 2021. |
| A02 Security Misconfiguration | Up from 5th to 2nd. |
| A03 Software Supply Chain Failures | New. It widens «Vulnerable and Outdated Components» to dependencies, build systems and distribution. |
| A04 Cryptographic Failures | Down from 2nd to 4th. |
| A05 Injection | Down from 3rd to 5th. It covers SQL, commands and XSS. |
| A06 Insecure Design | Down from 4th to 6th. |
| A07 Authentication Failures | Renamed from «Identification and Authentication Failures». |
| A08 Software or Data Integrity Failures | Stays 8th. |
| A09 Security Logging & Alerting Failures | «Monitoring» becomes «Alerting». The introduction explains why: great logging with no alerting is of minimal value for spotting incidents. |
| A10 Mishandling of Exceptional Conditions | New: poor error handling, logic errors and systems that fail open when something abnormal happens. |
Each category has its own page with the CWEs mapped to it, under «List of Mapped CWEs». That list is what turns a tool's finding, which nearly always carries a CWE, into a Top 10 category. The tool in this post uses those lists.
What a tool can see and what it cannot
An analysis tool sees patterns: SQL built from text, a key written into the code, a dependency with a published vulnerability, a Dockerfile that runs as root. It does not see intent. It cannot know that invoice 42 belongs to another customer, that a payment flow lets a step be skipped, or that nobody gets an alert when a hundred logins fail in a row. Those flaws live in the logic and in the processes, and a review is what finds them.
That is why the scanner splits every category in two: findings, with file and line, and questions for whoever reviews the code. The report carries 30 fixed questions, 2 to 4 per category, each with a hint about where to look. The table lists what the tools check and one question per category:
| Category | Checked by a tool | Left as a question (example) |
|---|---|---|
| A01 Access control | Code rules: path traversal, open redirect, SSRF, endpoints that change data with anonymous access. ZAP: missing anti-CSRF token. | Does every query that loads a record filter by the user or tenant that owns it? |
| A02 Misconfiguration | Trivy: Dockerfile, Kubernetes, Helm, Terraform and CloudFormation. Code rules: debug mode, an always-on exception page, XXE, CORS open to any origin, cookies without Secure or HttpOnly. ZAP: the same cookies, in the site's responses. | Does production turn off the developer exception page, debug mode and Swagger? |
| A03 Supply chain | OSV-Scanner: dependencies with known vulnerabilities, read from lockfiles and manifests. | Who can publish packages, change the CI pipeline or read its secrets? |
| A04 Cryptography | Code rules: MD5 and SHA-1, DES and ECB mode in C#, predictable random numbers for tokens. Gitleaks: keys in the code. | Where do keys live, who can read them and how are they rotated? |
| A05 Injection | Code rules: SQL built from text, commands through a shell, XSS, eval. | Are there dynamic queries the rules cannot see, such as SQL assembled in another layer? |
| A06 Insecure design | No code rule. Only a ZAP alert can land here, through its CWE. | What happens if a business flow is repeated, reordered or run in parallel? |
| A07 Authentication | Gitleaks: passwords and tokens in files and in git history. Code rules: certificate validation turned off. | Do sessions expire, rotate after login and get revoked on logout? |
| A08 Integrity | Code rules: unsafe deserialization (pickle, BinaryFormatter). Trivy: images without a pinned version. | Are updates and CI artifacts signed and verified? |
| A09 Logging and alerting | Code rules, C# only: log messages built from text and sensitive values in logs. | Does someone get an alert when those events spike? |
| A10 Exceptional conditions | Code rules: empty catch or except blocks, the stack trace sent to the client. | Does the system fail closed when a check throws? |
The report marks A06 as manual and the other nine as partial: the tools see part of the category and the questions cover the rest. No category is covered by tools alone.
The example: a search and an invoice
The invoice API, in Python with Flask:
import sqlite3
from flask import Flask, request
app = Flask(__name__)
@app.route("/invoices/search")
def search_invoices():
db = sqlite3.connect("billing.db")
term = request.args.get("q", "")
# The search text is pasted into the SQL.
rows = db.execute(f"SELECT id, total FROM invoices WHERE customer LIKE '%{term}%'").fetchall()
return {"invoices": rows}
@app.route("/invoices/<int:invoice_id>")
def get_invoice(invoice_id):
db = sqlite3.connect("billing.db")
# A parameter, but no check that the invoice belongs to the signed-in customer.
row = db.execute("SELECT id, total FROM invoices WHERE id = ?", (invoice_id,)).fetchone()
return {"invoice": row}
Both routes are broken, in different ways. In the search, text with a quote closes the string and changes the query, which is no longer the one the programmer wrote. It is the same kind of flaw as the one in the JetBooking plugin for WordPress, CVE-2026-3496. On top of that, the search does not filter by owner: searching for another customer's name already returns their invoices, no quote needed. In the lookup by id, anyone, signed in or not, reads any invoice by changing the number: an IDOR (insecure direct object reference, CWE-639), the textbook A01 case.
The scanner reports a single finding. Here it is, as it appears in owasp-report.json:
{
"id": "A05-0001",
"tool": "opengrep",
"ruleId": "nippy.python.sql-built-from-strings",
"cwe": ["CWE-89"],
"severity": "high",
"file": "app.py",
"line": 12,
"message": "SQL text built with +, an f-string, % or format, in the call or in a variable passed to it. A value with a quote changes the query (SQL injection). Pass the values as parameters: cursor.execute(\"... WHERE id = ?\", (value,))."
}
The second route gets no finding, which is right from the tool's point of view: the query uses parameters and there is no pattern to give it away. What is missing is a condition in the WHERE, and knowing it is missing means knowing who owns each invoice. The first A01 question in the same report covers that route: «Does every query that loads a record filter by the user or tenant that owns it, so changing an id in the URL cannot show someone else's data (IDOR)?», with a hint to look at actions that take an id and load a record with it.
The fix passes the search text as a parameter and adds the owner to both queries:
import sqlite3
from flask import Flask, abort, request, session
app = Flask(__name__)
def current_customer():
# 401 when nobody is signed in, instead of a KeyError and a 500.
customer_id = session.get("customer_id")
if customer_id is None:
abort(401)
return customer_id
@app.route("/invoices/search")
def search_invoices():
db = sqlite3.connect("billing.db")
term = request.args.get("q", "")
# The search text travels as a parameter; only the customer's own invoices are searched.
rows = db.execute(
"SELECT id, total FROM invoices WHERE customer_id = ? AND customer LIKE '%' || ? || '%'",
(current_customer(), term),
).fetchall()
return {"invoices": rows}
@app.route("/invoices/<int:invoice_id>")
def get_invoice(invoice_id):
db = sqlite3.connect("billing.db")
# The invoice must belong to the signed-in customer; any other id gets the same 404.
row = db.execute(
"SELECT id, total FROM invoices WHERE id = ? AND customer_id = ?",
(invoice_id, current_customer()),
).fetchone()
if row is None:
abort(404)
return {"invoice": row}
The fixed version behaves like this: the customer's own invoice returns 200; another customer's invoice and one that does not exist return the same 404, so the response does not reveal which ids exist; without a session, both routes return 401; a search with a quote returns nothing, and so does a search for another customer's name. The scanner reports no finding for this file.
What this fix does not cover: % and _ in the search text still work as LIKE wildcards, though only over the customer's own invoices; rate limiting on the search (question A06-Q2); and how customer_id gets into the session, which belongs to A07.
The rules match the shape of the code; they do not follow the data. Across variants of the search, the Python rule flags SQL built with an f-string, with %, with .format() or by adding parts, whether inside the call or in a variable in the same function, on the connection or on a cursor. It does not flag it when another function builds the SQL and execute() receives the result. Question A05-Q1 is there for those cases.
The tool: owasp-top10-local-scanner
The scanner checks a project on the machine that runs it and writes two reports grouped from A01 to A10: owasp-report.md, to read, and owasp-report.json, for scripts and agents. The code under review never leaves the machine; the only downloads at run time are the public vulnerability databases. It runs five open source tools, all under OSI licenses and all pinned:
| Tool | Version | License | What it checks |
|---|---|---|---|
| OSV-Scanner | 2.7.1 | Apache-2.0 | Dependencies with known vulnerabilities, against the OSV.dev databases (A03) |
| Trivy, configuration scanner only | 0.76.2 | Apache-2.0; trivy-checks rules, MIT | Dockerfile, Kubernetes, Helm, Terraform and CloudFormation (A02, A08) |
| Gitleaks | 8.30.1 | MIT | Secrets in files and in git history (A07, A04) |
| Opengrep, with its own rules | 2.0.0 | LGPL-2.1; rules MIT | Code patterns in C#, Razor, JavaScript, TypeScript and Python |
| ZAP, passive baseline scan | 2.17.0 | Apache-2.0 | Headers, cookies and leaks in the responses of a running site, only with --url |
The code rules are the tricky part. The rules in the Semgrep registry use the Semgrep Rules License v1.0, which allows them only «for your own internal business purposes» and forbids redistributing them, and the archived opengrep-rules repository adds the Commons Clause to the LGPL-2.1. Neither is an OSI license. So Opengrep, the engine, runs only the rules in the scanner's own repository, written for it and released under MIT, each with its CWE. Trivy runs only its configuration scanner; dependencies go through OSV-Scanner, which downloads the OSV.dev databases for the ecosystems it finds and compares versions locally. That data comes under each source's own terms, for example CC BY 4.0 for GitHub's advisories.
Each finding goes to the category of the first of its CWEs that appears in the Top 10. Findings without a CWE fall back on their tool's area: dependencies go to A03 and infrastructure configuration to A02. Anything left over goes to uncategorized. The report never stores the secrets Gitleaks finds: it runs with --redact and keeps only the rule, file, line and commit.
The repository ships an example project, examples/vulnerable-app, with sample flaws for 40 of its 50 rules, in C#, JavaScript and Python, plus a Dockerfile and a Kubernetes manifest. Without --url, the scanner reports 96 findings and 30 questions: 50 from Opengrep, 24 from Trivy, 21 from OSV-Scanner and 1 from Gitleaks. The repository also ships examples/safe-code, with code that looks close to a vulnerability but is safe, such as a parameterized query split into several literals; the rules must not flag anything there, and it yields 0 findings.
Running it without Docker
All it needs is Python 3.10 or later, on Windows, Linux or macOS. From the repository root:
git clone https://github.com/NippysoftLabs/owasp-top10-local-scanner.git
cd owasp-top10-local-scanner
python scan.py path/to/project
The first run downloads the tools for that platform into .tools/, inside the repository, and checks each file against its SHA-256 in tools.lock.json; a file that does not match is rejected. Nothing is installed on the system, and deleting .tools/ and .cache/ removes everything. The reports go to owasp-report/ in the folder the command runs from, and --out sends them elsewhere.
The options used most:
--url URL: adds the ZAP scan against a running site. ZAP and its Java runtime, about 300 MB, are downloaded only the first time it is used.--offline: downloads no data and uses the databases already in the cache.--skip TOOL: does not runosv-scanner,trivy,gitleaks,opengreporzap; any other name is an error.--fail-on LEVEL: exits with code 1 if a finding is at that level or worse. It is the switch for stopping a CI pipeline.
The exit code says what happened:
- 0: complete reports; every tool that had to run, ran.
- 1: complete reports, and
--fail-onwas reached. - 2: nothing was scanned, because of a wrong argument, a folder that does not exist, or a tool that could not be downloaded or failed its SHA-256 check. With a missing folder, no report is written.
- 3: the reports were written but are incomplete, because at least one tool failed.
Code 3 is the one that matters in CI. With --offline and an empty cache, OSV-Scanner fails because it has no local database, and A03 ends up with no dependency findings. The other tools carry on, the Markdown opens with an «INCOMPLETE REPORT» warning, summary.complete is false and the exit code is 3, with or without --fail-on. An incomplete report never exits with 0, so a pipeline cannot mistake it for a clean one. A tool left out on purpose, with --skip or ZAP without --url, does not count as a failure.
Running it with Docker
The same tools.lock.json feeds the Dockerfile, so both modes run the same versions. The image builds for linux/amd64 or linux/arm64. The full image includes Java and ZAP; the core variant is for code-only scans:
docker build -t owasp-top10-local-scanner:0.1.0 .
docker build --target core -t owasp-top10-local-scanner:0.1.0-core .
It runs from the folder of the project under review. On Linux and macOS:
docker run --rm \
-v "$PWD:/src:ro" \
-v "$PWD/owasp-report:/out" \
-v owasp-scan-cache:/cache \
owasp-top10-local-scanner:0.1.0
On Windows, with PowerShell:
docker run --rm `
-v "${PWD}:/src:ro" `
-v "${PWD}/owasp-report:/out" `
-v owasp-scan-cache:/cache `
owasp-top10-local-scanner:0.1.0
The project is mounted read-only (:ro), so the scan cannot change it, and the owasp-scan-cache volume keeps the databases between runs. On Linux, --user "$(id -u):$(id -g)" leaves the reports owned by whoever runs the command. Adding owasp-report/ to the reviewed project's .gitignore is a good idea.
After a run with network access has filled the cache, Docker can cut the network off entirely:
docker run --rm --network none -v "$PWD:/src:ro" -v "$PWD/owasp-report:/out" -v owasp-scan-cache:/cache \
owasp-top10-local-scanner:0.1.0 --offline
The report says when the databases were last downloaded, in the dataUpdatedAt field of osv-scanner.
A running site: ZAP in passive mode
With --url, ZAP crawls the site for up to 2 minutes, waits up to 5 more for the passive scan and reports what it sees in the responses: missing security headers, cookies without Secure or HttpOnly, server versions on display. It sends no attacks; ZAP's active scan does, and the tool leaves it out. Even so, --url is only for sites the person running it owns or has permission to test. From Docker, localhost is the container itself, and the host machine is reached through host.docker.internal:
python scan.py path/to/project --url http://localhost:5000
docker run --rm -v "$PWD:/src:ro" -v "$PWD/owasp-report:/out" -v owasp-scan-cache:/cache \
--add-host=host.docker.internal:host-gateway \
owasp-top10-local-scanner:0.1.0 --url http://host.docker.internal:5000
On the example project, with --url pointing at a static test page, ZAP adds 6 alerts and the total goes to 102. One goes to uncategorized and three land in A06 through their CWE, among them the missing Content-Security-Policy: the only way that category receives findings.
With an AI agent
The repository includes an AGENTS.md with instructions for a coding agent that runs the scanner and reviews the result. Asking the agent to read that file and follow it on a project is enough. The instructions set the order:
- Read the JSON, not the Markdown, starting with three fields:
summary.complete(if it isfalse, say so first, with the tools insummary.toolsFailedand why; their categories cannot be called clean), tools withstatus: "skipped"(without--url, the site was not checked) anddataUpdatedAt(mention it if the data is more than a week old). - Review every finding by opening the file at its line and classifying it as
confirmed,false positiveorneeds context, with the reason. - Answer every question in every category with
yes,noorpartly, citing files and lines. When the code cannot answer it, as with alerting or CI permissions, say so and say who could. A category with no findings does not count as answered. - Write the answer from A01 to A10, confirmed findings first, ending with the three most urgent fixes and citing the report's ids (
A05-0001,A01-Q1).
The agent's rules limit the risks of giving it access: with Docker, the project stays mounted :ro; no secret goes into the answer, only the file and line, with a recommendation to rotate it; no URL gets scanned unless the person gave it; and «no findings» is never read as «safe». In the invoice example, it is the agent, or the person, who answers A01-Q1 with a «no» and the line of get_invoice.
Limits
- Languages. The code rules cover C#, Razor, JavaScript, TypeScript and Python. A Go or Java project gets the dependency, secret and infrastructure checks, but no code rules: concatenated SQL in Go yields 0 findings.
- Dependencies without a lockfile. The transitive dependencies of a manifest without a lockfile, such as a
requirements.txtthat does not pin its packages' dependencies, are not resolved, because that would send package names to the registries.
Frequently asked questions
Does it replace a code review or a penetration test?
No. It finds known patterns and writes down the questions it cannot answer. In the example, half of the API's flaws, the IDOR, only surfaces when a question gets answered.
Does any code go out to the internet?
No. The downloads are the tools, from GitHub and only on the first run, and the OSV.dev vulnerability databases, on every run with network access. Version matching happens locally, without sending package names. Trivy runs without telemetry or a version check, Gitleaks works offline and ZAP only talks to the --url site. With --offline and a full cache, nothing is downloaded.
Conclusion
The Top 10:2025 reads best as two lists: what automated analysis finds and what only a review finds. owasp-top10-local-scanner puts both in the same report: findings with file and line, and 30 questions that a person or an agent answers by reading the code. Its value is in the second half. A report with no findings says there are no known patterns; the questions in A01, A06 and A09 stay open until someone answers them.
References
- OWASP — OWASP Top 10:2025: top10.owasp.org/2025
- OWASP — Top 10:2025 introduction: top10.owasp.org/2025/0x00_2025-Introduction
- OWASP — Top Ten project page: owasp.org/www-project-top-ten
- OWASP — A01:2025 Broken Access Control: top10.owasp.org/2025/A01_2025-Broken_Access_Control
- OWASP — A05:2025 Injection: top10.owasp.org/2025/A05_2025-Injection
- OWASP — A06:2025 Insecure Design: top10.owasp.org/2025/A06_2025-Insecure_Design
- MITRE — CWE-639, Authorization Bypass Through User-Controlled Key: cwe.mitre.org/data/definitions/639.html
- MITRE — CWE-89, SQL Injection: cwe.mitre.org/data/definitions/89.html
- NippysoftLabs — owasp-top10-local-scanner: github.com/NippysoftLabs/owasp-top10-local-scanner
- Google — OSV-Scanner: github.com/google/osv-scanner
- OSV — Data sources and their licenses: google.github.io/osv.dev/data
- Aqua Security — Trivy: github.com/aquasecurity/trivy
- Gitleaks: github.com/gitleaks/gitleaks
- Opengrep: github.com/opengrep/opengrep
- Semgrep — Semgrep Rules License v1.0: semgrep.dev/legal/rules-license
- ZAP — Baseline Scan: zaproxy.org/docs/docker/baseline-scan
Tags
Share this post
Subscribe
Get the latest posts delivered right to your inbox.
Leave a comment