The receiver's capability URL is sent to Sentry in full #179
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Raised by the independent review of #174, which recommended filing it. That PR scrubs the Sentry request body, query string and headers, but deliberately keeps
Request.URL, which the SDK builds asscheme://host/path. On the receiver route that path is/webhook/{uuid}in full.That UUID is not an identifier, it is a write capability: anyone holding it can POST events that this service accepts and that the operator's configured targets then deliver. It is the inbound counterpart of the outbound target credential that #113, #118, #115 and #160 were each filed to keep out of somewhere it did not belong.
Why the existing rule does not cover this
#174 justified keeping the path by pointing at #146, which deliberately keeps the concrete path on 2xx and 5xx responses. The reviewer's rebuttal is convincing and I accept it: that ruling was reasoned about a log you own, where the concrete path grants a reader no capability they did not already have. Sentry is a different trust boundary with its own retention, its own access control, and its own deletion policy. The two are not equivalent, and the earlier ruling should not be read as covering this.
Milestoned
1.0.0for consistency with the four issues above, all of which treated a credential coming to rest somewhere unintended as blocking. Only reachable whenSENTRY_DSNis configured, which is optional — but an operator who configures error reporting has not thereby consented to shipping their receiver capabilities off-host.The fix is now cheap, and #174 records why
That PR's first revision claimed the SDK gives
BeforeSendno request, so the route could not be identified. That is false, and the reviewer disproved it with a scratch test rather than by reading:http/sentryhttp.go:123-126callshub.RecoverWithContext(context.WithValue(r.Context(), sentry.RequestContextKey, r), err)hub.go:344builds&EventHint{RecoveredException: err}with no request — the part that misled the author — butclient.go:480-487then setshint.Context = ctx, andclient.go:629-631passes that hint toBeforeSendTheir probe, with
sentryhttpinside a chi router and a panickingPOST /webhook/{uuid}, reportedsawHint=true sawRequest=true routePattern="/webhook/{uuid}".So the chi route pattern is reachable from
hint.Context, andRequest.URLcan carry the pattern rather than the concrete path.Definition of done
Request.URLsent to Sentry carries the chi route pattern rather than a client- or capability-bearing concrete path, at least for the receiver route.sentryhttppath —SetRequesttoApplyToEventtoBeforeSend, as #174's tests now do — asserting a receiver UUID does not survive into the marshalled event. Verify by mutation.Implementation requirements
next, PR based onnext, single commit, title ending(closes #N).TODO.md(see #112).make bootstrapin a fresh clone before gating — browser assets are fetched at build time, andmake lintnow needs Docker.make checkplus the Docker lint path with the cache defeated. All linting runs in Docker, never on the host.clawbot referenced this issue2026-08-18 03:03:22 +02:00