How to security-review your code and apps: what each method catches
Threat modelling, human and AI code review, static analysis, fuzzing, dependency and secret scanning, config checks and pen tests, with what the studies say each one finds and misses. Ends with the combination that fits a solo project, a small team and a larger organisation.
Finding security bugs got cheap this year. Linux 7.4-rc1 landed with almost 20,000 commits against the usual 15,000, and Linus Torvalds called it “full of fixes for issues found by AI” (our coverage). Anthropic, OpenAI, GitHub and Vercel all sell or give away AI security reviewers now. It’s tempting to conclude that a security review means pointing one of them at your repo. It doesn’t. Every method has a blind spot, the AI reviewers included.
This guide covers the ways practitioners and researchers actually review software for security, and what the published evidence says each one finds and misses. Those ways are threat modelling, criteria and standards, human code review, AI review, static analysis, dynamic testing and fuzzing, dependency and secret scanning, configuration review and pen tests. It finishes with which combination fits a solo project, a small team and a larger organisation, and how often to run each. It’s written for defenders: no exploit code, no attack steps.
The short answer
- No single method catches everything.
- In a study of 30 developers reviewing an app with seven known vulnerabilities, none found all seven.
- Seven Java static analysers together missed 70.9% of 165 real CVEs.
- In a May 2026 test, frontier models testing five production-style web apps from the outside found 4 to 8% of the known bugs.
- The methods miss different things, so layering them works.
- Start from how breaches happen. In Verizon’s 2026 Data Breach Investigations Report, exploited vulnerabilities were the top way in, at 31%. Third parties were involved in 48% of breaches. Credential abuse showed up at some stage in 39%. That puts dependencies, secrets, configuration and patching on the list next to your own code.
- Safe defaults beat finding bugs one at a time. Google says safe-by-default frameworks have nearly eliminated XSS and SQL injection in its code. Android’s memory-safety share of vulnerabilities fell from 76% in 2019 to below 20% in 2025 as new code moved to Rust.
- AI reviewers either flag too much or miss too much, unless each finding is checked.
- Plain models over-flag. On AWS’s September 2026 Deception Benchmark, Claude Opus 5, Sonnet 5 and ten other models caught up to 95% of real vulnerabilities but flagged 41 to 99% of safe code. Asking for a proof of exploit cut false alarms but missed 7 to 44% of real bugs.
- Anthropic’s pipeline, which checks each finding before reporting it, does better on precision. Of 1,752 findings its Mythos Preview model rated high or critical, 90.6% were real once assessed, mostly by outside firms. That’s a vendor figure, and it says nothing about what was missed.
- We found no independent test of GPT-6-generation models yet.
- A minimum for everyone: a one-page threat model, the reviewer explicitly asked to look at security (that alone made reviewers eight times more likely to spot a planted bug), automated dependency and secret scanning, and an AI or static scan on every change. Add independent testing as the stakes rise.
What does each kind of security review find?
The main approaches, what they’re good and bad at, and the strongest evidence we found for each. “Vendor” means the figure comes from a company selling the method.
| Approach | Best at finding | Weak at | Strongest evidence | When |
|---|---|---|---|---|
| Threat modelling | Design flaws, missing controls, trust boundaries | Implementation bugs | Field study: 20 of 25 trainees kept using it, and their mitigations blocked 541 intrusion attempts | At design, on big changes |
| Criteria and standards (ASVS, Top 10) | Coverage gaps, forgotten controls | Anything not on the list | A tailored checklist added nothing significant over asking reviewers to focus on security | Setting requirements; audits |
| Human code review | Logic and access-control bugs, intent | Consistency; big diffs | None of 30 reviewers found all 7 bugs | Every change, scaled to risk |
| AI security review | Many bug classes at scale, with fixes | Repo-wide data flow; false positives | AWS: plain models flag 41–99% of safe code; 4–8% of known bugs found testing apps from outside | Every change, plus periodic full scans |
| Static analysis (SAST) | Known patterns, taint flows | Real-world recall; noise | 52% of bug-introducing commits flagged, 76% of warnings irrelevant | Every change, in CI |
| Dynamic testing and fuzzing | Crashes, memory bugs, runtime behaviour | Logic and authorisation | OSS-Fuzz: 13,000+ vulnerabilities fixed | Continuously, for parsers and native code |
| Dependency and supply-chain review | Known-vulnerable and malicious packages | Unknown bugs; alert noise | Vendor: under 9.5% of flagged vulnerabilities reachable | Every change, and daily |
| Secret scanning | Leaked keys and tokens | Secrets outside the repo | Vendor: 28.65M secrets pushed to public GitHub in 2025 | Before every push |
| Configuration and infrastructure review | Exposed data, weak defaults, IaC smells | Application logic | 21,201 security smells in 15,232 IaC scripts | Every infra change; quarterly |
| Pen tests and bug bounties | What your process missed, chained issues | Coverage; it’s a point in time | NCSC: assurance, “not as a primary method” of finding bugs | Yearly and after big changes, as stakes rise |
How we chose the approaches
We started from the main secure-development frameworks, which agree on the families of practice:
- NIST’s Secure Software Development Framework (SP 800-218 v1.1): risk modelling in PW.1, code review or analysis in PW.7, executable testing in PW.8, vulnerability response in RV.
- Microsoft’s ten SDL practices.
- OWASP’s maturity model SAMM: Design, Implementation and Verification functions.
We weighted by Verizon’s 2026 breach data, which says where attacks get in. Then we kept the methods with published evidence on what they find.
We left some things out, or only mention them:
- Formal verification proves properties rather than reviewing for bugs; see our formal verification guide.
- Runtime protection (WAFs, RASP) and monitoring defend production rather than review code.
- Red-team exercises test a whole organisation, not an app.
- Compliance audits (SOC 2, ISO 27001) check that a process exists; our code review guide covers what they ask for.
- Prompt injection in AI features has its own guide: prompt injection defences.
Where should a security review start?
A security review should start with what attackers actually use against software like yours, not with the code. Verizon’s 2026 DBIR covers more than 22,000 confirmed breaches. It found that “exploitation of vulnerabilities is now the most common initial access vector for breaches”, at 31%, up from 20%.
Credential abuse fell to 13% as an initial access vector. Verizon says that’s partly because it started tracking pretexting separately, and that credential abuse at any stage of a breach “still sits on top at 39%”. Third parties were involved in 48% of breaches, up 60% on the previous year.
Patching lags: only 26% of the vulnerabilities in CISA’s Known Exploited Vulnerabilities catalogue had been fully fixed, with a median of 43 days. The catalogue held 1,786 entries on 18 November.
Our reading for developers: a review that reads only your own source code covers one of the three big doors. The others are code you depend on and the keys and settings that run it. Those two also have the cheapest automated checks, covered below, so they belong in every review rather than being left until last.
Threat modelling: what are we building and what can go wrong?
Threat modelling is a structured conversation about how the system could be attacked, held before or alongside the code. The Threat Modeling Manifesto boils it down to four questions:
- What are we working on?
- What can go wrong?
- What are we going to do about it?
- Did we do a good enough job?
Its answer to who should do it is “You. Everyone.”
Microsoft’s STRIDE is the best-known prompt for the second question. It walks each component and data flow through six threats: spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege. Two free tools help draw the model and list threats: OWASP Threat Dragon and Microsoft’s Threat Modeling Tool. Microsoft says it built the tool “with non-security experts in mind”. A text file in the repo works too.
The evidence is thinner than the advice:
- Controlled studies have mostly used students. A 2022 replication with 45 participants found no significant difference between two STRIDE variants, and notes that threat analysis “requires a high manual effort”.
- The best field evidence is a USENIX Security 2018 study at New York City’s Cyber Command. Thirty days after training, 20 of 25 participants were still threat modelling unprompted. After 120 days, their mitigations had blocked 541 unique intrusion attempts and stopped five privileged accounts being hijacked.
- That’s one organisation, but it’s the only enterprise trial we found, and its result was positive.
Threat modelling is the method built for design flaws: a missing authorisation layer, an admin API on the public internet, a webhook that trusts its caller. Pen testers and AI scanners sometimes stumble on these later, but a code reviewer looking at a diff can’t see what isn’t there.
On timing, OWASP’s cheat sheet says it is “ideally performed early in the SDLC” and “not something that is performed once”. Microsoft’s SDL updates the model with every change and reviews it before release.
A threat model is also the main way to steer the AI reviewers below. Anthropic’s free OSS Scanner takes an optional threat model file to set scope and severity. Anthropic’s Claude Security plugin builds one itself before it hunts for bugs.
Which standard should you review against?
Use OWASP’s ASVS as the requirements list for web apps and APIs, and treat the OWASP Top 10 as an awareness list. OWASP says so itself. The Top 10:2025 is “primarily an awareness document”, and as a coding or testing standard “it is the bare minimum”. It points to ASVS instead.
The 2025 Top 10 runs:
- Broken Access Control
- Security Misconfiguration
- Software Supply Chain Failures
- Cryptographic Failures
- Injection
- Insecure Design
- Authentication Failures
- Software or Data Integrity Failures
- Security Logging and Alerting Failures
- Mishandling of Exceptional Conditions
ASVS 5.0.0 (May 2025) has 345 requirements in three levels:
| ASVS 5.0 level | Requirements | What OWASP says it’s for |
|---|---|---|
| Level 1 | 70 | “the minimum requirements… a critical starting point” |
| Level 2 | 183 | “Most applications should be striving to achieve this level” |
| Level 3 | 92 | Applications that need “the highest levels of security” |
The Requirements column counts the requirements each level adds; a level includes all the ones below it, so Level 2 means 253 in total. OWASP’s own example: an early-stage startup holding little sensitive data might start at Level 1, while a bank “may have difficulty justifying anything less than Level 3”.
Other lists cover other kinds of software:
- MASVS for mobile apps.
- The OWASP Top 10 for LLM Applications 2025 for AI features, from prompt injection to excessive agency.
- MITRE’s 2025 CWE Top 25, drawn from 39,080 CVE records, for which weakness types are common. It’s led by cross-site scripting, SQL injection, CSRF and missing authorisation.
Criteria help with coverage, not with spotting bugs in a diff. In a 150-person experiment, simply asking reviewers to focus on security made them eight times more likely to find a planted vulnerability. A security checklist “does not significantly improve the outcome further, even when the checklist is tailored”. So use standards to decide what the app must do, and to audit it periodically. In everyday review, tell the reviewer, human or AI, that security is the job.
How good are people at security code review?
People find real security bugs in review, but any single reviewer misses most of them. In Edmundson et al., 30 paid developers reviewed a small PHP web app with seven known vulnerabilities:
- No one found all seven, and none found more than five.
- Twenty percent found none.
- More experience didn’t predict better results.
- The authors estimated it would take about ten independent reviewers for an 80% chance of finding all seven.
That study is from 2013, but later work points the same way:
- In a 146-person experiment on missing input validation, 60 participants couldn’t find the bug even after being told it was there.
- At Chromium OS, reviews that caught security defects took longer, while reviews spanning more directories were likelier to miss them.
- In OpenSSL and PHP, 30 to 36% of security concerns raised in review were only acknowledged, not fixed.
What this means in practice:
- Keep security-relevant changes small.
- Say in the review request that security is in scope.
- Give the reviewer time.
- Route changes to authentication, authorisation, cryptography, payments and data export to someone who knows that code.
PCI DSS 6.2.3.1 requires that, where bespoke and custom software in scope is reviewed manually, the reviewer is someone other than the author. Our code review guide covers what other frameworks and auditors expect.
Can an AI agent do your security review?
An AI agent can do a useful first pass on every change, and the best-validated pipelines now report high precision. Evidence that they find most bugs doesn’t exist. Here’s what’s published, newest and most independent first.
What the vendors report
Anthropic reports on its own models:
- Claude Opus 4.6 found and validated more than 500 high-severity vulnerabilities in open source. Anthropic chose memory corruption “because they can be validated with relative ease”.
- With Mozilla, Opus 4.6 found 22 Firefox vulnerabilities in two weeks, 14 of them high severity.
- Mythos Preview, Anthropic’s gated model, also found authentication bypasses. Anthropic warns that for logic bugs “we too lose the ability to (near-)perfectly validate” the findings.
- Its May 2026 update covers 1,752 findings the model rated high or critical. These were assessed by six independent security firms, or in a small number of cases by Anthropic itself. 90.6% were real, and 62.4% were confirmed as high or critical.
- The same update says the bottleneck in fixing them is “the human capacity to triage” and patch. Only 75 of 530 reported bugs had been patched by then, though Anthropic notes many were still inside the 90-day disclosure window and it is probably undercounting patches.
Google’s CodeMender upstreamed 72 fixes, each reviewed by a person. Google hasn’t published detection rates for it or for Big Sleep.
What independent tests found
Only one test we found covers Claude 5-generation models (Opus 5 and Sonnet 5, the predecessors of today’s 5.5 releases), and none covers the GPT-6 generation. It also comes from a company with something to sell, though not the model makers:
- AWS’s Deception Benchmark (9 September 2026) asks models to tell real vulnerabilities from code that only looks risky. It has 14,822 samples across 16 languages. AWS hosts Claude and included its own Nova 2 Lite model.
- With direct prompting, the 12 models “catch up to 95 percent of real vulnerabilities but also flag 41–99 percent of safe code”. Precision runs from 52% to 71%.
- Asking for a proof of exploit “cuts false positives by 17–74 points but misses 7–44 percent of real vulnerabilities”.
- Claude Opus 5 scored the best accuracy, 79.3% with proof-of-exploit prompting, and had the lowest false-alarm rate with direct prompting. It flagged 41.5% of safe samples and missed 5.2% of real ones directly; asked for proof, it flagged 24.9% and missed 16.8%. GPT-5.4 asked for proof flagged only 10.1%, but missed 33.6%.
- No configuration kept both false positives and misses under 10%. AWS says it tested single-turn prompts, not purpose-built systems with multi-step validation.
The other independent studies are on models from earlier in 2026:
- A May 2026 study tested GPT-5.4, Codex 5.3, Claude Opus 4.7, Sonnet 4.6 and Gemini 3.1 Pro. Reviewing single functions, every model wrongly flagged 10 to 50% of safe code, “systematically over-predicting vulnerabilities”. Recall was high there: Sonnet 4.6 caught 92.3% of the vulnerable functions, at a 43.1% false-positive rate. Testing five production-style web apps from the outside, the models found only 4 to 8% of 118 known bugs, or 10 to 19% with security tools attached. The authors promote their own specialised model, so read their framing with that in mind.
- On VLoc Bench (September 2026, 27 models, no Claude models among them), the best system reached 0.229 file-level F1 at locating vulnerabilities in whole repositories. F1 combines precision and recall; 1.0 is perfect. For 38.4% of tasks, no model found the right place.
- A July 2026 paper found that 26 to 55% of correct detections rested on flawed reasoning. A model can be right for the wrong reason, and that doesn’t help when the code changes.
Semgrep’s 2025 tests, a vendor study on older models, explain where the misses come from:
- Agents did best on authorisation bugs (IDOR) when the check sat in one function. They did worst when logic was spread across files or framework configuration.
- They struggled with “inter-procedural taint flow”, which is exactly what static analysers are built for.
- Their findings changed from run to run.
The pattern across all of this is that models over-flag on their own, and precision rises when a pipeline makes the model prove each finding. Anthropic’s verification passes, Mozilla’s request for test cases and proofs of concept, and OpenAI’s reproducers all do this. AWS’s data shows the cost: demanding proof also drops some real bugs. And on whole applications, as opposed to single functions, recall in the independent tests stays low.
The practical upshot:
- Run AI review on every change.
- Ask it for evidence, such as a failing test or a traced path, not a verdict.
- Run it more than once on risky code, since findings vary between runs.
- Keep static analysis and dependency scanning alongside it.
AI is also good at the opposite job: cleaning up static-analysis noise. One ISSTA 2026 paper cut false positives on the OWASP Benchmark from over 92% to 6.3%. The authors warn this can also suppress real findings.
The tools
Most of these are billed by tokens, so cost scales with code size and how often you scan:
- Claude Code
/security-reviewreviews the diff on your branch for injection, authentication and data-exposure risks (docs). - Anthropic’s GitHub Action runs on your own API key. It filters out denial-of-service and open-redirect findings by default. Its README says it “is not hardened against prompt injection attacks and should only be used to review trusted PRs”.
- The Claude Security plugin maps the architecture, builds a threat model and checks each finding. Scans count toward your Claude Code usage. Anthropic says it “doesn’t replace” static analysis, dependency scanning and code review.
- OpenAI’s Codex Security bills cloud scans by tokens, and your plan’s included usage doesn’t cover them. The CLI’s
--max-costlimit is “an estimate, not a hard spending cap”. - GitHub’s AI Scan covers languages CodeQL doesn’t, such as PHP, Bash, Terraform and Dockerfiles (our coverage). Its findings are advisory and can’t block a merge. It uses metered AI credits.
- Vercel Security Review (public beta) reviews every push at provider token rates plus $0.25 per million tokens (our coverage).
Prices and terms are as published on the vendors’ pages on 19 November 2026. We didn’t test these tools, and dbggr isn’t affiliated with any of them. Check current terms with the vendor.
An AI reviewer reads untrusted code and pull-request text, so it’s a prompt-injection target. Give it read-only access and no secrets, and run it in a sandbox. Our guides on sandboxing agents locally and agent sandboxes cover how.
What do static analysis and safe defaults catch?
Static analysis (SAST) tools check source code against known vulnerability patterns and data flows. They’re cheap to run on every change, but their recall on real bugs is modest:
- In the ISSTA 2024 study of 815 commits that introduced vulnerabilities, a single SAST tool warned in the vulnerable functions for 52% of them. At least 76% of those warnings were irrelevant, and 22% of the commits got no warning at all.
- Seven Java tools did well on synthetic benchmarks, but even combined they missed 70.9% of 165 real CVEs.
- C analysers missed 47 to 80% of real vulnerabilities, or 30 to 69% when combined.
So treat SAST as a cheap net for known patterns, not proof of absence. Common free options:
- CodeQL, free for open source.
- Semgrep Community Edition.
- Bandit for Python.
- gosec for Go.
- Brakeman for Rails.
The bigger win is removing bug classes so nobody has to find them. Google’s Safe Coding work moves safety “from individual developers to the programming language, software libraries, and frameworks”, and it credits that with nearly eliminating XSS and SQL injection. Examples are auto-escaping templates, parameterised query builders and memory-safe languages. In Android, Google reports about a 1,000-fold lower density of memory-safety vulnerabilities in Rust than in its C and C++ code.
A review that finds the same bug class twice should end with a framework default or a lint rule that blocks it, not a third fix. The same idea runs through our guide to validating AI-written code.
When do dynamic testing and fuzzing pay off?
Dynamic testing and fuzzing pay off for code that parses untrusted input, and for anything written in C or C++. They find bugs by running the program, so a finding is a real crash or behaviour, not a guess:
- Google’s OSS-Fuzz has helped fix over 13,000 vulnerabilities and 50,000 bugs across about 1,000 projects, as of May 2025.
- AI-written fuzz targets found 26 more, including one in OpenSSL that had likely been there for two decades.
- Returns fall off, though: finding linearly more bugs takes exponentially more machines.
Black-box web scanners are weaker. The best rigorous study we found is old (2010): it tested 11 scanners and found whole classes of vulnerabilities “completely overlooked”. We found no recent peer-reviewed scanner benchmark. Testing from the outside was also where the May 2026 study’s models did worst, at 4 to 8% of known bugs.
ZAP’s baseline scan is a cheap CI check for headers and obvious misconfigurations. It is passive and “doesn’t perform any actual ‘attacks’”. Functional tests that prove access control holds catch more. For example, user A gets a 403 on user B’s invoice. Those belong in your normal test suite.
How do you review dependencies, secrets and the supply chain?
Review dependencies, secrets and the supply chain with automation on every change. The volume is far beyond what people can read:
- Sonatype, a vendor, counted more than 454,600 new malicious packages in 2025. One spam campaign accounts for a large share of that.
- GitGuardian, also a vendor, found 28.65 million new hardcoded secrets in public GitHub commits in 2025. Over 64% of secrets confirmed valid in 2022 were still valid in January 2026.
Dependencies
Scanners like OSV-Scanner, pip-audit, npm audit and Dependabot match your lockfile against advisories. Most alerts aren’t exploitable in your code. Endor Labs, a vendor, puts function-level reachable vulnerabilities under 9.5%, and its earlier report found 95% sit in transitive dependencies. So rank alerts by reachability and by whether they’re in CISA’s KEV catalogue before you sort by CVSS score.
For new packages, which coding agents now add without asking, check who maintains them. OpenSSF Scorecard scores a project’s practices from 0 to 10, and SLSA describes how far you can trust a build. Two recent incidents show the stakes: the LiteLLM compromise and the wfx campaign.
Secrets
Turn on push protection, which blocks a push containing a secret before it lands. It beats any alert after the fact. Then scan the history with gitleaks or TruffleHog. TruffleHog can check whether a found key is still live.
Private repos aren’t safe ground: GitGuardian says internal repositories are about six times more likely to hold hardcoded secrets. A leaked key has to be rotated, not just deleted from the code.
Why review configuration and infrastructure separately?
Configuration needs its own review because data can be exposed with no code bug at all, just a setting. The security firm Crissy Field examined 159,041 sites built with Lovable (our coverage). It found that 24,664 sent Supabase database records as soon as they loaded, without a login. That alone isn’t a leak, it says, since the data may be meant to be public. But with further read-only requests, the firm could retrieve records containing email addresses from 7,403 of those sites. The firm cautions that this isn’t a confirmed leak rate either. Only a check of who is meant to read each table can tell the two apart.
A study of 15,232 infrastructure-as-code scripts found 21,201 security smells, including 1,326 hard-coded passwords. Verizon says that fixing weak passwords and permission misconfigurations in third-party cloud exposures took almost eight months for half of the findings.
A configuration review checks:
- Who can read each table, bucket and queue.
- Which ports and admin panels are public.
- What each service account and CI token can do.
- That defaults are changed, and that MFA is on for every human account.
Several tools help:
- Checkov and Trivy scan Terraform, Kubernetes manifests and container images. tfsec has merged into Trivy.
- CIS Benchmarks give hardening baselines for common platforms.
- GitHub’s AI Scan now reads Terraform and Dockerfiles in pull requests.
The NSA and CISA’s list of the ten most common misconfigurations starts with default configurations.
What is a pen test for, and when do you need one?
A pen test is for checking that your own process works, not for finding your bugs in the first place. The UK’s NCSC says to treat pen testing “as a method for gaining assurance in your organisation’s vulnerability assessment and management processes, not as a primary method for identifying vulnerabilities”. It compares a pen test to a financial audit. Ideally, “you should know what the penetration testers are going to find, before they find it.” The NCSC also says that checking whether your controls work “is not a valuable use of penetration testing resources”, and that the confidence a point-in-time test gives “decays”.
OWASP’s Web Security Testing Guide calls pen testing alone “too little too late”. NIST’s SSDF lists it as optional, “if resources are available… in high-risk scenarios”.
Some regimes do mandate it. PCI DSS v4.0.1 requires internal and external pen tests at least once every 12 months and after any significant change. We couldn’t read the SOC 2 criteria text, which needs an account, so we don’t claim what it requires. Ask your auditor.
Bug bounties and disclosure programmes keep testing going after release:
- In a USENIX Security 2013 study, bounties produced 28% of Chrome’s and 24% of Firefox’s patched advisory vulnerabilities. On cost, they compared favourably with hiring researchers.
- HackerOne, a vendor, reports valid IDOR reports up 29% since 2024 while XSS has “nearly flatlined”. That’s a hint that access control is where today’s bugs are.
Everyone can at least publish a security.txt with a contact address and an expiry date. Both fields are required. The NCSC’s disclosure toolkit has a policy template.
How often should you do a security review?
Review on triggers, with a periodic full pass, rather than once a year. NIST says any frequency in the SSDF “is notional”, and that practices are chosen by risk. The cadences the frameworks and the evidence support:
| Trigger | What to run |
|---|---|
| Every change | Dependency and secret checks, SAST or AI review, a human reviewer told to look at security when the change touches sensitive code |
| A new feature, integration or data flow | Update the threat model |
| Changes to auth, payments, data export or infrastructure | A reviewer who knows that area, plus a configuration check |
| Daily or weekly | New advisories against your lockfile; KEV matches first |
| Quarterly or each major release | Full-repository AI scan; access and permission review; re-read the threat model |
| Every 12 months and after significant change | Independent test (required by PCI DSS; good practice once customers’ data is at stake) |
Point-in-time results go stale as the code changes. AI scanners also keep finding new bugs in old code: this autumn Linux 7.4’s merge window was “full of fixes for issues found by AI”, and PostgreSQL’s back-patched commits rose by more than 60%. So schedule full scans again, not just once.
Which combination fits a solo project, a small team or a larger organisation?
The right combination grows with how much damage a breach would do and how many people can review. In every case, start with the cheap automated layers, because they cover the most common ways in.
A solo project or side app
You are both author and reviewer, so you rely on automation and on writing things down:
- A one-page threat model in the repo answering the four questions.
- Safe framework defaults.
- Push protection and a secret scanner.
- Dependabot or OSV-Scanner.
- One SAST tool or an AI security review on each pull request, run sandboxed.
- A security.txt.
Before launch, check every table’s and bucket’s access rules by hand: the Lovable study shows how often data is readable without a login. Aim for ASVS Level 1. When the app starts holding other people’s personal or payment data, move to the small-team setup.
A small team
Add people to the loop:
- A second reviewer on every change, explicitly asked to look at security.
- A named owner for authentication and authorisation code.
- Threat modelling for each new feature.
- Infrastructure as code with Checkov or Trivy in CI.
- A quarterly full AI scan and access review.
- Access-control tests in the normal test suite.
Aim for ASVS Level 2. Bring in an independent pen test before a big launch or when a customer asks, and treat its findings as a check on your process.
A larger organisation
Layer process on top:
- A security design review gate for new systems, as Google describes.
- Several scanners in CI, with AI triage of their findings.
- Fuzzing for native and parsing code.
- Yearly and post-change pen tests, and a disclosure policy or bug bounty.
- A maturity model like SAMM to choose where to invest. SAMM says organisations shouldn’t aim for the maximum level everywhere.
- ASVS Level 3 for the most sensitive systems.
Watch the backlog as well as the findings. Anthropic says triage and patching capacity, not finding, is now the bottleneck. In OpenSSL and PHP, 30 to 36% of security concerns raised in review were only acknowledged, not fixed.
If agents write much of your code, our project setup guide covers wiring these checks into the harness, and catching agent false completions covers checking that a “fixed” really is.
FAQ
What is a security code review?
A security code review is a check of source code for flaws an attacker could use, such as missing authorisation, injection or leaked secrets. It’s done by people, by tools or by AI agents. It covers one part of a full security review, which also looks at design, dependencies, configuration and the running app.
Is the OWASP Top 10 enough for a security review?
No. OWASP calls the Top 10 “primarily an awareness document” and “the bare minimum” as a testing standard. It recommends the Application Security Verification Standard (ASVS), whose 345 requirements in three levels make a fuller checklist.
Can AI replace a human security reviewer?
Not on current evidence. On AWS’s September 2026 benchmark, plain models including Claude Opus 5 flagged 41 to 99% of safe code, and demanding proof of exploit made them miss 7 to 44% of real bugs. Pipelines that validate each finding report high precision, such as Anthropic’s vendor-reported 90.6%, but no independent test has measured what they miss. Use AI review on every change, and keep a person on sensitive code.
How often should you do a penetration test?
PCI DSS requires one at least every 12 months and after any significant change. Otherwise, the UK NCSC treats a pen test as an audit of your own process, so run one when the stakes justify the cost: before a major launch, when customers require it or after a big architectural change.
What is the cheapest security review for a small project?
Turn on secret push protection and dependency alerts, and run a free static analyser such as CodeQL or Semgrep CE, or an AI security review, on each pull request. Add a one-page threat model and a manual check of database and storage access rules. These cover the most common ways in for little or no money.
