Runtime Code Analysis (IAST)

Overview

Datadog Runtime Code Analysis (IAST) identifies code-level vulnerabilities in your services, using an Interactive Application Security Testing (IAST) approach to find vulnerabilities within your application code based on your Datadog application instrumentation.

IAST enables Datadog to identify vulnerabilities using legitimate application traffic instead of relying on external tests that could require extra configuration or periodic scheduling. It also monitors your code’s interactions with other components of your stack, such as libraries and infrastructure, providing an up-to-date view of your attack surface area.

For a list of supported services, see the Library Compatibility Requirements. IAST detection rules support the following languages:

SeverityDetection RuleCodeJava.NETNode.jsPython
CriticalNoSQL InjectionNOSQL_MONGODB_INJECTIONFALSETRUETRUEFALSE
CriticalSQL InjectionSQL_INJECTIONTRUETRUETRUETRUE
CriticalServer-Side Request Forgery (SSRF)SSRFTRUETRUETRUETRUE
CriticalCode InjectionCODE_INJECTIONFALSEFALSETRUEFALSE
CriticalCommand InjectionCOMMAND_INJECTIONTRUETRUETRUETRUE
HighLDAP InjectionLDAP_INJECTIONTRUETRUETRUEFALSE
HighEmail HTML InjectionEMAIL_HTML_INJECTIONTRUETRUETRUEFALSE
HighHardcoded SecretsHARDCODED_SECRETTRUETRUEFALSEFALSE
HighHardcoded PasswordsHARDCODED_PASSWORDFALSEFALSETRUEFALSE
HighPath TraversalPATH_TRAVERSALTRUETRUETRUETRUE
HighTrust Boundary ViolationTRUST_BOUNDARY_VIOLATIONTRUETRUEFALSEFALSE
HighCross-Site Scripting (XSS)XSSTRUETRUEFALSEFALSE
HighUntrusted DeserializationUNTRUSTED_DESERIALIZATIONTRUEFALSEFALSEFALSE
HighUnvalidated RedirectUNVALIDATED_REDIRECTTRUETRUETRUEFALSE
HighXPath InjectionXPATH_INJECTIONTRUETRUEFALSEFALSE
HighHeader InjectionHEADER_INJECTIONTRUETRUETRUETRUE
HighDirectory Listing LeakDIRECTORY_LISTING_LEAKTRUEFALSEFALSEFALSE
HighDefault HTML Escape InvalidDEFAULT_HTML_ESCAPE_INVALIDTRUEFALSEFALSEFALSE
HighVerb TamperingVERB_TAMPERINGTRUEFALSEFALSEFALSE
MediumNo SameSite CookieNO_SAMESITE_COOKIETRUETRUETRUETRUE
MediumInsecure CookieINSECURE_COOKIETRUETRUETRUETRUE
MediumNo HttpOnly CookieNO_HTTPONLY_COOKIETRUETRUETRUETRUE
MediumWeak HashingWEAK_HASHTRUETRUETRUETRUE
MediumWeak CipherWEAK_CIPHERTRUETRUETRUETRUE
MediumStacktrace LeakSTACKTRACE_LEAKTRUETRUEFALSEFALSE
MediumReflection InjectionREFLECTION_INJECTIONTRUETRUEFALSEFALSE
MediumInsecure Authentication ProtocolINSECURE_AUTH_PROTOCOLTRUETRUEFALSEFALSE
MediumHardcoded KeyHARDCODED_KEYFALSETRUEFALSEFALSE
MediumInsecure JSP LayoutINSECURE_JSP_LAYOUTTRUEFALSEFALSEFALSE
LowHSTS Header MissingHSTS_HEADER_MISSINGTRUETRUETRUEFALSE
LowX-Content-Type-Options Header MissingXCONTENTTYPE_HEADER_MISSINGTRUETRUETRUEFALSE
LowWeak RandomnessWEAK_RANDOMNESSTRUETRUETRUETRUE
LowAdmin Console ActiveADMIN_CONSOLE_ACTIVETRUEFALSEFALSEFALSE
LowSession TimeoutSESSION_TIMEOUTTRUEFALSEFALSEFALSE
LowSession RewritingSESSION_REWRITINGTRUEFALSEFALSEFALSE

How IAST detects vulnerabilities

Datadog Runtime Code Analysis (IAST) utilizes the same tracing libraries as Datadog APM, enabling it to monitor live application traffic and detect code-level vulnerabilities in real time. It follows this process:

  • Tracking data sources:: IAST observes data entering your application from external sources such as request URLs, bodies, or headers. These inputs are tagged and monitored throughout their lifecycle.
  • Analyzing data flow: The Datadog tracing library tracks how the input data moves through the application—even if it’s transformed, split, or combined. This allows IAST to understand if and how the original input reaches sensitive parts of the code.
  • Identifying vulnerable points: IAST detects code locations where user-controlled inputs are used in potentially insecure ways—for example, in SQL queries, dynamic code execution, or HTML rendering.
  • Confirming the vulnerability: A vulnerability is only reported when IAST can confirm that tainted input reaches a vulnerable point in the code. This approach minimizes false positives and ensures that findings are actionable.

Explore and manage code vulnerabilities

The Vulnerability Explorer uses real-time threat data to help you understand vulnerabilities endangering your system. Vulnerabilities are ordered by severity.

Code Security in the Vulnerability Explorer

To triage vulnerabilities, each vulnerability contains a brief description of the issue, including:

  • Impacted services.
  • Vulnerability type.
  • First detection.
  • The exact file and line number where the vulnerability was found.
Code Security vulnerability details

Each vulnerability detail includes a risk score (see screenshot below) and a severity rating: critical, high, medium, or low.

The risk score is tailored to the specific runtime context, including factors such as where the vulnerability is deployed and whether the service is targeted by active attacks.

Code Security vulnerability prioritization

Remediate a code vulnerability

Datadog Code Security automatically provides the information teams need to identify where a vulnerability is in an application, from the affected filename down to the exact method and line number.

Code Security vulnerability remediation

When the GitHub integration is enabled, Code Security shows the first impacted version of a service, the commit that introduced the vulnerability, and a snippet of the vulnerable code. This information gives teams insight into where and when a vulnerability occurred and helps to prioritize their work.

Code vulnerability snippet

Detailed remediation steps are provided for each detected vulnerability.

Remediation recommendations

Recommendations enable you to change the status of a vulnerability, assign it to a team member for review, and create a Jira issue for tracking.

creating a Jira ticket from a vulnerability

Note: To create Jira issues for vulnerabilities, you must configure the Jira integration, and have the manage_integrations permission. For detailed instructions, see the Jira integration documentation, as well as the Role Based Access Control documentation.

Enable Runtime Code Analysis (IAST)

To enable IAST, configure the Datadog Tracing Library. Detailed instructions for both methods can be found in the Security > Code Security > Settings section.

If you need additional help, contact Datadog support.

Disable Code Security

For information on disabling IAST, see Disabling Code Security.