fix: add API key authentication to GPU render escrow release/refund endpoints#4047
fix: add API key authentication to GPU render escrow release/refund endpoints#4047BossChaos wants to merge 2 commits intoScottcjn:mainfrom
Conversation
haoyousun60-create
left a comment
There was a problem hiding this comment.
Solid security fix. The implementation looks clean and addresses the vulnerability properly. LGTM! 🚀
fengqiankun6-sudo
left a comment
There was a problem hiding this comment.
PR #4047 Security Review
Summary
Adds API key authentication to GPU render escrow release.
Code Assessment
- Correctness: Proper API key validation
- Coverage: GPU render escrow release endpoints
- Security: Prevents unauthorized escrow releases
Severity: SECURITY
Unauthenticated escrow operations.
Estimated RTC: 8-12
fengqiankun6-sudo
left a comment
There was a problem hiding this comment.
LGTM! Good security fix. ✅
|
Closing per branch-contamination audit (2026-05-09). This PR is part of a 161-PR cluster from your account where the diff carries files unrelated to the claimed fix. Specifically, 128 of 161 PRs in this batch modify This is a branching-hygiene problem, not a quality problem with the underlying fixes. The pattern means:
To get back to paid status:
I have nothing against the underlying fixes — quality has been good when scoped. But contamination at this scale is unreviewable, and Faucet Tiers policy requires clean diffs for security claims. Specifically clean PRs already approved for payout (per 2026-05-06 audit, still scope-clean as of today):
These will be paid via the admin /wallet/transfer flow. — auto-triage 2026-05-09 (this is mechanical contamination detection, not a personal judgment) |
Summary
Fixes a critical authentication gap in
node/gpu_render_protocol.pywhere escrow release, refund, creation, and GPU attestation endpoints were completely open — anyone could manipulate escrow state without credentials.Critical Issue
🔴 CRITICAL: Unauthenticated Escrow Manipulation
The following endpoints had zero authentication:
POST /render/releasePOST /render/refundPOST /render/escrowPOST /voice/escrowPOST /llm/escrowPOST /gpu/attestBefore:
No authentication. Any attacker who knows (or guesses) a
job_idcan call/render/releaseto release that escrow and potentially intercept funds.After:
All write-operation endpoints now require
X-API-Keyheader matchingRC_RENDER_API_KEYenvironment variable, using constant-time comparison (hmac.compare_digest).Changes
_require_api_key()helper function with fail-closed behavior (returns 503 if env var not configured)/render/release,/voice/release,/llm/release/render/refund/render/escrow,/voice/escrow,/llm/escrow/gpu/attestjob_idrequired field validation to release/refund endpointsimport hmacfor constant-time comparisonNote
Read-only endpoints (
GET /render/escrow/<job_id>,GET /render/pricing,GET /gpu/nodes) remain public as they don't modify state.Testing
hmac)