Repository navigation
JULIO-11: cross-component prototype (do not merge) - #1513
Draft
Julio-Guerra wants to merge 2 commits into
Draft
Julio-Guerra wants to merge 2 commits into
Julio-Guerra wants to merge 2 commits into
Conversation
Cross-component prototype for JULIO-11 (CADR for AWS Lambda). Do not merge.
Behind DD_APPSEC_AWS_ACCESS_KEY_ID_ENABLED (default false, environment
only), every invocation the AppSec processor monitors gets
aws.lambda.access_key_id on its aws.lambda span. AWS_ACCESS_KEY_ID is
read once, at the first monitored invocation, and kept only if it
matches ^(ASIA|AKIA)[A-Z0-9]{16}$. The secret and the token are never
read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
|
This comment will be updated automatically if new data arrives. 🔗 Commit SHA: 3b4d36c | Docs | View more details | Give us feedback! |
…_ID_TAG_ENABLED Design change from Julio on JULIO-10 (2026-11-12). The old name was DD_APPSEC_AWS_ACCESS_KEY_ID_ENABLED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CADR cannot link an AAP signal on Lambda to Cloud SIEM: every CADR correlation starts from Workload Protection, which does not run on Lambda. The execution environment's AWS access key ID is the join key (CloudTrail
userIdentity.accessKeyId), but no Lambda span carries it. This PR checks that the RFC design core (D1 to D8) can be built on the extension AppSec path (Go, .NET, Node.js and Python withDD_SERVERLESS_APPSEC_ENABLED).This PR
Behind
DD_APPSEC_AWS_ACCESS_KEY_ID_TAG_ENABLED(default off), every invocation the AppSec processor monitors getsaws.lambda.access_key_idon itsaws.lambdaspan.appsec/mod.rs:is_aws_access_key_id_enabled()reads the flag from the environment only, so it has nodatadog.yamlkey (per the RFC Contracts tab).read_aws_access_key_id()reads onlyAWS_ACCESS_KEY_IDand validates^(ASIA|AKIA)[A-Z0-9]{16}$without a regex dependency.appsec/processor/mod.rs: theProcessorreads the value lazily at the firstContext, so at the first invocation and after a SnapStart restore, and caches it in aOnceCellfor the environment's life.appsec/processor/context.rs: newTagName::AwsLambdaAccessKeyId, inserted asTagValue::Alwaysand applied by the existingprocess_span.Testing
Test 1: unit tests
Steps
images/Dockerfile.bottlecap.compile:cargo fmt --all -- --check,cargo test --lib appsec,cargo clippy --workspace --all-targets --features default -- -D warnings.Result
fmt and clippy are clean. 32 appsec tests pass, 6 of them new. They run the real WAF on a Function URL event: tag set (S1); off when unset,
falseor0(S2); malformed values (S5); read once (S6); tag next to acrs-930-120event (S7); no canary secret or token on the span.Test 2: end to end in system-tests
Steps
cargo build --release(aarch64), copy the binary andscripts/datadog_wrapperinto system-testsbinaries/, buildpython_lambdafunction-url../run.sh APPSEC_LAMBDA_AWS_ACCESS_KEY_ID_EXTENSION tests/appsec/test_aws_lambda_access_key_id.pyResult
4 passed. The tag is on the payload the extension sends to the backend, the tracer-side payload has neither the tag nor tracer AppSec, and no canary appears in any payload or log. With the v100
datadog_wrapperinstead, tracer AppSec stays on, both paths run, and the S8 test fails as expected. Exclusivity starts with v102 (#1466).Findings for the RFC
AWS_ACCESS_KEY_IDis empty after restore. AWS uses the container credentials endpoint, assecrets/decrypt.rsalready handles. Reading the key from that endpoint means fetching the secret and the token too, which conflicts with RFC D1.🤖 Generated with Claude Code