feat(aap): collect security testing headers#4774
feat(aap): collect security testing headers#4774gh-worker-dd-mergequeue-cf854d[bot] merged 9 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files
🚀 New features to boost your workflow:
|
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 7cdd215 | Docs | Datadog PR Page | Give us feedback! |
ae9322c to
5556a88
Compare
BenchmarksBenchmark execution time: 2026-05-20 12:55:29 Comparing candidate commit 7cdd215 in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 272 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5556a8818c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c758cbc3c9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56ea950ad6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Define RFC-1105 header/tag mapping in internal AppSec so HTTP instrumentation can tag inbound security-testing requests without changing generic AppSec header collection. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Tag RFC-1105 inbound security-testing headers on HTTP service-entry spans and verify they are not propagated outbound. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Keep the security testing header constants and mapping with the existing request header declaration blocks for a smaller, clearer layout-only diff. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
56ea950 to
7cdd215
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
42975b4
into
main
What does this PR do?
Collects Datadog security-testing request headers on HTTP service-entry spans. (RFC)
When an incoming request includes
x-datadog-endpoint-scanorx-datadog-security-test, the HTTP instrumentation now sets these span tags:http.request.headers.x-datadog-endpoint-scanhttp.request.headers.x-datadog-security-testThe collection is unconditional: it does not depend on
DD_TRACE_HEADER_TAGSor AppSec being enabled. The headers are also not propagated downstream.This PR keeps the header/tag mapping in
internal/appsec, then calls it frominstrumentation/httptracewhen starting HTTP request spans.Motivation
These markers let the API inventory pipeline distinguish Datadog endpoint scans and security tests from real user traffic.
Related system-tests coverage: DataDog/system-tests#6915
Reviewer's Checklist
go vet ./instrumentation/httptrace ./internal/appsec/listener/httpsecgo test -count=1 ./instrumentation/httptrace ./internal/appsec/listener/httpsechttps://datadoghq.atlassian.net/browse/APPSEC-64418