Repository navigation
fix(deployments): check the read scope for key downloads - #15460
Conversation
Every API key now holds the public scope, which this route also accepts for presigned tokens, and the action let any key through. A key with any single scope could download every function and site deployment's source and build output.
|
Review complete. 🟡 1 medium 📍 Findings outside the diff (1) — 🟡 1 medium — defects on lines GitHub can't attach comments to🟡 Medium — Add unscoped-key 401 e2e coverage for Sites download · tests/e2e/Services/Sites/SitesCustomServerTest.php The PR adds the The only Functions negative assertion lives inside the Previously any API key — even one scoped only to
The authorization change itself is sound: both handlers were verified for symmetric scope strings, unreachable-by-request Reviewed commit: 1a6d939 |
🟢 Tier S · Ready to mergeFunction and site deployment downloads now require the corresponding Latest changes: The latest commits switch both download actions to Appwrite's request wrapper, which provides the authenticated caller's scopes to the new checks.
📂 Walkthrough · 4
Reviewed the commits since |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
…cope fix(deployments): check the read scope for key downloads (cherry picked from commit ef64119)
The deployment download action treats API keys as privileged without looking at their scopes. It now requires
functions.read/sites.read, matching the route's label. Presigned-token and console access are unchanged.Covered by an added assertion in the existing deployment download e2e test.
Related: appwrite-labs/cloud#6673