Skip to content

feat(appsec): enable SCA reachability in AWS Lambda - #21366

Open
florentinl wants to merge 5 commits into
mainfrom
flabel/sca-lambda-support
Open

florentinl wants to merge 5 commits into
mainfrom
flabel/sca-lambda-support

Conversation

@florentinl

@florentinl florentinl commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Enable SCA reachability in AWS Lambda. Requires the Lambda startup change; system-tests coverage 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.

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 29, 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/internal/sca/product.py                                         @DataDog/asm-python
releasenotes/notes/sca-lambda-reachability-a8fc1c6bace052a5.yaml        @DataDog/apm-python
tests/appsec/architectures/test_appsec_loading_modules.py               @DataDog/asm-python
tests/appsec/integrations/flask_tests/test_sca_flask_testagent.py       @DataDog/asm-python
tests/internal/test_serverless.py                                       @DataDog/apm-serverless @DataDog/asm-python @DataDog/serverless-aws @DataDog/serverless-azure-and-gcp

@cit-pr-commenter-54b7da

cit-pr-commenter-54b7da Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Dependency direction analysis

⚠️ Existing dependency direction violations

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

Show existing violations (showing 5 of 106 highest severity)
ddtrace.internal.tracemethods -×-> ddtrace.trace  (internal-core -> product:tracing, score=122)
ddtrace.llmobs._evaluators.runner -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.base -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._telemetry -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)
ddtrace.llmobs._integrations.crewai -×-> ddtrace.trace  (product:llmobs -> product:tracing, score=120)

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

@pr-commenter

pr-commenter Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-10-29 14:56:11

Comparing candidate commit f593881 in PR branch flabel/sca-lambda-support with baseline commit 4666770 in branch main.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 87 metrics, 0 unstable metrics.

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 ----------------------------------'

@florentinl
florentinl marked this pull request as ready for review October 29, 2026 13:36
@florentinl
florentinl requested review from a team as code owners October 29, 2026 13:36
@florentinl
florentinl requested review from Lewis-E, eliottness, lym953 and ncybul and removed request for a team October 29, 2026 13:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-10-29T14:42:11.705256Z f593881 New commits
🔒 Security Review ✅ Completed 2026-10-29T14:44:42.320926Z f593881 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.

@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: 80c1921050

ℹ️ 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/integrations/flask_tests/test_sca_flask_testagent.py Outdated

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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

SCA activation in Lambda remains gated by DD_APPSEC_SCA_ENABLED. Lambda cold-start overhead remains unmeasured.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 80c1921

@eliottness
eliottness removed their request for review October 30, 2026 09:59
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.

1 participant