| Version | Supported |
|---|---|
| 0.1.x | ✅ |
We take the security of GovernsAI seriously. If you have discovered a security vulnerability, please follow these steps:
- DO NOT open a public GitHub issue
- Email security concerns to: [your-security-email@governsai.com]
- Include the following information:
- Description of the vulnerability
- Steps to reproduce the issue
- Potential impact
- Suggested fix (if any)
- We will acknowledge receipt of your report within 48 hours
- We will provide a detailed response within 7 days
- We will work with you to understand and resolve the issue
- We will keep you informed of our progress
- We will credit you in our security advisories (unless you prefer to remain anonymous)
CRITICAL: Never commit .env files or any files containing secrets to version control.
All production deployments MUST set the following environment variables:
# Authentication & Security (REQUIRED)
JWT_SECRET=<generate-32-byte-random-value>
PASSWORD_PEPPER=<generate-random-value>
WEBHOOK_SECRET=<generate-32-byte-random-value>
GOVERNS_WEBHOOK_SECRET=<generate-32-byte-random-value>
NEXTAUTH_SECRET=<generate-32-byte-random-value>Use cryptographically secure random values:
# Node.js method (recommended)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# OpenSSL method
openssl rand -hex 32
# Python method
python -c "import secrets; print(secrets.token_hex(32))"NEVER use default or example values in production.
- Use strong database passwords (minimum 16 characters, mixed case, numbers, symbols)
- Enable SSL/TLS for database connections in production
- Restrict database access to specific IP addresses/VPCs
- Regular backups with encryption at rest
- Enable pgvector extension only with proper permissions
- Rotate API keys regularly (at least every 90 days)
- Use separate keys for development, staging, and production
- Set spending limits on provider dashboards (OpenAI, Resend, etc.)
- Monitor API usage for anomalies
- Revoke unused keys immediately
In production, NEVER use origin: '*'. Always specify exact origins:
ALLOWED_ORIGINS=https://governsai.com,https://app.governsai.com- Always use HTTPS in production
- Enable HSTS (HTTP Strict Transport Security)
- Use TLS 1.2 or higher
- Keep certificates up to date
- Enable passkey authentication where possible (most secure)
- Enforce strong passwords (minimum 12 characters)
- Implement rate limiting on authentication endpoints
- Monitor for brute force attacks
- Use secure session management
- Regularly update dependencies:
pnpm audit pnpm update
- Review security advisories before updating
- Enable Dependabot or similar automated scanning
- Pin critical dependencies to specific versions
- PII Detection: Use the precheck service to detect and flag PII
- Data Encryption: Encrypt sensitive data at rest
- Audit Logging: Enable comprehensive audit logs
- Data Retention: Implement appropriate data retention policies
- GDPR Compliance: Ensure compliance with data protection regulations
- Always verify signatures using
crypto.timingSafeEqual() - Validate timestamps to prevent replay attacks
- Use HTTPS endpoints for webhooks
- Implement rate limiting on webhook endpoints
- Use VPCs or private networks for service-to-service communication
- Implement IP whitelisting where appropriate
- Enable firewall rules to restrict access
- Use internal DNS for service discovery
- Enable comprehensive logging (but never log secrets)
- Monitor for suspicious activity:
- Unusual API usage patterns
- Failed authentication attempts
- Abnormal spending spikes
- Set up alerts for security events
- Regular security audits
- Use environment variables for all configuration
- Never expose debug endpoints in production
- Disable verbose error messages in production
- Implement health checks without exposing sensitive info
- Use secrets management (AWS Secrets Manager, HashiCorp Vault, etc.)
Before deploying to production, verify:
- All environment variables are set with secure, random values
- No
.envfiles are committed to version control - Database uses strong password and SSL/TLS
- CORS is configured with specific origins (no wildcards)
- HTTPS/TLS is enabled with valid certificates
- API keys are production-specific and rotated
- Rate limiting is enabled on all public endpoints
- Webhook signature verification is enabled
- Error messages don't expose sensitive information
- Logging doesn't include secrets or PII
- Dependencies are up to date and audited
- Monitoring and alerting are configured
- Backup and disaster recovery plans are in place
API keys are stored hashed in the database. Only the first 10 characters are logged for debugging purposes.
Passkeys use WebAuthn/FIDO2 standards for secure, phishing-resistant authentication.
Budget limits are enforced before AI API calls to prevent unexpected charges.
Context memory uses vector embeddings stored in PostgreSQL with pgvector. Ensure proper database access controls.
We will announce security updates through:
- GitHub Security Advisories
- Release notes
- Security mailing list (subscribe at [security@governsai.com])
This software is provided under the Elastic License 2.0 (ELv2). See LICENSE file for details.
Disclaimer: While we implement security best practices, no system is completely secure. Use this software at your own risk and implement additional security measures appropriate for your use case.
Last Updated: 2025-10-21