Repository navigation
Conversation
Cover the public-path Grant a provider callback needs on a private Space, reading the raw body for signature checks, write-only signing keys, and the runner's missing crypto/TextEncoder with no npm imports on the server. Drop fetch from the compile-time rejection list; it is absent at runtime, which the warning already says.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Verifying against an empty HMAC key accepts forged events.
The hosted MCP publish tool compiles on the platform, where handlers already get fetch bounded by the Space's egress scope.
|
Closing: Zero handlers have |
Adds a "Receiving a webhook" section to the Zero runtime page. Someone building a Square payment flow couldn't tell from the docs whether Zero can take a provider callback.
The section covers:
access.publicinsf.jsoncand the matchingsf share grant --to public --pathcommand.req.text()/req.bytes()before parsing, because signatures cover the exact bytes sent.ctx.env.crypto,crypto.subtleorTextEncoder, andserver/can only import the SDK, preact and relative files.atob/btoaare available.It also removes
fetchfrom the "Rejected inserver/" row. The compiler doesn't reject it; it just isn't defined at runtime, which the existing warning already says. The warning now lists the extra globals and points to Functions for outbound calls and to the new section for callbacks.Verified against the released CLI (0.4.1) and the deployed runner:
fetch: false, so the "no outbound fetch" warning is still correct. Main turns fetch on, and it ships with 0.5.0 (unreleased). This page will need an update at that release, along withreadOnlyreplacingmodeandaction().stattic-zero-runnertest.atob/btoaare defined.cryptoandTextEncoderare undefined with or without the fetch capability. The compiled runtime host addsHeaders,Response,URLandURLSearchParamsand nothing crypto-related.page.viewon the path. It doesn't restrict by method, so POSTs to a public write endpoint are admitted.Checks run locally:
check,validate,build,verify:routes,audit,verify:public-safety, andverify:prosewith Vale 3.17.1. All clean.Tag
@indentto continue the conversation here.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.