Skip to content

chore(appsec): support overriding the SCA CVE data file - #21534

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
flabel/sca-cve-file-override
Nov 6, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
flabel/sca-cve-file-override

Conversation

@florentinl

Copy link
Copy Markdown
Contributor

Description

Add _DD_APPSEC_SCA_CVE_FILE to load SCA vulnerability targets from a local JSON file instead of the bundled catalog. This enables synthetic test advisories and catalog updates without changing the tracer package. The override uses the existing loader and version filtering, replaces the bundle without merging, and does not enable SCA.

Testing

All 131 SCA tests pass on Python 3.14, including override, version filtering, empty catalog, and missing or malformed file cases. Full lint checks and configuration registry validation pass. No benchmark scenario specifically exercises CVE file loading, so startup performance was not measured.

Risks

An unreadable override or invalid JSON loads no targets and does not fall back to the bundle. An unset variable preserves the bundled catalog.

@florentinl florentinl added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 5, 2026
@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codeowners resolved as

Resolved from the full PR diff against main using the target branch CODEOWNERS file.
CODEOWNERS team requests not listed below are not required by the current file set.

ddtrace/appsec/sca/_cve_loader.py                                       @DataDog/asm-python
ddtrace/internal/settings/_supported_configurations.py                  @DataDog/apm-python
ddtrace/internal/settings/appsec_telemetry.py                           @DataDog/asm-python
docs/configuration.rst                                                  @DataDog/python-guild
supported-configurations.json                                           @DataDog/apm-python
tests/appsec/sca/test_cve_loader.py                                     @DataDog/asm-python

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

There are 89 dependency direction violations that already exist on the base branch and have not been changed by this PR.

Show existing violations (showing 5 of 89 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=120)
ddtrace.llmobs._integrations.pydantic_ai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=118)
ddtrace.llmobs._integrations.openai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=118)
ddtrace.llmobs._integrations.typesafe -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=118)
ddtrace.llmobs._integrations.vertexai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=118)

To see all violations, download the layers-base.json and layers-pr.json artifacts from this CI job and run:

uv run --script scripts/import-analysis/layers.py compare layers-base.json layers-pr.json

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c665473 | Docs | View more details | Give us feedback!

@florentinl florentinl changed the title feat(appsec): support overriding the SCA CVE data file chore(appsec): support overriding the SCA CVE data file Nov 5, 2026
@pr-commenter

pr-commenter Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-06 10:09:19

Comparing candidate commit c665473 in PR branch flabel/sca-cve-file-override with baseline commit 6716a1d in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 578 metrics, 10 unstable metrics, 1 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:coreapiscenario-context_with_data_listeners

  • unstable execution_time [-743.808ns; +730.544ns] or [-6.930%; +6.807%]

scenario:coreapiscenario-core_dispatch_1_listener

  • unstable execution_time [-30.386ns; +40.528ns] or [-4.397%; +5.864%]

scenario:coreapiscenario-core_dispatch_50_listeners

  • unstable execution_time [-2034.265ns; +1817.643ns] or [-10.113%; +9.037%]

scenario:coreapiscenario-core_dispatch_exception_listeners

  • unstable execution_time [-1882.832ns; +1737.983ns] or [-9.864%; +9.105%]

scenario:coreapiscenario-core_dispatch_listeners

  • unstable execution_time [-386.547ns; +373.908ns] or [-8.967%; +8.674%]

scenario:coreapiscenario-core_dispatch_no_args_listeners

  • unstable execution_time [-219.473ns; +231.143ns] or [-8.112%; +8.543%]

scenario:coreapiscenario-core_dispatch_with_results_1_listener

  • unstable execution_time [-104.005ns; +76.786ns] or [-7.200%; +5.316%]

scenario:coreapiscenario-core_dispatch_with_results_50_listeners

  • unstable execution_time [-5173.093ns; +4647.576ns] or [-10.123%; +9.094%]

scenario:coreapiscenario-core_dispatch_with_results_listeners

  • unstable execution_time [-1180.858ns; +836.390ns] or [-10.958%; +7.762%]

scenario:packagesupdateimporteddependencies-import_many_stdlib_cached

  • unstable execution_time [-55423.674ns; +56554.261ns] or [-9.471%; +9.664%]

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

Known flaky benchmarks without significant changes:

  • scenario:packagespackageforrootmodulemapping-cache_off

@florentinl
florentinl marked this pull request as ready for review November 6, 2026 09:13
@florentinl
florentinl requested review from a team as code owners November 6, 2026 09:13
@florentinl
florentinl requested review from christophe-papazian and removed request for a team November 6, 2026 09:13
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T09:44:58.003618Z c665473 New commits
🔒 Security Review ✅ Completed 2026-11-06T09:47:19.390144Z c665473 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@florentinl
florentinl requested a review from avara1986 November 6, 2026 09:13

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The override preserves existing version filtering and SCA enablement behavior. Unreadable or malformed override files intentionally yield no targets without falling back to the bundled catalog; no reportable defect was identified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 932c6fa

Comment thread ddtrace/appsec/sca/_cve_loader.py Resolved
@florentinl
florentinl force-pushed the flabel/sca-cve-file-override branch from 932c6fa to c665473 Compare November 6, 2026 09:43
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 9fff792 into main Nov 6, 2026
852 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the flabel/sca-cve-file-override branch November 6, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants