Skip to main content
Security comparisonReviewed

SAST vs DAST: what static and dynamic testing each catch, traced through one Next.js change

Static application security testing reads your code without running it.

Dynamic application security testing sends requests to a running build and judges the responses. They fail in different places, so this page compares them on what each sees, when each can run and the evidence each leaves, then follows one invented flaw past both of them and into a reviewer's hands.

Worked example: one Next.js flaw at commit, on staging and at release

An invented Next.js pull request, written for this page and not taken from any client, followed through static analysis at commit, dynamic testing against staging and review by a person. Each part shows what the method saw, what it flagged or missed and why, and the evidence it left.

How to use it

The evidence is then lined up by stage, followed by the fix, a regression test and a combined remediation workflow to copy into a release checklist.

sast-vs-dast.txt

ILLUSTRATION ONLY. The bakery, its application, the pull request, commits, accounts, scan output and data below were invented for this page. They are not a client's code or a client's result, and the scan output is not taken from any product.

Stack: a Next.js App Router application. The order form posts to a Server Action that validates its fields with Zod, as the Next.js forms guide shows, and the unit test uses Vitest and React Testing Library, set up as the Next.js Vitest guide describes. lib/dal.ts is the application's data access layer: requireCustomer and requireStaff return the signed-in user for that role or redirect to the sign-in page.

The application: a wholesale bakery takes next-morning bread orders from cafés. Each café signs in with a customer account and can add delivery notes to its own orders, such as which door to use. Before the first run each morning, dispatch staff sign in and open /dispatch, a board that lists every café's orders with their notes so the drivers can be briefed. A café's own order page shows its notes inside a text box for editing.

How to read it: parts 2 to 4 follow the same change through each method, and each ends with the evidence that method leaves. Part 5 lines the evidence up by stage, part 6 is the fix and its regression test, and part 7 is the combined remediation workflow, written to be copied into a release checklist.


## Part 1: the change

Pull request #219: "Keep line breaks in delivery notes"
Head commit: 3b9e0a4
Description as submitted: "Cafés asked for notes on more than one line, and the board was running them together. Notes now keep their line breaks. Script tags are stripped first, so this is safe to render."

```diff
--- /dev/null
+++ b/lib/notes-to-html.ts
@@ -0,0 +1,5 @@
+// Turns a cafe's delivery notes into HTML that keeps its line breaks.
+export function notesToHtml(notes: string): string {
+  const withoutScripts = notes.replace(/<script[\s\S]*?<\/script>/gi, '')
+  return withoutScripts.replace(/\n/g, '<br>')
+}
--- a/app/_components/delivery-notes.tsx
+++ b/app/_components/delivery-notes.tsx
@@ -1,3 +1,5 @@
+import { notesToHtml } from '@/lib/notes-to-html'
+
 export function DeliveryNotes({ notes }: { notes: string }) {
-  return <p>{notes}</p>
+  return <p dangerouslySetInnerHTML={{ __html: notesToHtml(notes) }} />
 }
```

Two files the pull request did not change, but which decide what the change does:

```tsx
// app/orders/[orderId]/actions.ts (unchanged): how a cafe saves its notes
'use server'

import { z } from 'zod'
import { requireCustomer, saveNotesForCustomer } from '@/lib/dal'

const NotesForm = z.object({
  orderId: z.string().min(1),
  deliveryNotes: z.string().max(500),
})

export async function saveDeliveryNotes(formData: FormData) {
  const customer = await requireCustomer()
  const parsed = NotesForm.safeParse({
    orderId: formData.get('orderId'),
    deliveryNotes: formData.get('deliveryNotes'),
  })
  if (!parsed.success) return
  // Saves only to an order that belongs to this customer.
  await saveNotesForCustomer(customer, parsed.data.orderId, parsed.data.deliveryNotes)
}
```

```tsx
// app/dispatch/page.tsx (unchanged): the staff board
import { DeliveryNotes } from '@/app/_components/delivery-notes'
import { listOrdersForDispatch, requireStaff } from '@/lib/dal'

export default async function DispatchPage() {
  await requireStaff()
  const orders = await listOrdersForDispatch()
  return (
    <ul>
      {orders.map((order) => (
        <li key={order.id}>
          <h2>{order.cafeName}</h2>
          <DeliveryNotes notes={order.deliveryNotes} />
        </li>
      ))}
    </ul>
  )
}
```

The action checks the role, limits the notes to 500 characters and saves them only to the café's own order. Those checks do their jobs, and none of them is about markup. OWASP's XSS Prevention Cheat Sheet makes the general point: input validation can enforce expected formats, but it does not replace safe text APIs, output encoding or HTML sanitisation.


## Part 2: static analysis at commit

The pipeline runs a static analysis tool on every pull request, over the files the pull request changes. Its output for commit 3b9e0a4:

```text
app/_components/delivery-notes.tsx
  4:13  warning  raw-html-from-variable
        dangerouslySetInnerHTML receives a value that is not a fixed string.
        Check that the value cannot contain markup supplied by users.
lib/notes-to-html.ts
  no findings
1 warning, 0 errors
```

Triage, recorded on the pull request:
- The author dismissed the warning as a false positive. Reason given: "notesToHtml strips script tags."
- A second developer approved the dismissal after reading the reason and the pull request description. They did not open lib/notes-to-html.ts.

What the tool saw: the prop dangerouslySetInnerHTML receiving a value built at run time. The rule matches that pattern wherever it appears, which is why it pointed at the right file and line before anything was deployed.

What it could not decide, and why:
- Whether notesToHtml makes the value harmless. The rule has no model of what the helper removes. NIST notes that static analysis tools usually cannot determine whether a weakness is an actual vulnerability or is mitigated in the application.
- Where the value comes from. On this line it is a function argument. That cafés type it and the database stores it is recorded in other files.
- Who reads the output. DeliveryNotes is rendered by app/dispatch/page.tsx, which the pull request did not change, so a scan of the changed files never opened it.

Evidence available at commit: the warning, tied to commit 3b9e0a4, its file and its line, and the dismissal with its reason and two names. Nothing about behaviour at run time, because nothing is running yet.


## Part 3: dynamic testing against staging

The pull request was merged as commit 5c1d7f2 and deployed to staging, and the deployment record names that commit. The nightly dynamic scan ran against it with the one test account the team had always given it.

```text
Target:     https://staging.bakery-orders.test  (commit 5c1d7f2)
Accounts:   cafe-test-1 (customer role)
Mode:       crawl from / and /orders; destructive checks off
Exercised:  14 pages and form actions (coverage list attached)
Inputs:     9 fuzzed, including deliveryNotes on /orders/ord_test_01
Stored-input check:
            38 payloads saved through the delivery notes form, then
            every page in coverage fetched again and searched for them
            Payloads found unencoded in a response: 0

Findings
  Low   Content-Security-Policy header absent on HTML responses (14 of 14)
```

What the scan saw: every response the café account could reach, as deployed, headers included. On the café's own order page its payloads came back inside the text box, as text, so none of them counted as a hit.

What it flagged: no cross-site scripting. One configuration finding, a missing Content-Security-Policy header, which nothing in the pull request could have shown.

What it missed, and why:
- The flaw. The WSTG notes that stored cross-site scripting typically involves at least two requests to the application. Here one request stores the input and a later one, which belongs to dispatch staff, displays it, and the scan held no staff account.
- /dispatch itself. This crawl finds pages by following links from what its account can see, and nothing a café can see links to /dispatch. The page appears neither in the coverage list nor in any list of pages the scan could not reach.

Evidence available at staging: the scan record, tied to commit 5c1d7f2, with its account list, its coverage list and the header finding. The clean result speaks for those 14 pages and one role. The most useful line in it is the one that is missing: /dispatch.


## Part 4: review by a person

Before the release, a developer who had not written the change read everything merged since the last release, with the scan results beside them. Their comments on pull request #219:

Comment 1, app/_components/delivery-notes.tsx line 4. React's documentation calls dangerouslySetInnerHTML dangerous and says that unless the markup is coming from a completely trusted source, it is trivial to introduce an XSS vulnerability this way. It also recommends creating the {__html} object as close as possible to where the HTML is generated, not inline as here. These notes are typed by café staff, so the markup is not from a trusted source.

Comment 2, lib/notes-to-html.ts line 3. The regular expression removes script elements and nothing else. Event handler attributes pass straight through: an image tag with an onerror attribute survives it, and the handler runs when the image fails to load. React's own documentation uses an image with an onerror handler, stored in a database, as its example of this security hole. OWASP's XSS Prevention Cheat Sheet points to the XSS Filter Evasion Cheat Sheet for examples that show why filtering alone is insufficient.

Comment 3, who reads the output. A search of the codebase for DeliveryNotes finds one use: app/dispatch/page.tsx, which shows every café's notes to staff. The writer is a café and the reader is a member of staff. React's documentation describes its own example of rendering HTML as safe only because the output is shown to the same user and the parser is trusted. The WSTG warns that stored cross-site scripting is particularly dangerous in areas where users with high privileges have access.

Comment 4, the dismissed warning. The dismissal rested on the description, not on notesToHtml. Reopening it.

Comment 5, the requirement. The change exists to keep line breaks, and that needs no HTML. The CSS white-space property set to pre-line breaks lines at newline characters, so the notes can go back to being rendered as text. OWASP's XSS Prevention Cheat Sheet advises preferring safe APIs that treat data as text.

Confirmation on the running build: staging, commit 5c1d7f2, test accounts and a test order only.
1. Signed in as cafe-test-1, saved these notes on test order ord_test_01:
   Rear door<img src="/no-such-file.png" onerror="document.title='marker-219'">
2. Signed in as dispatch-test-1, opened /dispatch.
Expected: the notes shown as text, tags and all.
Observed: "Rear door" with no visible tags, and the browser tab title changed to marker-219. The handler ran inside the dispatch staff member's signed-in page.
The marker changes the page title and nothing else. The browser asks staging for an image that does not exist, which is what makes the handler run, and the handler itself sends nothing and reads no data. The notes on ord_test_01 were cleared after the check.

Finding, as recorded:
- Title: Any café account can run script in the dispatch board through its delivery notes.
- Status: confirmed on the running staging build of commit 5c1d7f2.
- Location: app/_components/delivery-notes.tsx line 4, with lib/notes-to-html.ts.
- Classification: OWASP Top 10:2025 A05 Injection, CWE-79 Cross-site Scripting. Test procedure WSTG-v42-INPV-02. Reviewed against ASVS v5.0.0-1.2.1, output encoding relevant to the context.
- Impact: script saved by any customer account runs in the browser of each staff member who opens /dispatch, inside a page they are signed in to. React's documentation says code run this way could be used to steal user information or to perform actions on the user's behalf.

Evidence available from review: the five comments, tied to commit 3b9e0a4; the search that found the dispatch board; the confirming pair of requests on the staging build of 5c1d7f2; the reopened warning.


## Part 5: the evidence, stage by stage

At commit (3b9e0a4)
- Static analysis: a warning at app/_components/delivery-notes.tsx line 4, and a dismissal with its reason and two names.
- Dynamic testing: nothing yet. There is no running build to send requests to.
- Review by a person: comments on the diff, when the review happens before merging. Here it came later, before release.

At staging (5c1d7f2)
- Static analysis: the same result. The deployment record ties staging to the scanned code.
- Dynamic testing: a scan record for one customer account and 14 pages, without /dispatch, plus the missing header.
- Review by a person: comments 1 to 5, and the marker stored as cafe-test-1 that ran for dispatch-test-1.

At release (fix commit 8e2f61c)
- Static analysis: no raw HTML warning on the fix commit, because the prop is gone, and no new dismissals.
- Dynamic testing: a rescan with café and dispatch accounts. /dispatch is in coverage, and the stored payloads appear as text.
- Review by a person: the regression test failing on 3b9e0a4 and passing on 8e2f61c, the marker requests repeated with the marker shown as text, and the finding marked fixed.


## Part 6: the fix

```diff
--- a/lib/notes-to-html.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-// Turns a cafe's delivery notes into HTML that keeps its line breaks.
-export function notesToHtml(notes: string): string {
-  const withoutScripts = notes.replace(/<script[\s\S]*?<\/script>/gi, '')
-  return withoutScripts.replace(/\n/g, '<br>')
-}
--- a/app/_components/delivery-notes.tsx
+++ b/app/_components/delivery-notes.tsx
@@ -1,5 +1,7 @@
-import { notesToHtml } from '@/lib/notes-to-html'
+import styles from './delivery-notes.module.css'
 
+// Notes are rendered as text, never as HTML. The notes class keeps the
+// line breaks a cafe types (white-space: pre-line).
 export function DeliveryNotes({ notes }: { notes: string }) {
-  return <p dangerouslySetInnerHTML={{ __html: notesToHtml(notes) }} />
+  return <p className={styles.notes}>{notes}</p>
 }
--- /dev/null
+++ b/app/_components/delivery-notes.module.css
@@ -0,0 +1,3 @@
+.notes {
+  white-space: pre-line;
+}
```

The regression test sits beside the component:

```tsx
// app/_components/delivery-notes.test.tsx
import { expect, test } from 'vitest'
import { render } from '@testing-library/react'
import { DeliveryNotes } from './delivery-notes'

const MARKER = 'Rear door<img src="/no-such-file.png" onerror="document.title=1">'

test('delivery notes render as text, never as HTML', () => {
  const { container } = render(<DeliveryNotes notes={MARKER} />)
  expect(container.querySelector('img')).toBeNull()
  expect(container.textContent).toBe(MARKER)
})
```

Why this test keeps the fix in place:
- On 3b9e0a4 it fails, because notesToHtml lets the img element through. On 8e2f61c it passes.
- It tests the component the dispatch board renders, so a later change that brings raw HTML back fails in CI before it ships.
- The dispatch page itself is an async Server Component. The Next.js Vitest guide says Vitest does not currently support those and recommends end-to-end tests for them, so the page-level check stays with the rescan that holds a dispatch account, or with an end-to-end test signed in as dispatch staff.
- NIST says some test cases are created specifically to show the presence, and later the absence, of a bug, and that these are sometimes called regression tests.


## Part 7: combined remediation workflow

Copy this into the release checklist and use it for any finding, whichever method raised it.

[ ] 1. Reopen and record. Reopen any dismissed warning on the affected code, and write down why the dismissal was wrong.
[ ] 2. If the flawed code reached production, check whether the flaw was used before changing anything. Search stored notes for markup, such as a "<" followed by a letter. Copy any matches somewhere safe before anyone edits them, because they are evidence. If a match did not come from your own testing, bring in an incident response specialist before cleaning up.
[ ] 3. Fix at the point of output. Prefer rendering as text. Where users need to write HTML, use a maintained HTML sanitising library rather than a helper of your own.
[ ] 4. Add a regression test that fails on the flawed commit and passes on the fix, and keep it in CI.
[ ] 5. Look for siblings. Search for every other dangerouslySetInnerHTML and every other caller of the removed helper. Ask the same three questions of each: where the value comes from, who reads it, and whether HTML is needed at all.
[ ] 6. Static analysis: rerun on the fix commit and confirm the warning is gone rather than dismissed. Put the rule on the must-fix list, so a future dismissal needs a second reviewer who reads the code the reason relies on.
[ ] 7. Dynamic testing: give the scan an account for every role, including the roles that read what others write. Rerun against staging built from the fix commit, then compare the coverage list with the routes in the app directory.
[ ] 8. Review by a person: repeat the confirming requests and expect the marker as text. Clear the test data afterwards.
[ ] 9. Second layer: raise the missing Content-Security-Policy header as its own change. OWASP describes a strong CSP as an effective second layer of protection, especially against XSS, and not the only defence. Do not hold the fix back for it.
[ ] 10. Release with the evidence: the fix commit, its static results, the staging scan record with its coverage list, the regression test run, the confirmation result, and a note of what was not tested.

What this workflow does not cover: business rules nobody wrote down, roles nobody gave the scan, and code outside the change and its callers. Record those as limits rather than letting a clean result imply they were checked.

SAST vs DAST: the short answer

Static application security testing (SAST) examines an application's code without running it.

Dynamic application security testing (DAST) tests a running copy of the application from the outside and judges it by its responses. NIST draws the same line in NISTIR 8397, its guidelines on minimum standards for developer verification: analysis generally divides into code-based or static analysis and execution-based or dynamic analysis, with hybrids in between.

OWASP describes SAST tools as analysing source code or compiled versions of code to help find security flaws, and DAST tools as automated scanners that test web applications, normally from the outside, for flaws such as cross-site scripting, SQL injection, command injection, path traversal and insecure server configuration.

The useful comparison is not which one is better. It is when each can run, what each can see from where it stands, and what its evidence lets you prove. Static analysis can start the moment code is written and can point at a file and a line, but it reads code, not the system the code runs in.

Dynamic testing has to wait for a deployed build, but it meets the application the way users and attackers do, configuration included, and it cannot say which line is at fault.

Running both still leaves gaps. The OWASP Web Security Testing Guide (WSTG) v4.2 says it is believed that automating black-box testing is not, nor will ever be, completely effective, and that static source code analysis alone cannot identify issues due to flaws in the design, because it cannot understand the context in which the code is constructed.

It also warns that relying on successful results from automated tools gives a false sense of security. That is why this page treats review by a person as the third method rather than an optional extra.

The worked example on this page shows all three on one invented Next.js change. A static analysis rule flags the right line and a developer dismisses the warning. A nightly scan misses the flaw because of the account it was given. A reviewer reads the helper the dismissal relied on, finds out who sees the output and confirms the flaw on staging.

What static analysis (SAST) sees, and where it stops

A static analysis tool works on code: the source in your repository, or a compiled build.

NIST describes a static scanner as reasoning about the code as written, in somewhat the same fashion as a human code reviewer, and says scanners range in sophistication from simply searching for any use of a deprecated function, through looking for patterns that indicate possible vulnerabilities, to verifying that a piece of code faithfully implements a protocol.

Knowing where your own tool sits on that range tells you how to read it.

A rule that matches a function name flags every use, harmless or not. A rule that traces data can say more, but only along the paths it is able to follow.

Its strength is timing. NIST says static source code analysis should be done as soon as code is written, and that automated verification can be repeated often, for instance on every commit. Results can name the precise files, line numbers and even execution paths affected, and some tools give developers that feedback inside their editor.

OWASP's page on source code analysis tools notes that this feedback can save time and effort compared with finding vulnerabilities later in the development cycle.

Its limits come from the same place: it sees code, not the running system. OWASP notes that SAST tools frequently miss configuration issues, because those are not represented in the code, and that many have difficulty analysing code that cannot be compiled.

NIST adds that in almost all tools some warnings are false positives and some are insignificant in the context of the software, and that tools usually cannot determine whether a weakness is an actual vulnerability or is mitigated in the application.

So every warning ends with a person making a call. NIST tells tool users to triage results with the suppression and prioritisation features their tools provide, and organisations to keep a list of must-fix bugs drawn from experience with the tool, the applications being built and reported vulnerabilities.

The WSTG says the same from the other side: source code analysis tools are useful for finding security issues due to coding errors, but significant effort is needed to validate the findings.

A dismissed warning is a security decision and deserves the same scrutiny as the code. In the worked example, the dismissal is where the flaw got through.

What dynamic testing (DAST) sees, and where it stops

A dynamic test works on a running application, such as a staging copy.

NIST describes DAST tools, such as web application scanners, as testing software in operation. They can be integrated with the interface so the software receives clicks, selections and text in fields as it would in normal use, they create inputs as they run, and they watch for subtle hints of problems, such as an internal table name in an error message. When an input causes a detectable anomaly, the tool can try variations of it to probe further.

That vantage point sees what no source file holds: headers and cookies as the browser receives them, redirects and error pages as they are served, and settings changed by a host or a deployment after the code was reviewed. The WSTG describes the user acceptance environment as the one most representative of the release configuration, apart from the data, and lists testing for security configuration issues as a characteristic of testing there.

Run dynamic tests against a build as close to release as you can, and record which commit it came from.

The limits mirror the strengths. A dynamic finding is stated in the terms the test worked in: an address, the input sent and the response observed. It cannot name the line at fault, because the test never read the code.

It covers only what it reached: the pages it found, the forms it could fill and the roles its accounts held. NIST SP 800-115 says application vulnerability scanners, as with all pattern-matching and signature-based tools, typically have high false positive rates and also suffer from high false negative rates, and the WSTG says business logic flaws cannot be detected by a vulnerability scanner.

Coverage is the part of a dynamic result to read first. The WSTG's test for stored cross-site scripting notes that the flaw typically involves at least two requests to the application, and that all areas of an application that administrators can reach should be tested for data submitted by users.

A scan signed in as a single customer makes the first request and cannot make the second when the reader is a role it does not hold.

Give the scan an account for every role, then compare its coverage list with your own list of routes before you read its findings.

Static and dynamic application security testing side by side

Five questions separate the two methods on any web application.

Read across each pair before deciding what a clean result from either one means.

  • When it can run. Static analysis: from the first commit, on every pull request. Dynamic testing: once a build is deployed somewhere the test can reach it, such as staging.
  • What it needs. Static analysis: the code and, for some tools, a build that compiles. Dynamic testing: a running environment, a test account for each role, seeded test data and written approval to send attack traffic to that environment.
  • What a finding points to. Static analysis: a file, a line and sometimes the path the data took. Dynamic testing: an address, an input and the response that came back.
  • What it struggles to judge. Static analysis: usually, whether a weakness is a real vulnerability or already mitigated, and frequently, configuration that is not represented in the code. Dynamic testing: which line is at fault, and anything outside the pages and roles it covered.
  • What it leaves as evidence. Static analysis: a scan record tied to a commit, plus the decision on each warning. Dynamic testing: a scan record tied to a deployed build, with its account list and its coverage.

Review by a person: the third method

Tools apply rules.

A reviewer reading the change asks what it is for, who will see its output and what its author assumed. One reason the WSTG gives for automated tools doing a poor job of testing for vulnerabilities is that they do not think creatively, and that creative thinking has to be done case by case, because most web applications are built in a unique way even when they use common frameworks.

On source code review it is blunter: many serious security vulnerabilities cannot be detected with any other form of analysis or testing.

A reviewer also finishes the work the tools hand back. A static warning arrives without knowing whether the helper beside it mitigates the flaw; a person can open the helper and read it. A dynamic scan reports what its accounts saw; a person can search the code for every place the output is rendered and ask who looks at it.

The WSTG expects this hand-off, saying that before code changes are integrated into the build, the results of static and dynamic analysis should be reviewed and validated. OWASP's Top 10:2025 entry on injection makes the same pairing for that whole family of flaws: detection is best achieved by a combination of source code review and automated testing, including fuzzing, of all parameters, headers, URLs, cookies and JSON, SOAP and XML data inputs.

Review has limits too. It needs reviewers who are skilled and security aware, which the WSTG lists as a disadvantage of source code review, and the code a reviewer reads may differ from the code that is deployed. So a reviewer's suspicion is turned into evidence on a running build: a pair of requests from test accounts that either reproduces the flaw or does not. The secure code review page describes that kind of review in depth.

SAST and DAST in one pipeline, stage by stage

The WSTG suggests building security tests into continuous integration and continuous deployment (CI/CD) workflows, using DAST, SAST and software composition analysis or dependency tracking tools in standard automated release workflows or on a regular schedule, to keep baseline security information and identify low-hanging-fruit weaknesses.

For a web application, that can be set out as three stages, each leaving its own evidence.

At commit

Static analysis runs on each pull request. A warning on a must-fix rule blocks the merge, and every other warning is either fixed or dismissed with a reason that someone other than the author has checked against the code. The WSTG describes using the results of automated secure code analysis as check-in gates, for example refusing software artefacts with high or medium severity coding issues.

Changes that touch sign-in, permissions, payments or anything rendered from user input also get a reviewer who reads them with misuse in mind.

On staging

Dynamic testing runs against a staging build deployed from a known commit, with an account for every role and test data seeded for the purpose. The scan record keeps the commit, the accounts, the pages covered and the findings. A route missing from coverage is a finding about the test, and it goes on the same list as findings about the application.

At release

The release candidate carries its evidence: the static results for its commit and the dismissals made along the way, the staging scan and its coverage, regression tests for anything fixed, and a note of what was not tested.

NIST says some test cases are created specifically to show the presence, and later the absence, of a bug, and that these are sometimes called regression tests, which makes them the part of a fix that keeps working after everyone has moved on.

Any dynamic testing against production needs the same written approval and conduct rules as any other test of a live system.

Which one to start with

If you run neither today, start where your application's risk sits.

Each starting point below leaves gaps, so write those down as you go.

  • No security checks in the pipeline yet: start with static analysis on pull requests. It runs where developers already work, and a first scan of the whole codebase gives you a backlog to triage once instead of on every change.
  • Several roles, or users who see what other users write: add dynamic testing with an account for every role early, and read its coverage before its findings. A scan with one account cannot follow a path into a role it does not hold.
  • Frequent hosting, CDN or header changes: schedule dynamic checks after each infrastructure change as well as each release, because a change made in a hosting dashboard never appears in the code a static tool reads.
  • Risky logic concentrated in a few files, such as pricing, permissions or payments: have a person review those files, and confirm what they find on a running build.
  • A customer, insurer or contract asks for a penetration test: neither tool's output answers that request. The web application penetration testing page explains what that test covers, and the questions below explain how it differs from a scan.

Where a Clever Ops test fits beside your tools

Clever Ops tests custom web applications and their APIs, and reviews code for applications such as Next.js, React and Node with read-only access to the repository.

Code findings are confirmed against a running build where the scope allows, and the report marks any that rest on the code alone.

If your team already runs static or dynamic tools, send their current results, dependency alerts and earlier reports with the scope, so known issues are recognised as known rather than reported back to you as new. Each finding in the report comes with a fix written for your stack and retest criteria your developers can turn into regression tests, which is how a test result joins the pipeline described above.

Clever Ops does not sell raw scan output, or a scan subscription, as a service of its own. If Clever Ops built or hosts the application, the work is called a security review rather than an independent test, and the report states who built it and who hosts it.

Frequently asked questions

Neither is better in general, because they look from different places. Static analysis reads code early and points at the line, but is frequently unable to find configuration issues and usually cannot tell whether a weakness is mitigated. Dynamic testing meets the deployed application, configuration included, but covers only what it reaches and cannot name the line at fault. The practical question is which to add first, and the answer follows where the risk sits.

No. The OWASP Web Security Testing Guide says it is believed that automating black-box testing is not, nor will ever be, completely effective, that static analysis alone cannot identify flaws in the design, and that business logic flaws cannot be detected by a vulnerability scanner. Running both narrows the gaps between them. It does not close the gaps they share, such as business rules nobody wrote down or roles nobody gave the scan.

Both can, under the right conditions. OWASP lists cross-site scripting among the flaws dynamic scanners look for, and static analysis can flag code that leads to it, such as React's dangerouslySetInnerHTML used without sanitising the HTML, which OWASP's XSS Prevention Cheat Sheet lists among the ways a framework can be used insecurely. Whether a given case is found depends on where the value comes from and who reads it. The worked example on this page is a stored case that a static rule flagged, a developer dismissed and a single-account scan never saw.

No. NIST SP 800-115 says vulnerability scanners check only for the possible existence of a vulnerability, while the attack phase of a penetration test exploits it to confirm that it exists. NISTIR 8397 describes penetration testing as people using tools, technologies and their own knowledge and expertise to simulate attackers. A scan can be one step inside a test, but its report does not answer a customer or insurer who asked for a penetration test.

NISTIR 8397 describes interactive application security testing (IAST) as checking software in operation, with a hybrid or IAST tool also able to monitor the program's execution for internal faults. It describes software composition analysis (SCA) as a way to identify the open-source libraries and packages your software uses, which then need continual monitoring against databases of known vulnerabilities. The WSTG lists SCA or dependency tracking beside SAST and DAST in automated release workflows. Both are application security testing methods in their own right, and each answers a narrower question than the three this page compares.

For a short list of rules, yes. NIST suggests keeping a list of must-fix bugs based on experience with the tool, the applications being built and reported vulnerabilities, and the WSTG describes the results of automated code analysis used as check-in gates. For every other warning, require a reason for each dismissal, and have someone other than the author check that reason against the code it relies on.

Only with written approval from the owner of each target, after checking your hosting provider's testing policy, and under the same conduct rules as any test of a live system. Destructive actions are off by default for real people's accounts and records that existed before the test, and reset, lockout and deletion checks run only on test accounts and test records where the rules of engagement allow them. A staging copy that matches production is the lower-risk place to start.

Scope the right test for your application

Tell us what you have built, who uses it and when it needs to launch. You will get a plain-English recommendation: a website audit, a web application test or a referral to a specialist.