This product is not supported for your selected Datadog site. ().

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. Datadog Agent をバージョン 7.41.1 以上に更新します。

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

  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)
    

または、アプリケーションが動作している場所に応じて、次の方法のいずれかを使用します:

Windows コンソールで:

rem Set environment variables
SET DD_IAST_ENABLED=true

rem Start application
dotnet.exe example.dll

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

アプリケーションの構成に以下を追加します。

DD_IAST_ENABLED=true

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 に以下の環境変数の値を追加します。

ENV DD_IAST_ENABLED=true

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

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

以下を環境セクションに追加して、ECS タスク定義 JSON ファイルを更新します。

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

コンテナの Dockerfile に以下の行を追加します。

ENV DD_IAST_ENABLED=true

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

さらにサポートが必要な場合は、[Datadog サポート][5]にお問い合わせください。

その他の参考資料