Logic Scan: find business logic and access control flaws in codeBeta

Logic Scan reads your routes, middleware and database calls, then reports checks that are missing or in the wrong place. For example, one user can open another user's invoice, a new account picks its own role, or two requests redeem the same gift card.

Status: beta, version 0.1.0Planned release: Ultimate plan, January 2027Not included in the Free plan or Premium trial

Why SAST misses these flaws

A SAST rule follows untrusted input to a dangerous function, such as an SQL query. A logic flaw usually has no such path. The query is safe and the route requires a login. What is missing is a check that the record belongs to the caller, or that a balance cannot change between the check and the update.

A money transfer endpoint

 6app.post('/transfer', requireAuth, async (req, res) => {
 7  const { to, amount } = req.body;
 8  const sender = await User.findById(req.user.id);
 9  if (sender.balance < amount) return res.status(400).json({ error: 'Not enough funds' });
10  await User.updateOne({ _id: sender.id }, { $inc: { balance: -amount } });
11  await User.updateOne({ _id: to }, { $inc: { balance: amount } });
12  res.json({ ok: true });
13});

JavaScript (Express), written for the white paper. No string concatenation, no shell command, no output to a page.

What Logic Scan reports, with all 344 rules

RuleTitleSeverityLine
LS066Amount can be negativeCritical10
LS068Balance check and update can raceHigh10
LS102Money can leave the account without extra verificationHigh10
LS070Related money changes are not in one transactionHigh11
LS001Application has no rate limitingMedium4
LS103Transfers have no maximum or daily limitMedium10
LS071Users can transfer to themselvesMedium11

A negative amount moves money from the recipient to the sender. Two transfers sent at the same moment both pass the balance check on line 9.

One finding, as the scanner prints it

Each finding says who could use the flaw, how, and what to change. It also gives the route, the related lines, the CWE and a confidence level.

HIGH  LS068  Balance check and update can race
  app.js:10:9
  Route: POST /transfer
    await User.updateOne({ _id: sender.id }, { $inc: { balance: -amount } });
  Problem: `balance` was read and checked earlier, then changed here in a separate step. Parallel
           requests can all pass the check, so the same money can be spent more than once.
  - app.js:9: the value is checked here
  Who:     Any signed-in user.
  How:     Send `POST /transfer` many times at the same moment. All requests see the same balance and
           pass the check before it goes down.
  Impact:  Parallel requests can all pass the check before any of them subtracts, so the same money is
           spent several times.
  Fix:     Use one conditional update (`WHERE balance >= amount`) or lock the row in a transaction.
  payments | CWE-362 | confidence: medium

Text report for the race condition above. JSON and SARIF 2.1.0 reports carry the same fields plus a fingerprint that does not depend on line numbers.

What it checks

344 rules in 24 categories: 63 critical, 149 high, 102 medium and 30 low. Each rule is mapped to a CWE, 109 CWE types in all.

Identity, sign-in and sessions 72 rules

Login, multi-factor authentication, password reset, sessions, OAuth, API keys and other tokens.

Access control and data ownership 73 rules

Access to other users' records (IDOR), missing role and tenant checks, request fields that override trusted values.

Organisations, membership and plans 39 rules

Roles across organisations, invited and removed members, cancelled plans, trials and licences.

Payments and commerce 28 rules

Prices, quantities, balances, coupons, refunds, payment webhooks and order totals.

Workflow, business controls and abuse 74 rules

Status changes, approvals, skipped or repeated steps, race conditions and rate limits.

Integrations, AI and exposed data 58 rules

Outside services, output from AI models, and some injection and data exposure checks that overlap with SAST.

How it works

The engine is deterministic. It does not use a machine learning model, does not run your application and makes no network requests, so the same code always gives the same findings.

  1. Each file is parsed into a syntax tree and converted to a common form, so most rules are written once for every language.
  2. Routes, the middleware that runs before them, and database operations are found. Function calls are linked across files.
  3. For each route, checks, database operations and responses are put in order. Each value is traced to the client, the signed-in user or the database.
  4. The rules look for one missing, broken or misordered step, such as a record loaded without its owner.
Data-flow SASTLogic Scan
Question askedCan untrusted data reach a dangerous function without being made safe?Can someone do something the application should not allow?
What is modelledSources, sinks and the paths between themRoutes, middleware, the signed-in user, roles, organisations, record owners, state, and the order of steps in each request
Typical findingsSQL and command injection, cross-site scripting, path traversal, unsafe deserialisationAccess to other users' records, privilege escalation, second-factor bypass, reusable reset links, race conditions on balances, self-approval
Across endpointsEach path is usually checked on its ownCompares endpoints, for example an owner filter or admin check present on one and missing from another

Use both. Logic Scan does not replace SAST, and DAST and pentests find things that static analysis cannot see.

OWASP API Security Top 10 coverage

Examples of rules for the authentication, authorisation and business flow risks in the 2023 list. A rule covers particular forms of a risk, not all of it.

RiskExamples of rules
API1:2023 Broken Object Level AuthorizationLS039 Any user can read another user's record
LS040 Any user can change another user's record
LS041 Any user can delete another user's record
LS054 List endpoint returns everyone's records
API2:2023 Broken AuthenticationLS002 Login has no brute-force protection
LS010 Token is decoded but never verified
LS013 Login can complete without the second factor
LS022 Password-reset token can be reused
API3:2023 Broken Object Property Level AuthorizationLS031 New users can choose their own privileges
LS048 Entire request body is saved to the database
LS049 Request body overrides a trusted field
LS063 Complete user record is returned to the client
API5:2023 Broken Function Level AuthorizationLS037 Admin endpoint does not check for an admin role
LS043 Permission decision uses a role sent by the client
LS050 Roles can be changed without an admin check
API6:2023 Unrestricted Access to Sensitive Business FlowsLS073 Coupon can be used without limit
LS085 Reward can be claimed repeatedly
LS093 One-time item can be redeemed twice in parallel

Languages and scan time

Coverage is widest for JavaScript and TypeScript. Most rules run on every language, but not every rule has been tested in every language yet.

LanguageFrameworks
JavaScript, TypeScriptExpress, Koa, Fastify, Hapi, Hono, Next.js, NestJS, TypeGraphQL, Socket.IO
PythonFlask, FastAPI, Django, Django REST Framework, Connexion, Graphene
Gonet/http, Gin, Echo, Chi, Gorilla, Fiber
PHPLaravel, Slim, Symfony, plain PHP
JavaSpring, JAX-RS
RubyRails, Sinatra
PerlMojolicious, Dancer, CGI
ProjectLinesRoutesSeconds
BookStack (PHP)216,0913480.90
Bugzilla (Perl)116,067110.46
WebGoat (Java)63,0482490.30
OWASP Juice Shop (TS)31,2052790.60
Healthchecks (Python)24,4451320.13
RailsGoat (Ruby)3,384470.03

All 344 rules, measured in December 2026 on an Apple M3 (8 cores, 16 GB). Median of five scans after one warm-up. All nine projects.

Limitations

  • It does not know what your application is meant to do. It finds violations of common rules such as ownership, roles, payments and one-time use. Flaws specific to one business still need a reviewer.
  • It does not run code, so it can miss routes, queries or checks chosen at runtime.
  • It cannot see controls outside the code, such as rate limits in an API gateway. You can turn off the rules those controls cover.
  • Fields and functions are mostly recognised by common English names, such as owner or balance. Unusual or non-English names can hide flaws.
  • Values stored in one request and read back in a later one are not followed.
  • Some findings will be false positives and some flaws will be missed. A scan with no findings does not show that an application is secure.

Read the white paper online Business logic vulnerabilities explained All scanners

Questions and answers

What is a business logic vulnerability?

A flaw that lets a user do something the application should not allow, using requests that look normal. Examples are reading another customer's invoice by changing the id in the URL, registering with "role": "admin", or redeeming one gift card twice with two requests sent at the same moment.

Can SAST find IDOR and other access control flaws?

Usually not. A data-flow SAST rule looks for untrusted input reaching a dangerous function. An IDOR often has no such path: the query is safe, and what is missing is a check that the record belongs to the caller. Logic Scan models the signed-in user and record owners, so it can report that missing check.

Does Logic Scan use AI?

No. The engine is deterministic. It does not use a machine learning model, does not run the application and makes no network requests, so the same code always produces the same findings.

Which languages and frameworks does it support?

JavaScript and TypeScript (Express, Koa, Fastify, Hapi, Hono, Next.js, NestJS, TypeGraphQL, Socket.IO), Python (Flask, FastAPI, Django, Django REST Framework, Connexion, Graphene), Go (net/http, Gin, Echo, Chi, Gorilla, Fiber), PHP (Laravel, Slim, Symfony, plain PHP), Java (Spring, JAX-RS), Ruby (Rails, Sinatra) and Perl (Mojolicious, Dancer, CGI). Coverage is widest for JavaScript and TypeScript.

Can I run it in a CI pipeline?

Reports are produced as text, JSON or SARIF 2.1.0, and a pipeline can be set to fail when a finding at or above a chosen severity is reported. JSON and SARIF findings carry a fingerprint that does not depend on line numbers, so a finding can be tracked as the code around it changes.

Does it replace a penetration test?

No. It does not know what your application is meant to do, so flaws specific to one business, such as a payment attached to the wrong order, still need a person. Running it before a pentest clears the common flaws so the testers can spend their time on the rest.

How many false positives should I expect?

Some. 38 rules are rated high confidence, 298 medium and 8 low, and confidence levels are still being adjusted during the beta. Every finding should be reviewed by someone who knows the application.

When is it available and which plan includes it?

Logic Scan is in beta, at version 0.1.0. It is planned for the Ultimate plan in January 2027. The date and plan may change. It is not part of the Free plan or the Premium trial. Contact us to ask about the beta.

See how Logic Scan handles your code

The white paper has eight examples with the scanner's real output. To try the beta on your own repository, talk to us. A technical sheet listing all 344 rules is available on request.

Logic Scan is planned for the Ultimate plan in January 2027. The date and plan may change.