Repository navigation
docs(audit): M4.2 independent UPI payment security and production readiness audit - #29
Merged
Merged
Conversation
…sment for M4.1 UPI integration - Author docs/UPI_SECURITY_AUDIT.md detailing 2 Critical, 3 High, 2 Medium, and 2 Low findings: * SEC-01 (Critical): Real PhonePe webhook signature calculation mismatch (hashes raw body instead of Base64 response) * FIN-01 (Critical): Missing amount verification on webhook ingestion (underpayment vulnerability) * DATA-01 (High): Unauthenticated guest checkout crashes on webhook (NOT NULL bookings.user_id constraint) * CONCUR-01 (High): Simultaneous checkout intent capacity bypass (overbooking risk) * AUTH-01 (High): Unauthenticated information disclosure & polling IDOR on /api/checkout/upi/status/:id * QR-01 (Medium): QR generator overwrites ISO 18004 Dark Module and drops Version 8 codewords * UI-01 (Medium): Missing viewport CSS isolation renders mobile buttons and desktop QR simultaneously - Author docs/UPI_PROVIDER_READINESS.md classifying PhonePe PG as mock/uninitiated, PayU as not implemented, and issuing readiness verdict of NOT READY FOR LIVE PAYMENTS - Update docs/PROJECT_STATE.md with M4.2 milestone tracking and document links - Maintain strict safety boundary: ENABLE_LIVE_PAYMENTS=false
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary of Milestone M4.2 Audit
This PR delivers Milestone M4.2: an independent, zero-trust security and production-readiness audit of the merged M4.1 UPI-first checkout implementation.
Key Audit Findings
Fatal Webhook Signature Incompatibility (Critical - SEC-01):
PhonePeAdapter.verifyWebhookSignaturehashes the raw JSON body ({"response":"..."}) rather than PhonePe's official Base64responsestring:SHA256(payload.response + saltKey) + "###" + saltIndex.Zero Amount Verification on Webhook (Critical - FIN-01):
processUpiWebhookandapplySuccessfulUpiPaymentdiscardverified.amountPaiseand confirm bookings regardless of the amount debited, exposing NIGHTLIFEZ to underpayment attacks.Guest Checkout PostgreSQL Crash (High - DATA-01):
/checkout/:slug/upidoes not require authentication. When an unauthenticated guest pays,applySuccessfulUpiPaymentcrashes with aNOT NULL constraint violation on bookings.user_id, taking money but issuing no ticket.Simultaneous Checkout Intent Capacity Bypass (High - CONCUR-01):
Unauthenticated Information Disclosure on Status API (High - AUTH-01):
getUpiPaymentStatusallows unauthenticated callers to bypass ownership checks and query order and booking pass details.QR Generator Spec Non-Compliance (Medium - QR-01):
(size - 8, 8)is overwritten during format placement, and multi-block capacity math in Version 8 drops trailing data codewords.PayU Fallback Audit:
Payment Readiness Decision:
ENABLE_LIVE_PAYMENTS=falseacross all environments until all critical and high-severity engineering items are remediated and commercial merchant onboarding is complete.Deliverables
docs/UPI_SECURITY_AUDIT.mddocs/UPI_PROVIDER_READINESS.mddocs/PROJECT_STATE.md