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

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. 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. アプリケーションの構成に DD_IAST_ENABLED=true 環境変数を追加します。

    コマンドラインから

    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
    

    または、アプリケーションが実行される場所に応じて、以下の方法のいずれかを使用します。

    : 読み取り専用ファイルシステムはサポートされていません。アプリケーションは書き込み可能な /tmp ディレクトリへのアクセス権を持っている必要があります。

    APM 用の構成コンテナを更新するには、docker run コマンドに以下の引数を追加します。

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

    コンテナの Dockerfile に以下の環境変数の値を追加します。

    DD_IAST_ENABLED=true
    

    APM 用のデプロイメント構成ファイルを更新し、IAST 環境変数を追加します。

    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"
      }
    ]
    
  4. サービスを再起動します。

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

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

その他の参考資料