SECURITY - nself-org/nchat GitHub Wiki
Security Policy
Supported Versions
We actively support the following versions of nself-chat with security updates:
| Version | Supported |
|---|---|
| 0.3.x | :white_check_mark: |
| 0.2.x | :white_check_mark: |
| 0.1.x | :x: |
Reporting a Vulnerability
We take the security of nself-chat seriously. If you believe you have found a security vulnerability, please report it to us as described below.
Please DO NOT:
- Open a public GitHub issue for security vulnerabilities
- Discuss the vulnerability publicly until it has been addressed
- Exploit the vulnerability beyond what is necessary to demonstrate it
Reporting Process
Email: [email protected]
Please include the following information in your report:
- Type of vulnerability (e.g., XSS, SQL injection, CSRF, authentication bypass)
- Full path to affected source file(s) if applicable
- Step-by-step instructions to reproduce the vulnerability
- Proof-of-concept or exploit code if possible
- Impact of the vulnerability (who is affected, what can be compromised)
- Suggested fix if you have one
What to Expect
- Acknowledgment: Within 48 hours of your report
- Initial Assessment: Within 5 business days
- Progress Updates: Every 5 business days until resolution
- Disclosure Timeline: We aim to address critical vulnerabilities within 30 days
Coordinated Disclosure
We request that you:
- Give us reasonable time to investigate and fix the issue
- Avoid exploiting the vulnerability in production environments
- Not disclose the vulnerability until we've issued a fix and advisory
We will:
- Work with you to understand and validate the issue
- Keep you informed of our progress
- Credit you in the security advisory (unless you prefer to remain anonymous)
- Coordinate the public disclosure with you
Security Best Practices
When deploying nself-chat in production, please follow these security best practices:
Environment Configuration
-
Never use development authentication in production:
NEXT_PUBLIC_USE_DEV_AUTH=false -
Use strong secrets (minimum 32 characters):
HASURA_ADMIN_SECRET=<strong-random-string> JWT_SECRET=<strong-random-string> SOCIAL_MEDIA_ENCRYPTION_KEY=<strong-random-string> -
Use production URLs (never localhost):
NEXT_PUBLIC_APP_URL=https://your-domain.com NEXT_PUBLIC_GRAPHQL_URL=https://api.your-domain.com/v1/graphql -
Enable email verification:
NEXT_PUBLIC_AUTH_REQUIRE_EMAIL_VERIFICATION=true
Authentication
- Configure OAuth providers with production credentials
- Use domain restrictions for team workspaces:
NEXT_PUBLIC_AUTH_ACCESS_MODE=domain-restricted NEXT_PUBLIC_AUTH_ALLOWED_DOMAINS=your-company.com - Enable 2FA for admin accounts
- Rotate JWT secrets periodically
Network Security
- Always use HTTPS in production
- Configure proper CORS headers
- Use environment-specific API keys
- Keep all dependencies up to date
Data Protection
- Enable encryption at rest for database
- Use encrypted connections for all services
- Regularly backup your database
- Implement proper key management for encryption keys
Monitoring
- Enable Sentry for error tracking:
NEXT_PUBLIC_SENTRY_DSN=https://... - Monitor failed authentication attempts
- Set up alerts for suspicious activity
- Review audit logs regularly
Updates
- Subscribe to security advisories
- Apply security patches promptly
- Test updates in staging before production
- Keep nself CLI and all services updated
Known Security Considerations
Development Mode
- Test users have weak passwords - Never expose dev mode to the internet
- Auto-login is enabled - Only use in local development
- Reduced security checks - Many validations are disabled
Third-Party Integrations
- Social media tokens are encrypted - But encryption key must be kept secret
- OAuth credentials - Store securely and never commit to git
- API keys - Use environment variables, not hardcoded values
File Uploads
- File type validation is enforced
- File size limits are configurable
- Virus scanning is recommended for production (not included by default)
Security Features
nself-chat includes the following security features:
- JWT-based authentication via Nhost Auth
- Role-based access control (RBAC) with 5 default roles
- Content Security Policy (CSP) headers
- XSS protection via React's built-in escaping
- CSRF protection via SameSite cookies
- SQL injection protection via Hasura's GraphQL layer
- Rate limiting on authentication endpoints
- Audit logging for admin actions
- Token encryption for third-party OAuth credentials
- Secure password hashing (bcrypt via Nhost)
Security Audit History
| Date | Auditor | Scope | Report |
|---|---|---|---|
| 2026-01-29 | Internal | Full codebase | docs/SECURITY-AUDIT.md |
Compliance
nself-chat is designed with the following compliance considerations:
- GDPR: Data export and deletion capabilities
- CCPA: User data management and consent
- SOC 2: Audit logging and access controls
- WCAG 2.1 AA: Accessibility standards
Additional Resources
- Security Audit Report
- Authentication Documentation
- Deployment Security Guide
- Environment Variables Reference
Contact
- Security Issues: [email protected]
- General Support: [email protected]
- Documentation: https://github.com/nself-org/nchat/tree/main/docs
Hall of Fame
We appreciate security researchers who help keep nself-chat safe:
Last Updated: January 30, 2026 Version: 0.3.0