Skip to content

Test AppSec runtime activation through remote config in smoke tests - #13333

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
APMLP-2199
Nov 12, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
APMLP-2199

Conversation

@jandro996

@jandro996 jandro996 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

What Does This Do

  • In testRuntimeActivation mode (-Dsmoke_test.appsec.enabled=inactive), AbstractAppSecServerSmokeTest now points remote config at the smoke mock agent and activates AppSec once the app is up: it pushes ASM_FEATURES {"asm":{"enabled":true}} in setupSpec and waits for the first RC poll that subscribes to ASM_DD. Specs can opt out with activateAppSecAtRuntime().
  • springboot testRuntimeActivation now runs SpringBootSmokeTest under runtime activation (detection and blocking), next to OtelContextExposureSmokeTest, which stays inactive.
  • springboot-graphql testRuntimeActivation now uses the JUnit platform, so its spec actually runs, with AppSec activated through remote config.
  • The testRuntimeActivation tasks of spring-tomcat7 (IAST-only spec) and springboot-security (no tests) are removed.
  • SpringbootApplication no longer flips ActiveSubsystems.APPSEC_ACTIVE by reflection, and AIGuardSmokeTest drops its opt-out.

Motivation

The testRuntimeActivation tasks were meant to cover AppSec activated at runtime, but nothing activated AppSec anymore: the reflective flip stopped loading WAF rules after #8654, and until APMLP-2186 the tasks ran zero tests. Java's default is inactive, so remote config activation is the path of every customer who does not set DD_APPSEC_ENABLED.

Additional Notes

  • Only boot-time-only features are skipped under runtime activation: RASP LFI and SSRF through java.net.URL. Both use RASP call sites, which are applied only when AppSec is enabled at boot (InstrumenterConfig.isRaspEnabled). Everything else in SpringBootSmokeTest passes: 43 tests, 3 skipped.
  • The full product flow (activation, blocking, deactivation across frameworks) is already covered by system-tests APPSEC_RUNTIME_ACTIVATION, which runs in this repo's CI. These smoke tests cover the dd-trace-java specific features under activation.
  • With dd.appsec.rules, runtime activation still subscribes to ASM_DD, unlike AppSec enabled at boot with custom rules. The wait signal relies on this; it is noted in the code and tracked as a follow-up.
  • AbstractSmokeTest.remoteConfigResponse now starts as "{}": before the first feature, early RC polls got a 500 from the mock.
  • This branch does not include Fix test tasks that pass without running any tests #13274 (no @IgnoreIf on the GraphQL detection feature here).

Contributor Checklist

Jira ticket: APMLP-2199

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

- Point remote config at the smoke mock agent in inactive mode and activate
  AppSec in setupSpec with ASM_FEATURES, waiting for the ASM_DD poll
- Run SpringBootSmokeTest under runtime activation, skipping only the
  boot-time-only RASP features (LFI, SSRF via java.net.URL)
- Keep OtelContextExposureSmokeTest inactive and run the graphql
  testRuntimeActivation task on the JUnit platform
- Remove the empty testRuntimeActivation tasks of spring-tomcat7 and
  springboot-security, and the reflective APPSEC_ACTIVE flip
- Initialize the mock remote config response so early polls do not get a 500
@jandro996 jandro996 added comp: testing Testing comp: asm waf Application Security Management (WAF) type: bug fix Bug fix tag: no release notes Changes to exclude from release notes labels Nov 10, 2026
@jandro996

Copy link
Copy Markdown
Member Author

@codex review

@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-10T09:31:30.238053Z 03956ae Draft marked ready
🔒 Security Review ✅ Completed 2026-11-10T09:31:30.344859Z 03956ae 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

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 03956ae9f6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 03956ae9f6

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 03956ae9f6

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

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 03956ae9f6

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jandro996
jandro996 marked this pull request as ready for review November 10, 2026 09:28
@jandro996
jandro996 requested review from a team as code owners November 10, 2026 09:28
@jandro996
jandro996 requested review from claponcet, dougqh, manuel-alvarez-alvarez and ygree and removed request for a team November 10, 2026 09:28

@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 activation readiness signal and explicit OTel opt-out align with the intended active and inactive smoke-test scenarios. Runtime behavior remains unverified because the smoke tests were not executed.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 03956ae

@dd-octo-sts

dd-octo-sts Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.97 s 13.96 s [-0.7%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 12.94 s 12.95 s [-0.8%; +0.6%] (no difference)
startup:petclinic:appsec:Agent 17.23 s 17.08 s [+0.1%; +1.6%] (maybe worse)
startup:petclinic:iast:Agent 17.14 s 17.14 s [-1.0%; +0.9%] (no difference)
startup:petclinic:profiling:Agent 16.80 s 16.86 s [-1.4%; +0.7%] (no difference)
startup:petclinic:sca:Agent 16.73 s 16.91 s [-5.5%; +3.4%] (no difference)
startup:petclinic:tracing:Agent 16.13 s 16.22 s [-1.4%; +0.3%] (no difference)

Commit: 03956ae9 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@jandro996

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-12 09:42:09 UTC ℹ️ Start processing command /merge


2026-11-12 09:42:13 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-11-12 10:27:51 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 9edb365 into master Nov 12, 2026
701 of 709 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the APMLP-2199 branch November 12, 2026 10:27
@github-actions github-actions Bot added this to the 1.69.0 milestone Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: asm waf Application Security Management (WAF) comp: testing Testing tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants