Add SBOM enrichment usage CRD field for "package in use" feature#2908
Add SBOM enrichment usage CRD field for "package in use" feature#2908
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5323ad9b41
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if f.enrichmentUsageEnabled { | ||
| managers.EnvVar().AddEnvVarToContainers( | ||
| []apicommon.AgentContainerName{ | ||
| apicommon.CoreAgentContainerName, | ||
| apicommon.SystemProbeContainerName, | ||
| }, |
There was a problem hiding this comment.
Provision system-probe privileges for SBOM enrichment
When f.enrichmentUsageEnabled is true, this path only adds DD_SBOM_ENRICHMENT_USAGE_ENABLED to core-agent/system-probe, but the feature never configures system-probe with the eBPF privileges setup (capabilities/AppArmor) that other system-probe-backed features add. In the common case where users enable SBOM enrichment without also enabling CWS/USM/NPM, system-probe runs without the privileges needed for runtime file-access probes, so the new features.sbom.enrichment.usage.enabled setting does not actually work.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2908 +/- ##
==========================================
+ Coverage 40.08% 40.15% +0.06%
==========================================
Files 320 320
Lines 28075 28107 +32
==========================================
+ Hits 11254 11286 +32
Misses 16012 16012
Partials 809 809
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
5323ad9 to
0e82dde
Compare
0e82dde to
017fd4b
Compare
| if f.enrichmentUsageEnabled { | ||
| managers.EnvVar().AddEnvVarToContainers( | ||
| []apicommon.AgentContainerName{ | ||
| apicommon.CoreAgentContainerName, | ||
| apicommon.SystemProbeContainerName, | ||
| }, |
khewonc
left a comment
There was a problem hiding this comment.
Can you add testing instructions in your PR description?
Add first-class CRD support for sbom.enrichment.usage.enabled, which maps to DD_SBOM_ENRICHMENT_USAGE_ENABLED on both the core agent and system-probe containers. This decouples the "package in use" eBPF-based SBOM enrichment from CWS, matching the new agent config hierarchy.
017fd4b to
b558fd8
Compare
Done. |
|
We tested this in |
Adds a new opt-in values key that sets DD_SBOM_ENRICHMENT_USAGE_ENABLED on the core agent and system-probe to enable runtime "package in use" SBOM enrichment via eBPF. Auto-enables system-probe and hostPID. Requires Agent 7.79.0+. See also: DataDog/datadog-operator#2908 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add datadog.sbom.enrichment.usage.enabled Adds a new opt-in values key that sets DD_SBOM_ENRICHMENT_USAGE_ENABLED on the core agent and system-probe to enable runtime "package in use" SBOM enrichment via eBPF. Auto-enables system-probe and hostPID. Requires Agent 7.79.0+. See also: DataDog/datadog-operator#2908 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: diogo.pereira <diogo.pereira@datadoghq.com>
What does this PR do?
Add first-class CRD support for sbom.enrichment.usage.enabled, which maps to DD_SBOM_ENRICHMENT_USAGE_ENABLED on both the core agent and system-probe containers. This decouples the "package in use" eBPF-based SBOM enrichment from CWS, matching the new agent config hierarchy.
Testing
specs.features.sbom.enrichment.usage.enabledtotruein the CRD.LastSeenRunningin the .json files of the flare sbomfolder.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Write there any instructions and details you may have to test your PR.
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel