Skip to content

Add security response id to AppSec blocking response#5049

Merged
y9v merged 4 commits intomasterfrom
appsec-add-security-response-id-to-blocking-response
Nov 18, 2025
Merged

Add security response id to AppSec blocking response#5049
y9v merged 4 commits intomasterfrom
appsec-add-security-response-id-to-blocking-response

Conversation

@y9v
Copy link
Member

@y9v y9v commented Nov 14, 2025

What does this PR do?
This PR adds rendering of unique security response identifier in the response when AppSec blocks the request.

Motivation:
This unique identifier, introduced in libddwaf v1.28.0, can be used to correlate blocked requests with logs, traces, and security events.

Change log entry
Yes. AppSec: Add unique security response identifier in the response body for blocked requests.

Additional Notes:
APPSEC-59951.

How to test the change?
CI and manual testing.

@y9v y9v self-assigned this Nov 14, 2025
@y9v y9v requested review from a team as code owners November 14, 2025 16:18
@github-actions github-actions bot added the appsec Application Security monitoring product label Nov 14, 2025
@github-actions
Copy link

github-actions bot commented Nov 14, 2025

Typing analysis

Note: Ignored files are excluded from the next sections.

Untyped methods

This PR introduces 1 partially typed method, and clears 1 partially typed method.

Partially typed methods (+1-1)Introduced:
sig/datadog/appsec/response.rbs:12
└── def to_rack: () -> ::Array[untyped]
Cleared:
sig/datadog/appsec/response.rbs:10
└── def to_rack: () -> ::Array[untyped]

If you believe a method or an attribute is rightfully untyped or partially typed, you can add # untyped:accept to the end of the line to remove it from the stats.

@y9v y9v force-pushed the appsec-add-security-response-id-to-blocking-response branch from bb2b04f to 24ac60d Compare November 14, 2025 16:22
@pr-commenter
Copy link

pr-commenter bot commented Nov 14, 2025

Benchmarks

Benchmark execution time: 2025-11-17 15:53:38

Comparing candidate commit 7ecc8d0 in PR branch appsec-add-security-response-id-to-blocking-response with baseline commit 49cee89 in branch master.

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

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Nov 14, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 104.00%
Total Coverage: 98.51% (+0.03%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 682849d | Docs | Datadog PR Page | Was this helpful? Give us feedback!

Copy link
Member

@Strech Strech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left few non-blocking comments with minor improvements

y9v added 4 commits November 18, 2025 10:37
This unique identifier, introduced in `libddwaf` v1.28.0, can be used to
correlate blocked requests with logs, traces, and security events.
@y9v y9v force-pushed the appsec-add-security-response-id-to-blocking-response branch from 7ecc8d0 to 682849d Compare November 18, 2025 09:38
@y9v y9v merged commit f8094b5 into master Nov 18, 2025
553 checks passed
@y9v y9v deleted the appsec-add-security-response-id-to-blocking-response branch November 18, 2025 10:03
@github-actions github-actions bot added this to the 2.23.0 milestone Nov 18, 2025
@Strech Strech mentioned this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

appsec Application Security monitoring product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants