Skip to content

appsec/helper-rust: fix metric tag blocked_request#3863

Merged
cataphract merged 1 commit into
masterfrom
glopes/helper-rust-fix-blocked-tag
May 7, 2026
Merged

appsec/helper-rust: fix metric tag blocked_request#3863
cataphract merged 1 commit into
masterfrom
glopes/helper-rust-fix-blocked-tag

Conversation

@cataphract
Copy link
Copy Markdown
Contributor

Description

helper-rust is not correctly detecting blocking responses from the WAF

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@cataphract cataphract requested a review from a team as a code owner May 7, 2026 13:28
@datadog-prod-us1-5
Copy link
Copy Markdown

datadog-prod-us1-5 Bot commented May 7, 2026

Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 31 Tests failed

tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking.test_login_event_blocking_auto_id[apache-mod-8.0] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert 500 == 200
 +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:19:07 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/8.0.18', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
 +    where HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:19:07 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/8.0.18', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:) = <tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking object at 0x7f96dc6367b0>.r_login

self = <tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking object at 0x7f96dc6367b0>

    def test_login_event_blocking_auto_id(self):
>       assert self.r_login.status_code == 200
E       AssertionError: assert 500 == 200
E        +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:19:07 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/8.0.18', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
...
tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking.test_login_event_blocking_auto_id[php-fpm-8.5] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert 500 == 200
 +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:16:49 GMT', 'Server': 'Apache/2.4.67 (Ubuntu)', 'X...red-By': 'PHP/8.5.5', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
 +    where HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:16:49 GMT', 'Server': 'Apache/2.4.67 (Ubuntu)', 'X...red-By': 'PHP/8.5.5', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:) = <tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking object at 0x7f006c261eb0>.r_login

self = <tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking object at 0x7f006c261eb0>

    def test_login_event_blocking_auto_id(self):
>       assert self.r_login.status_code == 200
E       AssertionError: assert 500 == 200
E        +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:16:49 GMT', 'Server': 'Apache/2.4.67 (Ubuntu)', 'X...red-By': 'PHP/8.5.5', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
...
tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking.test_login_event_blocking_auto_login[apache-mod-8.0] from system_tests_suite   View in Datadog   (Fix with Cursor)
AssertionError: assert 500 == 200
 +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:19:35 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/8.0.18', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
 +    where HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:19:35 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/8.0.18', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:) = <tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking object at 0x7f96dc6364b0>.r_login

self = <tests.appsec.test_automated_login_events.Test_V3_Login_Events_Blocking object at 0x7f96dc6364b0>

    def test_login_event_blocking_auto_login(self):
>       assert self.r_login.status_code == 200
E       AssertionError: assert 500 == 200
E        +  where 500 = HttpResponse(status_code:500, headers:{'Date': 'Thu, 07 May 2026 15:19:35 GMT', 'Server': 'Apache/2.4.66 (Debian)', 'X...ed-By': 'PHP/8.0.18', 'Content-Length': '0', 'Connection': 'close', 'Content-Type': 'text/html; charset=UTF-8'}, text:).status_code
...
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.67% (+0.00%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: c69d556 | Docs | Datadog PR Page | Give us feedback!

@cataphract cataphract force-pushed the glopes/helper-rust-fix-blocked-tag branch from e8f28da to c69d556 Compare May 7, 2026 14:42
@cataphract cataphract merged commit 9fe0330 into master May 7, 2026
2107 of 2122 checks passed
@cataphract cataphract deleted the glopes/helper-rust-fix-blocked-tag branch May 7, 2026 16:00
@github-actions github-actions Bot added this to the 1.20.0 milestone May 7, 2026
@cataphract
Copy link
Copy Markdown
Contributor Author

The failure in the appsec integration tests are due to a bad change in libdatadog. It'll be handled separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants