Repository navigation
Test AppSec runtime activation through remote config in smoke tests - #13333
Conversation
- 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
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
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.
🤖 Bits Code Review · Commit 03956ae
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
9edb365
into
master
What Does This Do
testRuntimeActivationmode (-Dsmoke_test.appsec.enabled=inactive),AbstractAppSecServerSmokeTestnow points remote config at the smoke mock agent and activates AppSec once the app is up: it pushesASM_FEATURES {"asm":{"enabled":true}}insetupSpecand waits for the first RC poll that subscribes toASM_DD. Specs can opt out withactivateAppSecAtRuntime().testRuntimeActivationnow runsSpringBootSmokeTestunder runtime activation (detection and blocking), next toOtelContextExposureSmokeTest, which stays inactive.testRuntimeActivationnow uses the JUnit platform, so its spec actually runs, with AppSec activated through remote config.testRuntimeActivationtasks of spring-tomcat7 (IAST-only spec) and springboot-security (no tests) are removed.SpringbootApplicationno longer flipsActiveSubsystems.APPSEC_ACTIVEby reflection, andAIGuardSmokeTestdrops its opt-out.Motivation
The
testRuntimeActivationtasks 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 isinactive, so remote config activation is the path of every customer who does not setDD_APPSEC_ENABLED.Additional Notes
java.net.URL. Both use RASP call sites, which are applied only when AppSec is enabled at boot (InstrumenterConfig.isRaspEnabled). Everything else inSpringBootSmokeTestpasses: 43 tests, 3 skipped.APPSEC_RUNTIME_ACTIVATION, which runs in this repo's CI. These smoke tests cover the dd-trace-java specific features under activation.dd.appsec.rules, runtime activation still subscribes toASM_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.remoteConfigResponsenow starts as"{}": before the first feature, early RC polls got a 500 from the mock.@IgnoreIfon the GraphQL detection feature here).Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: APMLP-2199
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels 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.