[DSEC-79] Add datasecurity Autodiscovery Provider #54136
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.73) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.73 · 561 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.379
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.073
Real PR Conversation Timeline
1 comments
"Review active on #54136"
general
weight: 0.35
vinckama
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->
What does this PR do?
Adds a
datasecurityAutodiscovery config provider that turns Data Security DB scan tasks received over Remote Configuration into one-off runs of thedatasecurityRust check.It follows the same provider pattern as the datastream providers, with the flow:
1. Registered only when
data_security.enabledandshared_library_check.enabledare set to true (off by default), then waits until at least onepostgresintegration is configured before subscribing to RC.2. Subscribes to RC product
DATA_SECURITY_DB_SCAN_TASKS.3. On each RC scan task, resolves the local database connection by matching the task's entity against the configured
postgresinstances following the same spirit of Data Observability.4. Builds and schedules a one-off
datasecuritycheck (min_collection_interval: 0) with the resolved connection.Motivation
Implements the Data Security RFC, reusing the same Autodiscovery-provider pattern as the Kafka actions provider (see POC #53908) and the Data Observability query actions for matching and extracting postgres auth info.
Describe how you validated your changes
Validated end-to-end on a host that has an available postgres database configured through a
postgresintegration instance.Since
DATA_SECURITY_DB_SCAN_TASKSis not provisioned yet, the scan task was pushed over the genericDEBUGRC product. The provider matched the task entity against the localpostgresinstance, resolved the connection, and scheduled a one-offdatasecuritycheck. The Rust check was triggered and sent the scan results to thesds-resultEVP intake.Example RC payload used to trigger the scan:
<details>
<summary>DATA_SECURITY_DB_SCAN_TASKS RC payload (pushed via DEBUG)</summary>
</details>
Generated docker image with the rust check shipped:
registry.ddbuild.io/ci/datadog-agent/agent:v127635035-7bcede75-7-amd64Additional Notes
data_security.enabled(defaultfalse), so there is no behavior change unless explicitly enabled.Action items
datasecuritycheck before merge. It was enabled (commitdatasecurity: enable datasecurity check) only to validate end-to-end; keeping it packaged bundles the ~3.66 MiB.soand fails the static quality gates.