Skip to content

Use the CVE file override for Java and Python SCA tests - #8224

Open
florentinl wants to merge 18 commits into
mainfrom
flabel/python-lambda-sca
Open

florentinl wants to merge 18 commits into
mainfrom
flabel/python-lambda-sca

Conversation

@florentinl

@florentinl florentinl commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Exercise SCA reachability with language-native synthetic advisories supplied through _DD_APPSEC_SCA_CVE_FILE, without modifying installed tracer files or Java bootstrap options.

Manifests enable all five tests for Java and Java Lambda from v1.69.0-SNAPSHOT, which includes dd-trace-java#13285, and regular Python from v4.17.0-rc1. Test activation depends on the manifests rather than SYSTEM_TESTS_DEV_MODE. Python Lambda remains gated on dd-trace-py#21366 and datadog-lambda-python#880.

Testing

All 130 related manifest, scenario and CI-selection tests pass, along with repository formatting and checks. Another 120 activation checks verify manifest resolution for supported and unsupported builds with dev mode unset, false and true.

CI on the preceding head 84680b6ab passed all five SCA tests for both Java and Java Lambda using master artifact 1.69.0-SNAPSHOT+1724636081. The final Python activation-guard removal is covered by the local checks above; end-to-end CI for that update is pending.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/java.yml                                                      @DataDog/system-tests-reviewers
manifests/java_lambda.yml                                               @DataDog/system-tests-reviewers
manifests/python.yml                                                    @DataDog/system-tests-reviewers
manifests/python_lambda.yml                                             @DataDog/system-tests-reviewers
tests/appsec/test_sca_reachability.py                                   @DataDog/asm-libraries
utils/_context/_scenarios/appsec.py                                     @DataDog/system-tests-core
utils/_context/_scenarios/aws_lambda.py                                 @DataDog/system-tests-core
utils/build/docker/java/spring-boot/src/main/java/com/datadoghq/system_tests/springboot/ScaReachability.java  @DataDog/system-tests-reviewers
utils/build/docker/java_lambda/src/main/java/com/datadoghq/lambda/ScaReachability.java  @DataDog/system-tests-reviewers
utils/build/docker/python/flask/app.py                                  @DataDog/system-tests-reviewers
utils/build/docker/python/flask/app.sh                                  @DataDog/system-tests-reviewers
utils/build/docker/python/flask/uwsgi_app.sh                            @DataDog/system-tests-reviewers
utils/build/docker/python_lambda/function/handler.py                    @DataDog/system-tests-reviewers

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

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

@florentinl florentinl changed the title Add Python Lambda SCA reachability coverage Use synthetic SCA advisories for regular and Lambda weblogs Nov 3, 2026
@florentinl florentinl changed the title Use synthetic SCA advisories for regular and Lambda weblogs Use the CVE file override for Java and Python SCA tests Nov 6, 2026
@florentinl
florentinl force-pushed the flabel/python-lambda-sca branch from d247d83 to fedcecf Compare November 6, 2026 10:17
gh-worker-dd-mergequeue-cf854d Bot pushed a commit to DataDog/dd-trace-py that referenced this pull request Nov 9, 2026
## Description

Enable SCA reachability in AWS Lambda. Requires the [Lambda startup change](DataDog/datadog-lambda-python#880); [system-tests coverage](DataDog/system-tests#8224) is separate.

## Testing

127 SCA tests, 12 regular/Lambda Flask telemetry cases, and five Lambda reachability checks pass on Colima. The Lambda reachability case fails with the old exclusion restored. Lint passes.

## Risks

Lambda cold-start overhead is unmeasured.


Co-authored-by: florentin.labelle <florentin.labelle@datadoghq.com>
@florentinl
florentinl marked this pull request as ready for review November 10, 2026 13:33
@florentinl
florentinl requested review from a team as code owners November 10, 2026 13:33
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T13:56:19.293209Z f31e0b5 Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4fedfc9d3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/appsec/test_sca_reachability.py Resolved
Comment thread utils/_context/_scenarios/_core/sca.py Resolved
@florentinl
florentinl force-pushed the flabel/python-lambda-sca branch from e4fedfc to 94f8739 Compare November 16, 2026 12:27

@cbeauchesne cbeauchesne left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

tests/appsec/sca/<lang>/advisories.json are part of scenario definition. As the content is quite small, can you move it as bare python inside utils/_context/_scenarios/appsec.py ?

With that, no need to modify libraries_and_scenarios, and no risk to skip a scenario on a later PR.

@florentinl
florentinl force-pushed the flabel/python-lambda-sca branch from 4b5b377 to 46c433e Compare November 19, 2026 09:40
@florentinl
florentinl marked this pull request as draft November 19, 2026 09:52
Keep the tracer-native catalogs in appsec.py and generate the read-only JSON files for the existing regular and Lambda scenarios. Let the Lambda SCA scenario select its libraries without a separate CI rule.
@florentinl
florentinl force-pushed the flabel/python-lambda-sca branch from 46c433e to 9182df2 Compare November 19, 2026 09:56
Avoid the prohibited cross-scenario import. Keeping each catalog in its own scenario definition also lets CI select the right scenario for fixture edits without changing selection rules.
@florentinl
florentinl marked this pull request as ready for review November 19, 2026 13:54
The three production Flask variants use ddtrace 4.17.1, which predates the catalog override in dd-trace-py #21534. All three development variants pass with 4.18.0-rc1; use that as the minimum version.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants