-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blocking from a hook is not stopping code execution #2836
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2836 +/- ##
============================================
- Coverage 74.80% 72.93% -1.87%
Complexity 2781 2781
============================================
Files 112 139 +27
Lines 11017 15166 +4149
Branches 0 1022 +1022
============================================
+ Hits 8241 11062 +2821
- Misses 2776 3552 +776
- Partials 0 552 +552
Flags with carried forward coverage won't be shown. Click here to find out more. see 27 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
I see, the tracer sandboxing is sandboxing the bailout away :-) |
c5d1d67
to
1d93a16
Compare
1d93a16
to
78a05a9
Compare
dedee17
to
3438fca
Compare
Benchmarks [ tracer ]Benchmark execution time: 2024-12-26 11:33:25 Comparing candidate commit e459810 in PR branch Found 2 performance improvements and 1 performance regressions! Performance is the same for 175 metrics, 0 unstable metrics. scenario:MessagePackSerializationBench/benchMessagePackSerialization
scenario:PDOBench/benchPDOBaseline-opcache
scenario:TraceFlushBench/benchFlushTrace
|
8322005
to
1602d2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine although it's a mystery to me why sandbox.{h,c} are written the way they are.
1602d2c
to
ee5bff3
Compare
return false; | ||
} | ||
|
||
if (strcmp("Datadog blocked the request and presented a static error page", ZSTR_VAL(PG(last_error_message))) == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main concern with this approach is that if someone changes the error message in appsec, it would stop working. Can you make changes on the appsec side to:
- Make sure the error messages are validated at compile time?
- Add comments specifying that the error message must not be changed.
ee5bff3
to
7fd4a50
Compare
3b1c027
to
491a2e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
e459810
to
7c8f668
Compare
Description
Blocking a request from Appsec should stop customer code execution. However, when this blocking happens within a tracer hook, it does not stop executing customer code execution.
Reviewer checklist