Skip to content

feat(api): refuse issuance and ramps outside their release channel - #2221

Open
Windscar wants to merge 1 commit into
sagar/channels-manifestfrom
sagar/channels-api-gates
Open

Windscar wants to merge 1 commit into
sagar/channels-manifestfrom
sagar/channels-api-gates

Conversation

@Windscar

@Windscar Windscar commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

PR 2 of 5, on #2220. Refuses Issuance and Ramps outside the release channel. No change on dev.

  • Gates run before auth (requireModule), so an excluded module answers 403 to everyone.
  • Per ramp provider: routing skips excluded providers; naming one, its webhooks, lifecycle events, cancel, simulate and off-ramp deposit funding via /v1/payments/transfers get 403; replay and BVNK payout jobs skip it.
  • provider-access reports excluded ramp/Earn providers as enabled: false.
  • Issuance excluded → token metadata.json is not served (intended, see ADR).

API before/after (local, all ramp providers dev)

                                         dev   stable
GET  /v1/issuance/tokens                 200   403 "The issuance module is not available in this release channel."
GET  /v1/payments/ramps/onramp/currency  200   403 "The ramps module is not available …"
POST /webhooks/payments/ramps/sandbox/moonpay (unsigned)   401   403
GET  /v1/organizations/:orgId/provider-access   ramps.*.enabled: true → false
GET  /v1/payments/transfers, /v1/wallets 200   200

Verification: typecheck + Biome clean; API 6875, web 3062, sdp-policy 90; 20/21 gate mutations caught (survivor is an equivalent early return).

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sdp-docs Ready Ready Preview Oct 5, 2026 8:56pm UTC
sdp-web Ready Ready Preview Oct 5, 2026 8:56pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Adds release channel gating to ramp providers and modules.

The PR appears safe to merge; both previous findings are fixed and no new blocking issue remains.

What we checked:

  • Excluded accounts stay out: The handler removes excluded rows before reading payout details or funding-wallet balances. The database query has no page limit that could hide included rows.
  • Replay leaves excluded rows alone: Replay supplies the excluded providers to all three database updates. Each update filters those providers out before changing rows.

Summary

Adds release-channel checks for issuance and ramps while preserving the default dev behavior.

  • Excluded modules and providers are refused at their API boundaries.
  • Provider selection, account enrichment, webhook replay, and BVNK payout jobs skip excluded providers.
  • Both previous findings are fixed. No new actionable issue was found.

Reviews (2) · Last reviewed commit: "feat(api): refuse issuance and ramps out..."

Comment thread apps/sdp-api/src/routes/payments/transfers/handlers.ts
Comment thread apps/sdp-api/src/services/provider-availability.service.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@Windscar
Windscar added this pull request to stack #2225 October 5, 2026 21:04

This branch was successfully deployed

2 active deployments
Preview – sdp-web — 329e672d Deployed Oct 5, 2026 by vercel[bot]
Preview – sdp-docs — 329e672d Deployed Oct 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant