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 Runtime Code Analysis (IAST) in your service:
Update your Datadog Agent to at least version 7.41.1.
Update your Datadog Tracing Library to at least the minimum version needed to turn on Runtime Code Analysis (IAST). For details, see the Compatibility Requirements below.
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:
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:
Kubernetes
Update your deployment configuration file for APM and add the Runtime Code Analysis (IAST) 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:
To see Runtime Code Analysis (IAST) in action, browse your service and find code-level vulnerabilities in the Vulnerability Explorer.
If you need additional assistance, contact Datadog support.