Title: [APPSEC]: report blocking_response payload and status code on blocked response by florentinl · Pull Request #656 · DataDog/datadog-lambda-python · GitHub
Open Graph Title: [APPSEC]: report blocking_response payload and status code on blocked response by florentinl · Pull Request #656 · DataDog/datadog-lambda-python
X Title: [APPSEC]: report blocking_response payload and status code on blocked response by florentinl · Pull Request #656 · DataDog/datadog-lambda-python
Description: What does this PR do? This PR ensures that when a request is blocked, the reported captured response and http.status_code comes from the blocking_response instead of the response. Motivation Currently, when enabling Appsec and a request is blocked. The span will still report the status code of the response that was blocked instead of the automatic blocking response and if the request was blocked before the function handler was called the default value of 502 would be returned. Testing Guidelines updated unit tests to avoid regressions Additional Notes I am making a pass of manual testing before making appsec through the tracer the default and spot this bug Types of Changes Bug fix New feature Breaking change Misc (docs, refactoring, dependency upgrade, etc.) Check all that apply This PR's description is comprehensive This PR contains breaking changes that are documented in the description This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future This PR impacts documentation, and it has been updated (or a ticket has been logged) This PR's changes are covered by the automated tests This PR collects user input/sensitive content into Datadog This PR passes the integration tests (ask a Datadog member to run the tests)
Open Graph Description: What does this PR do? This PR ensures that when a request is blocked, the reported captured response and http.status_code comes from the blocking_response instead of the response. Motivation Curren...
X Description: What does this PR do? This PR ensures that when a request is blocked, the reported captured response and http.status_code comes from the blocking_response instead of the response. Motivation Curren...
Opengraph URL: https://github.com/DataDog/datadog-lambda-python/pull/656
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:90ac097e-149f-6f6a-f058-7144feac9070 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 82B2:F68EB:2B4124:38042B:699067BA |
| html-safe-nonce | 2a1adff9c90fc954553f1ac6f4b030c0ff701b2a23d5bdca2207155e90e991a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkIyOkY2OEVCOjJCNDEyNDozODA0MkI6Njk5MDY3QkEiLCJ2aXNpdG9yX2lkIjoiNjk2MzAzMzQwNDc1NDM4ODkyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fb917a686f4b8ce1aea0b46b4302f88455832098153a2a90809f88f55e030ef9 |
| hovercard-subject-tag | pull_request:2808134511 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/DataDog/datadog-lambda-python/pull/656/files |
| twitter:image | https://avatars.githubusercontent.com/u/101594032?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/101594032?s=400&v=4 |
| og:image:alt | What does this PR do? This PR ensures that when a request is blocked, the reported captured response and http.status_code comes from the blocking_response instead of the response. Motivation Curren... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/DataDog/datadog-lambda-python git https://github.com/DataDog/datadog-lambda-python.git |
| octolytics-dimension-user_id | 365230 |
| octolytics-dimension-user_login | DataDog |
| octolytics-dimension-repository_id | 183265904 |
| octolytics-dimension-repository_nwo | DataDog/datadog-lambda-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 183265904 |
| octolytics-dimension-repository_network_root_nwo | DataDog/datadog-lambda-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width