Repository navigation
Security audit: promo cap bypass, anon keepalive writes, import DNS gap - #226
Closed
Programcode wants to merge 4 commits into
Closed
Programcode wants to merge 4 commits into
Programcode wants to merge 4 commits into
Conversation
Record source-traced findings for discount promo limits, import URL rebinding, and share error text, plus the controls that held on the reviewed edge, RLS, admin, and payment paths. Co-authored-by: Gáborjáni-Szabó Ádám <Programcode@users.noreply.github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Note 🎁 Summarized by CodeRabbit Free
Comment |
The anon policies and grants let the publishable key insert and read keepalive_events and overwrite the heartbeat rows. Co-authored-by: Gáborjáni-Szabó Ádám <Programcode@users.noreply.github.com>
create-portal copies Stripe's message into the response for portal session failures other than a missing customer. Co-authored-by: Gáborjáni-Szabó Ádám <Programcode@users.noreply.github.com>
The discount path now has the SQL and Checkout change that records the cap and pins one Stripe promotion code. Import pinning is spelled out. The summary lists both new findings and the second-pass coverage. Co-authored-by: Gáborjáni-Szabó Ádám <Programcode@users.noreply.github.com>
Owner
Author
|
Superseded by #230, which fixed all five findings; the migrations and functions are deployed to prod. |
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
Time-boxed source audit of DebateLab, following the Cloudflare security-audit skill. Application code is unchanged. Nothing was sent to production, staging, Stripe, or AI providers, and target code was not executed.
The report is
SECURITY-AUDIT.md. Ranked result:discountpromo codes return beforeuser_promosis written orredemptions_countis incremented. Checkout then setsallow_promotion_codes: true. The report now includes the SQL and Checkout change that records the cap and sends onepromo_id.keepalive_eventsandkeepalive_heartbeathaveTO anonpolicies andGRANT ALLtoanon. The publishable key can insert and read monitor rows and overwrite the heartbeat.sharereturns thrown PostgREST text.create-portalreturns Stripe's error message.import-sourcechecks DNS and then fetches the name again. The report includes a pinned dial and an egress-proxy version. The fetch was not run.The second pass also read every edge-function auth gate,
SECURITY DEFINERsearch_pathassignments, storage policies in source, XSS sinks, collaboration membership checks, AI session quota,vercel.jsonCSP,public/sw.js, andnpm audit --package-lock-only(0 advisories). No critical or high issue was confirmed. The remaining gap is listed in the report.Test plan
SECURITY-AUDIT.md.redeem_promo_code_atomicandcreate-checkout, including the fix SQL.20260820070000_reconcile_prod_only_objects.sql.