IAST Setup

Prerequisites

Before setting up Code Security, ensure the following prerequisites are met:

  1. Datadog Agent Installation: The Datadog Agent is installed and configured for your application’s operating system or container, cloud, or virtual environment.
  2. Datadog APM Configuration: Datadog APM is configured for your application or service, and web traces (type:web) are being received by Datadog.
  3. Supported Tracing Library: The Datadog Tracing Library used by your application or service supports Code Security capabilities for the language of your application or service. For more details, refer to the Compatibility Requirements section below.

Using Datadog Tracing Libraries

Select your application language for details on how to enable Code Security for your language and infrastructure types.

You can detect code-level vulnerabilities and monitor application security in Java applications running in Docker, Kubernetes, Amazon ECS, and AWS Fargate.

Follow these steps to enable Code Security in your service:

  1. Update your Datadog Agent to at least version 7.41.1.

  2. Update your Datadog Tracing Library to at least the minimum version needed to turn on Code Security. For details, see the Compatibility Requirements below.

  3. Add the DD_IAST_ENABLED=true environment variable to your application configuration.

    From the command line:

    java -javaagent:/path/to/dd-java-agent.jar -Ddd.iast.enabled=true -Ddd.service=<MY SERVICE> -Ddd.env=<MY_ENV> -jar path/to/app.jar
    

    Or one of the following orchestration tool methods, depending on where your application runs.

    Note: Read-only file systems are not supported. The application must have access to a writable /tmp directory.

Docker CLI

Update your configuration container for APM by adding the following argument in your docker run command:

docker run [...] -e DD_IAST_ENABLED=true [...]

Dockerfile

Add the following environment variable value to your container Dockerfile:

DD_IAST_ENABLED=true

Kubernetes

Update your deployment configuration file for APM and add the IAST environment variable:

spec:
  template:
    spec:
      containers:
        - name: <CONTAINER_NAME>
          image: <CONTAINER_IMAGE>/<TAG>
          env:
            - name: DD_IAST_ENABLED
              value: "true"

Amazon ECS

Update your ECS task definition JSON file, by adding this in the environment section:

"environment": [
  ...,
  {
    "name": "DD_IAST_ENABLED",
    "value": "true"
  }
]

You can detect code-level vulnerabilities and monitor application security in .NET applications running in Docker, Kubernetes, Amazon ECS, and AWS Fargate.

Follow these steps to enable Code Security in your service:

  1. Update your Datadog Agent to at least version 7.41.1.

  2. Update your Datadog Tracing Library to at least the minimum version needed to turn on Code Security. For details, see the Compatibility Requirements below.

  3. Add the DD_IAST_ENABLED=true environment variable to your application configuration. For example, on Windows self-hosted, run the following PowerShell snippet as part of your application start-up script:

    $target=[System.EnvironmentVariableTarget]::Process
    [System.Environment]::SetEnvironmentVariable("DD_IAST_ENABLED","true",$target)
    

Or one of the following methods, depending on where your application runs:

Windows-Self-Hosted

In a Windows console:

rem Set environment variables
SET DD_IAST_ENABLED=true

rem Start application
dotnet.exe example.dll

IIS

Run the following PowerShell command as administrator to configure the necessary environment variables in the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and restart IIS.

$target=[System.EnvironmentVariableTarget]::Machine
[System.Environment]::SetEnvironmentVariable("DD_IAST_ENABLED","true",$target)
net stop was /y
net start w3svc

Linux

Add the following to your application configuration:

DD_IAST_ENABLED=true

Docker CLI

Update your configuration container for APM by adding the following argument in your docker run command:

docker run -d --name app -e DD_IAST_ENABLED=true company/app:latest

Dockerfile

Add the following environment variable value to your container Dockerfile:

ENV DD_IAST_ENABLED=true

Kubernetes

Update your deployment configuration file for APM and add the ASM environment variable:

spec:
  template:
    spec:
      containers:
        - name: <CONTAINER_NAME>
          image: <CONTAINER_IMAGE>/<TAG>
          env:
            - name: DD_IAST_ENABLED
              value: "true"

AWS ECS

Update your ECS task definition JSON file, by adding this in the environment section:

"environment": [
  ...,
  {
    "name": "DD_IAST_ENABLED",
    "value": "true"
  }
]

AWS Fargate

Add the following line to your container Dockerfile:

ENV DD_IAST_ENABLED=true

To see Code Security in action, browse your service and find code-level vulnerabilities in the Vulnerability Explorer.

If you need additional assistance, contact Datadog support.

You can detect code-level vulnerabilities and monitor application security in Node.js applications running in Docker, Kubernetes, Amazon ECS, and AWS Fargate.

Follow these steps to enable Code Security in your service:

  1. Update your Datadog Agent to at least version 7.41.1.

  2. Update your Datadog Tracing Library to at least the minimum version needed to turn on Code Security. For details, see the Compatibility Requirements below.

  3. Add the DD_IAST_ENABLED=true environment variable to your application configuration.

    If you initialize the APM library on the command line using the --require option to Node.js:

    node --require dd-trace/init app.js
    

    Then use environment variables to enable ASM:

    DD_IAST_ENABLED=true node app.js
    

    How you do this varies depending on where your service runs:

Docker CLI

Update your configuration container for APM by adding the following argument in your docker run command:

docker run [...] -e DD_IAST_ENABLED=true [...]

Dockerfile

Add the following environment variable value to your container Dockerfile:

ENV DD_IAST_ENABLED=true

Kubernetes

Update your configuration yaml file container for APM and add the AppSec env variable:

spec:
  template:
    spec:
      containers:
        - name: <CONTAINER_NAME>
          image: <CONTAINER_IMAGE>/<TAG>
          env:
            - name: DD_IAST_ENABLED
              value: "true"

Amazon ECS

Update your ECS task definition JSON file, by adding this in the environment section:

"environment": [
  ...,
  {
    "name": "DD_IAST_ENABLED",
    "value": "true"
  }
]

You can detect code-level vulnerabilities and monitor application security in Python applicationss running in Docker, Kubernetes, Amazon ECS, and AWS Fargate.

NOTE: Code-Level Vulnerability detection in Python is in Preview.

Follow these steps to enable Code Security in your service:

  1. Update your Datadog Agent to at least version 7.41.1.

  2. Update your Datadog Tracing Library to at least the minimum version needed to turn on Code Security. For details, see the Compatibility Requirements below.

  3. Add the DD_IAST_ENABLED=true environment variable to your application configuration.

    From the command line:

    DD_IAST_ENABLED=true ddtrace-run python app.py
    

    Or one of the following methods, depending on where your application runs:

Docker CLI

Update your configuration container for APM by adding the following argument in your docker run command:

docker run [...] -e DD_IAST_ENABLED=true [...]

Dockerfile

Add the following environment variable value to your container Dockerfile:

DD_IAST_ENABLED=true

Kubernetes

Update your deployment configuration file for APM and add the IAST environment variable:

spec:
  template:
    spec:
      containers:
        - name: <CONTAINER_NAME>
          image: <CONTAINER_IMAGE>/<TAG>
          env:
            - name: DD_IAST_ENABLED
              value: "true"

Amazon ECS

Update your ECS task definition JSON file, by adding this in the environment section:

"environment": [
  ...,
  {
    "name": "DD_IAST_ENABLED",
    "value": "true"
  }
]

Third-Party Library Compatibility Note

Code Security modifies Python code at runtime. This could cause conflicts with other third-party Python libraries that perform similar code transformations, particularly with the following, though not limited to them:

  • Numba
  • JAX
  • TorchScript
  • TensorFlow
  • Bytecode
  • Codetransformer
  • PyPy

Additionally, Code Security does not correctly propagate taint ranges over native (compiled) code. Therefore, if your codebase heavily relies on modules written in C or C++, using the CPython API, or on intermediate language systems like Cython, the results might be less accurate than expected.

Finishing setup

  1. Restart your service.
  2. To see Code Security in action, browse your service and find code-level vulnerabilities in the Vulnerability Explorer.

If you need additional assistance, contact Datadog support.

Compatibility Requirements

The following ASM capabilities are supported relative to each language’s tracing library:

Application Security capabilityJava.NETNode.jsPythonGoRubyPHP
Code Security1.15.02.42.04.18.0Previewnot supportednot supportednot supported

Select your application language for details about framework compatibility and feature support.

Application Security capabilities

The following application security capabilities are supported in the Java library, for the specified tracer version:

Application Security capabilityMinimum Java tracer version
Threat Detection1.8.0
API Security1.31.0
Threat Protection1.9.0
Customize response to blocked requests1.11.0
Software Composition Analysis (SCA)1.1.4
Code Security1.15.0
Automatic user activity event tracking1.20.0

The minimum tracer version to get all supported application security capabilities for Java is 1.31.0.

Note: Threat Protection requires enabling Remote Configuration, which is included in the listed minimum tracer version.

Supported deployment types

TypeThreat Detection supportSoftware Composition Analysis
Docker
Kubernetes
Amazon ECS
AWS Fargate
AWS Lambda
Azure App Service

Note: Azure App Service is supported for web applications only. Application Security doesn’t support Azure Functions.

Language and framework compatibility

Supported Java versions

The Java Tracer supports automatic instrumentation for the following Oracle JDK and OpenJDK JVM runtimes.

JVM versionsOperating SystemsSupport levelTracer version
8 to 17Windows (x86-64)
Linux (glibc, musl) (arm64, x86-64)
MacOS (arm64, x86-64)
SupportedLatest

Datadog does not officially support any early-access versions of Java.

Web framework compatibility

  • Attacker source HTTP request details
  • Tags for the HTTP request (status code, method, etc)
  • Distributed Tracing to see attack flows through your applications
Application Security Capability Notes
  • Software Composition Analysis is supported on all frameworks
  • If Code Security does not support your framework, it will still detect Weak Cipher, Weak Hashing, Insecure Cookie, Cookie without HttpOnly Flag, and Cookie without SameSite Flag vulnerabilities.
FrameworkVersionsThreat Detection supported?Threat Protection supported?Code Security?
Grizzly2.0+
Glassfish
Java Servlet2.3+, 3.0+
Jetty7.0-9.x, 10.x
Spring Boot1.5
Spring Web (MVC)4.0+
Spring WebFlux5.0+
Tomcat5.5+
Vert.x3.4-3.9.x

Note: Many application servers are Servlet compatible and are automatically covered by that instrumentation, such as Websphere, Weblogic, and JBoss. Also, frameworks like Spring Boot (version 3) inherently work because they usually use a supported embedded application server, such as Tomcat, Jetty, or Netty.

If you don't see your framework of choice listed, let us know! Fill out this short form to send details.

Networking framework compatibility

dd-java-agent includes support for automatically tracing the following networking frameworks.

Networking tracing provides:

  • Distributed tracing through your applications
  • Request-based blocking
Application Security Capability Notes
  • Software Composition Analysis is supported on all frameworks
  • If Code Security does not support your framework, it will still detect Weak Cipher, Weak Hashing, Insecure Cookie, Cookie without HttpOnly Flag, and Cookie without SameSite Flag vulnerabilities.
FrameworkVersionsThreat Detection supported?Threat Protection supported?Code Security?
Apache HTTP Client4.0+
gRPC1.5+
HttpURLConnectionall
Jax RS Clients2.0+
Jersey Server1.9-2.29
Netty HTTP Server3.8+
RESTEasy3.0.x
Spring SessionAwareMessageListener3.1+
If you don't see your framework of choice listed, let us know! Fill out this short form to send details.

Data store compatibility

dd-java-agent includes support for automatically tracing the following database frameworks/drivers.

Datastore tracing provides:

  • Timing request to response
  • Query info (for example, a sanitized query string)
  • Error and stacktrace capturing
Application Security Capability Notes
  • Software Composition Analysis is supported on all frameworks
  • Threat Protection also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below.
  • If your framework is not supported below, Code Security won’t detect SQL Injection vulnerabilities, but will still detect the rest of vulnerability types listed here.
DatabaseVersionsThreat Detection supported?Code Security?
Aerospike4.0+
Couchbase2.0+
JDBCN/A
MongoDB3.0-4.0+

dd-java-agent is also compatible with common JDBC drivers for Threat Detection, such as:

  • Apache Derby
  • Firebird SQL
  • H2 Database Engine
  • HSQLDB
  • IBM DB2
  • MariaDB
  • MSSQL (Microsoft SQL Server)
  • MySQL
  • Oracle
  • Postgres SQL
  • ScalikeJDBC
If you don't see your framework of choice listed, let us know! Fill out this short form to send details.

User Authentication Frameworks compatibility

Integrations to User Authentication Frameworks provide:

  • User login events, including the user IDs
  • Account Takeover detection monitoring for user login events
FrameworkMinimum Framework Version
Spring Security5.5+

Application Security capabilities support

The following application security capabilities are supported in the .NET library, for the specified tracer version:

Application Security capabilityMinimum .NET tracer version
Threat Detection2.23.0
Threat Protection2.26.0
Customize response to blocked requests2.27.0
Software Composition Analysis (SCA)2.16.0
Code Security2.42.0
Automatic user activity event tracking2.32.0
API Security2.42.0

The minimum tracer version to get all supported application security capabilities for .NET is 2.42.0.

Note: Threat Protection requires enabling Remote Configuration, which is included in the listed minimum tracer version.

Supported deployment types

TypeThreat Detection supportSoftware Composition Analysis
Docker
Kubernetes
Amazon ECS
AWS Fargate
AWS Lambda
Azure App Service

Note: Azure App Service is supported for web applications only. Application Security capabilities are not supported for Azure Functions.

Language and framework compatibility

Supported .NET versions

.NET Framework VersionMicrosoft End of LifeSupport levelPackage version
4.8GAlatest
4.7.2GAlatest
4.7GAlatest
4.6.2GAlatest
4.6.104/26/2022GAlatest

These are supported on the following architectures:

  • Linux (GNU) x86-64, ARM64
  • Alpine Linux (musl) x86-64, ARM64
  • macOS (Darwin) x86-64, ARM64
  • Windows (msvc) x86, x86-64

Web framework compatibility

  • Attacker source HTTP request details
  • Tags for the HTTP request (status code, method, etc)
  • Distributed Tracing to see attack flows through your applications
Application Security capability notes
  • Software Composition Analysis is supported on all frameworks.
  • If your framework is not listed below, Code Security will still detect Insecure Cookie vulnerabilities.
FrameworkThreat Detection supported?Threat Protection supported?Code Security?
ASP.NET MVC
ASP.NET Web API 2
If you don't see your framework of choice listed, let us know! Fill out this short form to send details.

Data store compatibility

Datastore tracing provides:

  • SQL attack detection
  • query info (for example, a sanitized query string)
  • error and stacktrace capturing
Application Security Capability Notes
  • Threat Protection also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below.
FrameworkThreat Detection supported?Threat Protection supported?Code Security?
OracleDB
ADO.NET
SQL Server
MySQL
SQLite

User Authentication Frameworks compatibility

Integrations to User Authentication Frameworks provides:

  • User login events including the user IDs
  • User signup events (apps using built-in SignInManager)
  • Account Takeover detection monitoring for user login events
Framework
> .Net Core 2.1

Application Security capabilities

The following application security capabilities are supported in the Node.js library, for the specified tracer version:

Application Security capabilityMinimum Node.js tracer version
Threat Detection4.0.0
Threat Protection4.0.0
Customize response to blocked requests4.1.0
Software Composition Analysis (SCA)4.0.0
Code Security4.18.0 for Node.js 16+, or 5.0.0 for Node.js 18+
Automatic user activity event tracking4.4.0 for Node.js 16+
API Security4.30.0 for Node.js 16+, or 5.6.0 for Node.js 18+

The minimum tracer version to get all supported application security capabilities for Node.js is 4.30.0.

Note:

  • Threat Protection requires enabling Remote Configuration, which is included in the listed minimum tracer version.

Supported deployment types

TypeThreat Detection supportSoftware Composition Analysis
Docker
Kubernetes
Amazon ECS
AWS Fargate
AWS Lambda

Language and framework compatibility

Node.js Version Support

When the Node.js project drops support for an LTS major release line (when it goes End of Life), support for it is dropped in the next major version of dd-trace. The last major supporting release line of dd-trace library supports that EOL version of Node.js for at least another year on a maintenance mode basis.

Some issues cannot be solved in dd-trace and instead must be solved in Node.js. When this happens and the Node.js release in question is EOL, it’s not possible to solve the issue without moving to another non-EOL release. Datadog does not make new releases of dd-trace to provide specific support for non-LTS Node.js major release lines (odd numbered versions).

For the best level of support, always run the latest LTS release of Node.js, and the latest major version of dd-trace. Whatever release line of Node.js you use, also use the latest version of Node.js on that release line, to ensure you have the latest security fixes.

For more information about Node.js release, see the official Node.js documentation.

Operating system support

The following operating systems are officially supported by dd-trace. Any operating system not listed is still likely to work, but with some features missing, for example application security capabilities, profiling, and runtime metrics. Generally speaking, operating systems that are actively maintained at the time of initial release for a major version are supported.

Operating SystemArchitecturesMinimum Versions
Linux (glibc)arm64, x64CentOS 7, Debian 9, RHEL 7, Ubuntu 14.04
Linux (musl)arm64, x64Alpine 3.13
macOSarm64, x64Catalina (10.15)
Windowsx64Windows 8.1, Windows Server 2012

Web framework compatibility

  • Attacker source HTTP request details
  • Tags for the HTTP request (status code, method, etc)
  • Distributed Tracing to see attack flows through your applications
Application Security Capability Notes
  • Software Composition Analysis is supported on all frameworks
  • If your framework is not listed below, Code Security will still detect Weak Cipher, Weak Hashing, Insecure Cookie, Cookie without HttpOnly Flag, and Cookie without SameSite Flag vulnerabilities.
FrameworkVersionsThreat Detection supported?Threat Protection supported?Code Security?
express>=4
nextjs>=11.1
If you would like to see support added for any of the unsupported capabilities or for your Node.js framework, let us know! Fill out this short form to send details.

Networking framework compatibility

Networking tracing provides:

  • Distributed tracing through your applications
  • Request-based blocking
Application Security capability notes
  • Software Composition Analysis is supported on all frameworks
FrameworkThreat Detection supported?Threat Protection supported?Code Security?
http
https
If you don't see your framework of choice listed, let us know! Fill out this short form to send details.

Data store compatibility

Datastore tracing provides:

  • Timing request to response
  • Query info (for example, a sanitized query string)
  • Error and stacktrace capturing
Application Security capability notes
  • Software Composition Analysis is supported on all frameworks
  • Threat Protection also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below.
FrameworkVersionsThreat Detection supported?Threat Protection supported?Code Security?
@apollo/server>=4
apollo-server-core>=3
cassandra-driver>=3
couchbase^2.4.2
elasticsearch>=10
ioredis>=2
knex>=0.8
mariadb>=3
memcached>=2.2
mongodb-core>=2
mysql>=2
mysql2>=1
oracledb>=5
pg>=4
redis>=0.12
sharedb>=1
tedious>=1
sequelize>=4

User authentication frameworks compatibility

Integrations to User Authentication Frameworks provide:

  • User login events, including the user IDs
  • The Account Takeover detection monitoring the user login events
FrameworkMinimum Framework Version
passport-local1.0.0
passport-http0.3.0

Application Security capabilities support

The following application security capabilities are supported in the Python library, for the specified tracer version:

Application Security capabilityMinimum Python tracer version
Threat Detection1.9.0
Threat Protection1.10.0
Customize response to blocked requests1.19.0
Software Composition Analysis (SCA)1.5.0
Code SecurityPreview (2.9.3)
Automatic user activity event tracking1.17.0
API Security2.6.0

Note: Threat Protection requires enabling Remote Configuration, which is included in the listed minimum tracer version.

Supported deployment types

TypeThreat Detection supportSoftware Composition Analysis
Docker
Kubernetes
Amazon ECS
AWS Fargate
AWS Lambda

Language and framework compatibility

Supported Python versions

The Python Application Security Client library follows a versioning policy that specifies the support level for the different versions of the library and Python runtime.

Two release branches are supported:

ReleaseSupport level
<1Maintenance
>=1.0,<2General Availability

And the library supports the following runtimes:

OSCPURuntimeRuntime versionSupport ddtrace versions
Linuxx86-64, i686, AArch64CPython2.7, 3.5-3.11<2
MacOSIntel, Apple SiliconCPython2.7, 3.5-3.11<2
Windows64bit, 32bitCPython2.7, 3.5-3.11<2

Web framework compatibility

  • Attacker source HTTP request details
  • Tags for the HTTP request (status code, method, etc)
  • Distributed Tracing to see attack flows through your applications
Application Security Capability Notes
  • Software Composition Analysis is supported on all frameworks

Supported frameworks

FrameworkVersionsThreat Detection supported?Threat Protection supported?
Django1.8
Flask0.10

Support for query strings is not available for Flask.

If you don't see your framework of choice listed, let us know! Fill out this short form to send details.

Data store compatibility

Datastore tracing provides:

  • timing request to response
  • query info (for example, a sanitized query string)
  • error and stacktrace capturing
Application Security capability notes
  • Software Composition Analysis is supported on all frameworks.
  • Threat Protection also works at the HTTP request (input) layer, and so works for all databases by default, even those not listed in the table below.

The Python library supports the database API specifications and supports all generic SQL databases. This includes databases such as SQLite, Mysql, Postgres and MariaDB.

User Authentication Frameworks compatibility

Integrations to User Authentication Frameworks provide:

  • User login events, including the user IDs
  • Account Takeover detection monitoring for user login events
FrameworkFramework Versions
Django1.11, 2.2, 3.2, >= 4.0