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.
Contributor
|
|
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.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.