IAST and RASP both put an agent inside the running application, which is why they are often bought, deployed and judged as if they were the same thing, when one is a testing tool and the other is a production control. Interactive application security testing (IAST) watches an instrumented application during testing to find vulnerabilities; runtime application self-protection (RASP) watches it in production to detect and block exploitation. NIST SP 800-53 Rev 5 gives each its own control enhancement: SA-11(9) and SI-7(17). This guide explains how instrumentation works, how IAST and RASP compare with SAST, DAST and WAFs, how to deploy and tune them safely, and how to measure whether they earn their place. It is written for AppSec engineers, platform teams and security architects. For the wider testing programme see the Application Security Guide.
Key takeaways
- Same technique, different job. IAST finds flaws before release and reports them to developers; RASP stops exploitation in production and reports to operations. Judge each against its own goal.
- Coverage follows traffic. IAST only tests code paths that tests or users exercise, so its value depends on your functional and end-to-end test coverage.
- RASP sees context a WAF cannot. Because it hooks sensitive functions such as database queries, file operations and outbound requests, it can tell an attack that reached a sink from one that did not.
- Start in monitor mode. NIST notes RASP can run in monitor or protection mode; prove accuracy and performance in monitor mode before blocking.
- Agents are privileged software. An in-process agent sees requests, data and secrets in memory and talks to a management service; treat it as part of your supply chain and identity estate.
How instrumentation-based security works
Both technologies load an agent into the application runtime, typically through the platform's instrumentation interface: a Java agent attached to the JVM, a .NET profiler, a Node.js preload module, a Python or Ruby import hook, or a PHP extension. The agent places sensors on sources (where untrusted data enters, such as HTTP parameters and headers), propagators (string and collection operations that carry data), and sinks (dangerous operations such as SQL execution, command execution, file access, deserialisation and outbound HTTP).
- NIST definition of IAST: SA-11(9) guidance describes interactive, or instrumentation-based, testing as detecting vulnerabilities by observing applications as they run during testing, using access to the code, user interaction, libraries, frameworks, backend connections and configuration to directly measure control effectiveness, in real time and continuously through the development life cycle.
- NIST definition of RASP: SI-7(17) guidance describes runtime application self-protection as runtime instrumentation that detects and blocks exploitation using information from the software in execution, unlike perimeter protections that see only network information. On detection it can prevent exploitation and warn the user, terminate the session or the application, or alert staff.
- Open source example: the OpenRASP project describes integrating its protection engine into the application server, hooking sensitive functions and examining inputs fed into them, so that only attacks that reach a sink raise alarms and full stack traces are logged.
IAST and RASP compared with other techniques
| Technique | Where it runs | What it sees | Main strength | Main limitation |
|---|---|---|---|---|
| SAST (SA-11(1)) | Source or bytecode, no execution | All code, including unexecuted paths | Early, full coverage | False positives; no runtime context |
| DAST (SA-11(8) dynamic analysis) | Outside the running app | HTTP requests and responses | Language-agnostic, finds deployment and configuration issues | No view of code; struggles with complex APIs and authenticated flows |
| IAST (SA-11(9)) | Inside the app in test environments | Data flow from source to sink, libraries, configuration, backend calls | Precise findings with line of code and request; low noise | Only exercised code; language and framework support varies |
| SCA | Dependency manifests or binaries | Component versions and known vulnerabilities | Covers third-party risk | Reachability often unknown without runtime data |
| RASP (SI-7(17)) | Inside the app in production | Live requests at the point they reach sensitive functions | Context-aware blocking; virtual patch for known flaws | Performance and stability risk; per-language agents |
| WAF | In front of the app | Network and HTTP traffic | Language-agnostic, central management | No application context; evasion through encoding |
The OWASP DevSecOps Guideline (v0.3) places IAST in the test stage and notes its main challenge: only code that is exercised is tested, so smoke tests or a crawler are used to drive route coverage. For buying testing tools see the Application Security Testing Buyer's Guide; for perimeter controls see the Web Application Firewall Guide.
What IAST finds and how to use it
- Data flow flaws: injection (SQL, command, LDAP), path traversal, server-side request forgery and unsafe deserialisation, confirmed by watching tainted data reach the sink.
- Configuration and HTTP issues: missing security headers, insecure cookie flags, verbose errors and weak session settings observed at runtime.
- Cryptography and secrets in code paths: weak algorithms and hard-coded credentials when the code that uses them runs.
- Library usage and reachability: which vulnerable library functions actually execute, which helps prioritise SCA findings.
Making IAST work in a pipeline
- Instrument the integration environment: attach the agent to the application in the CI test stage or a shared QA environment, not on developer laptops only.
- Drive coverage deliberately: run the existing end-to-end and API test suites, then measure route coverage reported by the agent. Add a crawler or API test generation for routes that tests miss.
- Route findings to developers: publish findings as pull request comments or tickets with the request, stack trace and line of code, deduplicated across builds.
- Gate on new criticals only: fail builds on new high-confidence critical findings, not on the historical backlog, to keep the gate credible.
- Cross-check accuracy: run the agent against the OWASP Benchmark project, which supports SAST, DAST and IAST tools and scores them with true and false positive rates and a Youden index (sensitivity plus specificity minus 1, scaled 0 to 100). Use your own applications too; benchmark results do not transfer automatically.
Sensor reference: sinks, weaknesses and responses
The same sink sensors drive IAST findings in test and RASP decisions in production. Use this table to check that an agent covers the weaknesses that matter for your stack, and to agree default responses before production rollout.
| Sink category | Typical APIs instrumented | Weakness (CWE) | IAST output | Typical RASP default |
|---|---|---|---|---|
| Database query | JDBC, ADO.NET, ORM raw query methods | CWE-89 SQL Injection | Tainted parameter reaching query text | Block when query structure changes |
| Operating system command | Process creation and shell execution APIs | CWE-78 OS Command Injection | Tainted data in command or arguments | Block; alert |
| File system | File open, read, write and include functions | CWE-22 Path Traversal | Tainted path outside the expected base | Block traversal outside allowed directories |
| Outbound HTTP | HTTP client libraries, URL fetchers | CWE-918 Server-Side Request Forgery | Tainted host or URL | Block private, loopback and cloud metadata addresses |
| Deserialisation | Object stream readers, unsafe YAML or XML binders | CWE-502 Deserialization of Untrusted Data | Untrusted bytes reaching a deserialiser | Block classes outside an allowlist |
| XML parsing | XML parsers with external entities enabled | CWE-611 XML External Entity Reference | Parser configured to resolve external entities | Block external entity resolution |
See the Insecure Deserialisation Guide for the deserialisation case in depth.
What RASP does in production
- Exploit blocking at the sink: stop an injected SQL statement, an unexpected system command, a deserialisation of a forbidden class, or an outbound request to an internal metadata address, at the moment it executes.
- Virtual patching: shield a known vulnerable library function until the upgrade ships. See the Virtual Patching and Compensating Controls Guide and the Zero-Day and Exploited Vulnerabilities Guide.
- Runtime integrity: NIST notes RASP can also protect the runtime environment from unwanted changes and tampering.
- Forensics: stack traces and the exact payload at the sink make incident triage faster than reconstructing from proxy logs.
- Responses: SI-7(17) lists warning the user, terminating the session or application, and alerting personnel. Choose per rule; terminating the application is rarely the right default for a shared service.
If you would rather build detection into the application than buy an agent, OWASP AppSensor (an OWASP Incubator project) provides a framework and methodology for application-layer intrusion detection and automated response, built around detection points and response actions defined in the code.
RASP mitigates exploitation of public-facing applications, MITRE ATT&CK T1190 Exploit Public-Facing Application, but it does not fix the underlying flaw. Track every virtual patch to a remediation ticket with a due date.
Choosing between IAST, RASP or both
| Situation | Better fit | Why |
|---|---|---|
| Strong automated test suites, many releases per day | IAST | Findings appear in the normal test run without a separate scan stage |
| Weak test coverage | DAST and SAST first; IAST later | IAST cannot test what nothing exercises |
| Legacy application that cannot be patched quickly | RASP | Virtual patching and sink-level blocking while remediation is planned |
| Polyglot estate with many languages | WAF plus selective RASP | Agent support differs by language and framework version |
| Latency-critical, high-throughput services | IAST in test; RASP only after load testing | Production agents add overhead that must be measured |
| Regulated environment needing control evidence | Both | SA-11(9) and SI-7(17) map directly to assessment objectives |
- Small teams: start with SAST, SCA and DAST in CI, and add IAST on the one or two applications with good tests. RASP is worth it mainly for internet-facing legacy applications.
- Large organisations: standardise agents per language on a platform team, provide them in base images, and give product teams opt-in IAST with central triage.
- Combined products: some agents offer IAST and RASP modes. Keep test and production configurations, data handling and access separate even when the binary is the same.
Deploying agents safely
- Inventory runtimes: list languages, framework versions and application servers, and confirm agent support for each before committing.
- Pilot in test: run IAST mode, or RASP in monitor mode, on one service. Measure response time, CPU, memory and start-up time against a baseline.
- Load test before production: repeat the measurement at peak load. Record acceptable overhead as an explicit service-level objective.
- Production in monitor mode: deploy RASP with blocking off. Review every alert for a full business cycle and tune rules for false positives.
- Enable blocking by rule: turn on protection for high-confidence rules first (command injection, deserialisation, SSRF to metadata addresses), then expand.
- Plan rollback: keep a configuration switch to return to monitor mode and a deployment path to remove the agent entirely, tested in a game day.
- Upgrade like a dependency: pin agent versions, test upgrades in staging, and follow the vendor's or project's security advisories.
Where identity fits
An in-process agent sees everything the application sees: request bodies, session tokens, database results and secrets loaded into memory. It also authenticates to a management or reporting service with its own credential.
- Agent credentials are machine identities: store agent keys in a secrets manager, scope them to one application and environment, and rotate them. See the OWASP CI/CD Top 10 CICD-SEC-6 Insufficient Credential Hygiene Guide.
- Data minimisation: configure redaction for tokens, passwords and personal data in findings and events before they leave the host.
- Console access: the management console can change blocking rules across production; protect it with SSO, MFA and role separation between developers and operations.
- Supply chain: the agent is third-party code running in every protected process. Verify its signatures and treat its distribution channel as you would any critical dependency. See the Software Supply Chain Security Guide.
Detection and measurement
- Send RASP events to the SIEM: blocked and monitored attacks, rule, sink, stack trace hash and application. Correlate with WAF events to see which attacks passed the perimeter.
- Watch agent health: agents disabled, failing to attach after a deploy, or out of date are common silent failures.
| Metric | Applies to | What good looks like |
|---|---|---|
| Route or endpoint coverage during test runs | IAST | Rising towards all externally reachable routes |
| Confirmed true positive rate of findings | IAST | High enough that developers fix without re-triage |
| Median time from IAST finding to fix | IAST | Within your vulnerability SLA |
| Production services with agent attached and healthy | RASP | All in-scope services, checked continuously |
| Rules in blocking mode versus monitor mode | RASP | Rising after tuning, with false positive rate tracked |
| Measured latency overhead at peak | Both | Within the agreed service-level objective |
Framework mapping
| Framework | Reference | How it applies |
|---|---|---|
| NIST SP 800-53 Rev 5 | SA-11(9) Interactive Application Security Testing | Developer must use IAST tools and document results |
| NIST SP 800-53 Rev 5 | SI-7(17) Runtime Application Self-protection | Organisation-defined controls for runtime self-protection |
| NIST SP 800-53 Rev 5 | SA-11(1) Static Code Analysis; SA-11(8) Dynamic Code Analysis; RA-5 Vulnerability Monitoring and Scanning | Companion testing controls |
| NIST CSF 2.0 | PR.PS-06; ID.RA-01; DE.CM-09 | Secure development; vulnerability identification; runtime monitoring |
| NIST SP 800-218 (SSDF) | PW.8 Test executable code | IAST as one method of testing executable code |
| ISO/IEC 27001:2022 Annex A | A.8.29 Security testing in development and acceptance; A.8.16 Monitoring activities | IAST in testing; RASP events in monitoring |
| CIS Controls v8.1 | Control 16 Application Software Security | Application testing and protection |
| MITRE ATT&CK | T1190 Exploit Public-Facing Application | Threat RASP is deployed against |
Common failure patterns
- IAST with no traffic: agent installed in QA, but automated tests cover a fraction of routes, so a clean report is mistaken for a clean application.
- RASP left in monitor mode forever: alerts go to a console nobody watches, and the tool becomes an expensive logger.
- Blocking without load testing: protection mode enabled at peak season, latency rises, and the agent is ripped out under pressure.
- Virtual patch as permanent fix: the vulnerable library stays for years because RASP "covers it", until an upgrade or agent change removes the cover.
- Sensitive data in findings: tokens and personal data copied into a SaaS console because redaction was never configured.
- Unsupported runtime drift: a framework upgrade silently stops the agent from attaching, and nobody monitors agent health.
Practitioner checklist
- Define separately what IAST must achieve (findings before release) and what RASP must achieve (exploitation blocked in production).
- Confirm agent support for every language, framework version and application server in scope.
- Measure route coverage and raise it before relying on IAST results.
- Gate builds on new high-confidence critical IAST findings only.
- Load test every RASP deployment and record an overhead budget.
- Run RASP in monitor mode first, then enable blocking rule by rule with a tested rollback switch.
- Link every virtual patch to a remediation ticket with a due date.
- Store agent credentials in a secrets manager and configure redaction of sensitive data.
- Protect the management console with SSO, MFA and role separation.
- Send RASP events and agent health to the SIEM and alert on agents that stop reporting.
Standards and references
- NIST: SP 800-53 Rev 5 Security and Privacy Controls (SA-11(9), SI-7(17))
- NIST: SP 800-218 Secure Software Development Framework Version 1.1
- OWASP: DevSecOps Guideline v0.3, Interactive Application Security Testing
- OWASP: Benchmark Project
- OWASP: AppSensor Project
- OpenRASP: Project documentation
Related NHI Mgmt Group resources: Application Security Guide · Application Security Testing Buyer's Guide · Mobile App Shielding and RASP Buyers Guide · Virtual Patching and Compensating Controls Guide · Web Application Firewall Guide