Skip to content

Security: brokechubb/FatTips

Security

SECURITY.md

Security Policy

Last Updated: 2026-03-09

FatTips takes security seriously. This document outlines our security practices and how to report vulnerabilities.


πŸ”’ Security Architecture

Encryption

  • Algorithm: AES-256-GCM
  • Key Management: Master encryption key stored in environment variables only
  • User Wallets: Each wallet encrypted with unique salt

Authentication

  • Discord Bot: Token-based authentication
  • API: Per-user API keys with ownership validation
  • Database: Limited-privilege database user

Infrastructure

  • Docker: Container isolation with resource limits
  • Network: Internal Docker network, API bound to localhost
  • Firewall: nftables with fail2ban integration

πŸ›‘οΈ Supported Versions

We provide security updates for the latest version only.

Version Supported
0.2.x βœ… Supported
< 0.2 ❌ Not supported

🚨 Reporting a Vulnerability

Please do NOT create a public GitHub issue for security vulnerabilities.

How to Report

  1. Email: security@codestats.gg
  2. Discord: @brokechubb
  3. GitHub Security Advisories: Use the "Report a vulnerability" button

What to Include

  • Description of the vulnerability
  • Steps to reproduce
  • Potential impact
  • Suggested fix (if any)
  • Your contact information

Response Timeline

  • Initial Response: Within 48 hours
  • Status Update: Within 1 week
  • Resolution: Depends on severity (see below)

Severity Levels

Severity Response Time Resolution Time
Critical 24 hours 1 week
High 48 hours 2 weeks
Medium 1 week 1 month
Low 2 weeks 3 months

πŸ” Security Best Practices

For Users

  1. Never share your private key - FatTips will never ask for it
  2. Use secure passwords - For your Discord account
  3. Enable 2FA - On your Discord account
  4. Verify bot permissions - Only grant necessary permissions
  5. Report suspicious activity - Contact us immediately

For Developers

  1. Never commit .env files - Use .env.example as template
  2. Rotate credentials regularly - Especially after team changes
  3. Use separate keys - Development vs Production
  4. Monitor logs - Watch for unusual activity
  5. Keep dependencies updated - Run pnpm update regularly

For Self-Hosters

  1. Generate unique encryption keys - Never use examples
  2. Secure your database - Use strong passwords, limit access
  3. Enable firewall - Only expose necessary ports
  4. Regular backups - Encrypt and store securely
  5. Monitor resources - Watch for unusual CPU/memory usage

πŸ—οΈ Security Features

Data Protection

  • βœ… AES-256-GCM encryption for private keys
  • βœ… Unique salt per user
  • βœ… No plaintext keys in database
  • βœ… Ephemeral Discord responses for sensitive data

Network Security

  • βœ… Docker network isolation
  • βœ… API rate limiting (60/min global, 10/min financial)
  • βœ… CORS configuration
  • βœ… Helmet.js security headers

Application Security

  • βœ… Input validation (Zod)
  • βœ… SQL injection prevention (Prisma ORM)
  • βœ… Error handling without information leakage
  • βœ… Logging without sensitive data

πŸ“‹ Security Checklist

Before Deploying to Production

  • Generate unique MASTER_ENCRYPTION_KEY
  • Use strong database password
  • Enable firewall
  • Set up monitoring
  • Configure backups
  • Test disaster recovery

Regular Maintenance

  • Update dependencies monthly
  • Review logs weekly
  • Check for security advisories
  • Rotate API keys quarterly
  • Test backups monthly

🚨 Known Security Limitations

  1. Discord DMs are not E2EE - Private keys sent via DM are encrypted in transit but not end-to-end encrypted
  2. Custodial by design - While non-custodial (users own keys), the bot has access to encrypted keys
  3. Single point of failure - Master encryption key compromise affects all users

Mitigations

  • Users can export keys and use external wallets
  • Master key stored only in environment, never in code
  • Regular security audits recommended

πŸ“š Additional Resources


πŸ† Security Hall of Fame

We appreciate responsible disclosure. Contributors who report valid security issues will be acknowledged here (with permission).

No reports yet - Be the first!


πŸ“ž Contact

Security Team: security@codestats.gg
PGP Key: [Available upon request]
Response Time: Within 48 hours


License: MIT
Repository: https://github.com/brokechubb/FatTips

There aren’t any published security advisories