Currently supporting:
| Version | Supported |
|---|---|
| 0.1.x | ✅ |
If you discover a security vulnerability, please report it by:
- Email: security@diaum.com (or create a private security advisory on GitHub)
- Do NOT open a public issue
- Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
We will respond within 48 hours and work with you to resolve the issue.
-
Supabase Keys
NEXT_PUBLIC_SUPABASE_ANON_KEYis safe for the browser (protected by RLS)SUPABASE_SERVICE_ROLE_KEYmust NEVER be exposed to the browserDIAUM_APP_SUPABASE_SERVICE_KEYmust NEVER be exposed to the browser- Only use service role keys in Server Components and API routes
-
Secrets
- Never commit
.env.localto git - Rotate Supabase service role keys periodically
- Use different Supabase projects for development and production
- Never commit
-
File Permissions
- Ensure
.env.localis readable only by the app user:chmod 600 .env.local
- Ensure
-
Reverse Proxy (if self-hosting)
- Always use HTTPS in production
- Configure rate limiting if exposing publicly
- Whitelist trusted IPs for admin endpoints
-
Supabase Configuration
- Enable Row Level Security (RLS) on ALL tables
- Never disable RLS in production
- Use the
is_admin()function for admin-only policies - Review RLS policies after schema changes
-
Never commit:
.env.local(Supabase keys, API tokens)- Any file containing real credentials or tokens
- GitHub Personal Access Tokens
- Anthropic API keys
- Social media API tokens
-
Environment variables:
- Use
.env.localfor all secrets - Use
.env.exampleas a template (with placeholder values only) - Never hardcode personal info, emails, or tokens in source code
- Use
-
Dependencies:
- Run
npm auditregularly - Update dependencies:
npm update - Review Dependabot alerts
- Run
-
Migrations (Supabase SQL):
- EVERY new table MUST include
alter table <name> enable row level security; - EVERY new table MUST have at least a SELECT policy for authenticated users
- Admin-only tables MUST use the
is_admin()function in write policies - Never create a table without RLS — a table without RLS is fully public via the anon key
- Review all existing policies when adding new tables that reference existing ones
- EVERY new table MUST include
-
Code Review:
- No
eval()orFunction()with user input - Validate and sanitize all input
- Use Supabase client SDK (parameterized queries by default)
- Escape user-generated content in UI
- Never pass user input directly to
supabase.rpc()without validation
- No
- Email/password auth via Supabase Auth
- Rate limiting handled natively by Supabase
- Sessions managed via
@supabase/ssr(HttpOnly, Secure, SameSite cookies) - No public registration — admin creates users via service role key
- TODO: Add 2FA support via Supabase Auth MFA
- All data stored in Supabase (PostgreSQL managed, encrypted at rest by Supabase)
- RLS policies enforce access control at the database level
- Cross-project access to Diaum app DB is read-only and server-side only
- GitHub Token: scope limited to
repoandorg:read - Anthropic API Key: rate-limited per user in application code
- Social media tokens: stored in
.env.local, accessed server-side only
- Dashboard frontend deployed on Vercel (HTTPS by default)
- Supabase connections use SSL
- GitHub webhooks validated via signature verification
- All external API calls made server-side (never from browser)
Before deploying to production:
- Configured Supabase project with production settings
- Verified RLS is enabled on ALL tables
- Tested RLS policies (admin vs dev access)
- Set
.env.localwith production keys - Verified
SUPABASE_SERVICE_ROLE_KEYis not exposed in client-side code - Verified
DIAUM_APP_SUPABASE_SERVICE_KEYis not exposed in client-side code - Configured HTTPS (Vercel handles this automatically)
- Updated all npm dependencies
- Ran
npm audit fix - Tested auth flow (login, session expiry, role-based access)
- Verified GitHub webhook signature validation
- Reviewed Supabase Auth settings (disable signup, email confirmation, etc.)
- Documented incident response plan
We follow coordinated vulnerability disclosure:
- Reporter notifies us privately
- We confirm and develop a fix
- We release a patched version
- Disclosure is made public after patch is available
Thank you for helping keep Diaum Mission Control secure!