Security Policy
Threat Model & Architecture
For a detailed analysis of trust boundaries, asset inventory, threat vectors, and active security controls in this codebase, please review the Lightweight Threat Model.
Supported Versions
We maintain security updates on the default main branch.
| Version | Supported | Notes |
|---|---|---|
main Branch | ✅ | Actively supported release branch. |
| Older Commits | ❌ | Upstream fixes should be merged to main. |
Template Deployers & Self-Hosters
If you are deploying this template for your own event, please ensure:
- You generate unique credentials for
ADMIN_PASSWORD(usingscripts/generate-password-hash.mjs), a uniqueGUEST_PASSCODE, and a distinctGUEST_SESSION_SECRETof at least 32 characters for signingguest_authandguest_invite_sessioncookies. Runtime validation insrc/env.tsrejects default fallback values (wedding2026anddefault-guest-session-secret),GUEST_SESSION_SECRETvalues shorter than 32 characters, and values matchingGUEST_PASSCODEin production. - You configure
ALLOWED_HOSTSto match your actual domain name(s) (and configureCRON_SECRETif scheduling/api/cron/*broadcast jobs). - If hosting publicly, replace the security contact email below with your own contact address in your fork or deployment settings.
Reporting a Vulnerability
Found a security issue or vulnerability? We appreciate responsible disclosure to help keep the project safe.
How to Report:
- Please email details to
fpderuiter@gmail.com. Please do not open public GitHub issues for security vulnerabilities. - Include steps to reproduce, potential impact assessment, and any relevant code snippets or proof of concept.
What Happens Next:
- We aim to acknowledge reports within 48 hours.
- We will investigate the issue and communicate target resolution timelines within 7 business days.
- Once a fix is verified and deployed, security updates will be documented on the main branch.
Thanks for helping keep this project secure!
Core Security Controls
- No Default Passwords: The system never ships with universal default administrative passwords.
- Password Hashing: Admin passwords use scrypt key derivation function (
scrypt:[saltBase64]:[keyBase64]). - First-Run Bootstrap Protection: First-run initialization requires validating against
ADMIN_PASSWORD. Once initialized, setup endpoints reject unauthorized replay attempts (403 Forbidden). - Personalized Invite-Only Endpoints & Stripe Webhook Verification:
/api/guest/addressand/api/rsvprequire a signedguest_invite_sessioncookie (getGuestInviteSession), whilePOST /api/registry/webhook/stripebypasses the Edge cookie gate onPOSTonly and verifies cryptographicstripe-signatureheaders againstSTRIPE_WEBHOOK_SECRET. - Public Address Collection Throttling & Honeypot Defense: Unauthenticated
POST /api/guest/address/public(src/app/api/guest/address/public/route.ts) enforces an IP rate limit of10requests per15minutes (public_address_collect), silently drops automated bot submissions populating honeypot fields (website,honeypot,hp_field,confirm_email), and quarantines submissions withpartyTags: ['address-collection']pending admin review. - Upload & Export Path Containment: Local asset reads, image uploads, and media archive exports validate filesystem paths through src/utils/pathContainment.ts (
resolveContainedExistingPath,resolveContainedWritePath,PathContainmentError), enforcing lexicalpath.relativebounds, canonicalfs.promises.realpathcontainment, andfs.lstatsymlink-escape rejection. - Broadcast Provider & Secret Isolation: Outbound email/SMS credentials are masked in
toAdminAppConfigand stripped fromtoPublicAppConfig(src/lib/config.ts) andsanitizeAppConfigForBackup(src/lib/backupPersistence.ts),emailProvider = "smtp"(sendSmtpEmailin src/features/broadcast/providers/index.ts) attempts livenode:net/node:tlsSMTP delivery whensmtpHostis configured (returning{ success: false }whensmtpHostis blank) while onlyemailProvider = "none"andsmsProvider = "none"simulate delivery without network traffic, andaddress-collectionleads and liveisSample: truerows are excluded from broadcasts by default (see Guest Broadcasts & Messaging).