Available for:

Cloud Security Misconfigurations

Overview

A misconfiguration finding tells you what is wrong with a cloud resource. Remediate with AI turns that finding into a code change: Datadog builds a prompt that describes the finding, the affected resource, and the fix. From there, you can hand it off to Bits Code to open a pull request, open Cursor with the prompt ready to run, or copy the prompt into the coding agent you already use.

The Next Steps section of a finding side panel, showing a Remediate with AI button under Remediation

Prerequisites

Copying a fix prompt for your own coding agent requires no setup. To have Bits Code generate the fix, you need:

Bits Code resolves fixes most reliably when Datadog knows where the affected resource is defined in your code. See Code Locations for how that mapping is established.

Bits Code usage is billed through AI Credits.

Remediate a finding

  1. Navigate to the Misconfigurations findings page.
  2. Search for @code_location.filename:* to limit the results to findings with a resolved code location. The fix is generated from that code location, so start from one of these findings.
  3. Select a finding to open its side panel.
  4. Under Next Steps > Remediation, click Remediate with AI.
  5. Do one of the following:
    • On the Coding agent tab, click either button:
      • Fix with Cursor: Click Open to open Cursor with a prompt tailored to the finding, so you can run the fix without copying anything.
      • Copy fix prompt: Click Copy, then paste the prompt into the coding agent you already use. The prompt describes the finding and the change required, so the agent can make the fix in your repository.
    • On the Bits Code tab, click either button:
      • Fix with Bits: Bits Code starts a session, locates the code that defines the resource, generates the fix, and opens a pull or merge request in your source control provider for review.
      • Create Automation: Bits Code fixes similar findings for you as they appear, without you opening each one. For more information, see Bits Code Automations.
The Remediate with AI dialog on the Coding agent tab, showing Fix with Cursor and Copy fix prompt options
The Remediate with AI dialog on the Bits Code tab, showing a Fix with Bits button and a Create Automation button

Further reading