Skip to content

Security: MASH-Mushroom-Automation/MASH-Backend

Security

SECURITY.md

Security Policy

Supported Versions

We actively support the following versions of MASH-Backend with security updates:

Version Supported Notes
1.x.x βœ… Current release - Full support
0.x.x ❌ Beta/Development - No support

Reporting a Vulnerability

We take the security of MASH-Backend seriously. If you discover a security vulnerability, please follow these steps:

πŸ“§ How to Report

DO NOT open a public GitHub issue for security vulnerabilities.

Instead, please report security issues privately by:

  1. Email: Send details to mash.mushroom.automation@gmail.com
  2. GitHub Security Advisory: Use GitHub's private vulnerability reporting

πŸ“ What to Include

Please include the following information in your report:

  • Description: A clear description of the vulnerability
  • Impact: What type of vulnerability it is (e.g., SQL injection, XSS, authentication bypass)
  • Steps to Reproduce: Detailed steps to reproduce the issue
  • Proof of Concept: Code snippets or screenshots if applicable
  • Suggested Fix: If you have suggestions on how to fix the issue
  • Your Contact Info: So we can follow up with questions

⏱️ Response Timeline

  • Initial Response: Within 48 hours of receiving your report
  • Status Update: Every 7 days until resolution
  • Fix Timeline: Critical issues within 7 days, high severity within 14 days, medium/low within 30 days

πŸ”’ Disclosure Policy

  • We follow Coordinated Vulnerability Disclosure (CVD)
  • We request a 90-day embargo to develop and deploy fixes before public disclosure
  • We will credit you in our security advisory (unless you prefer to remain anonymous)
  • We may offer bug bounties for critical vulnerabilities (contact us for details)

βœ… What to Expect

If Accepted:

  • We will confirm the vulnerability and work on a fix
  • We will keep you updated on our progress
  • We will credit you in the security advisory and release notes
  • We will notify you before public disclosure

If Declined:

  • We will provide a clear explanation of why we don't consider it a vulnerability
  • We will suggest alternative solutions if applicable

Security Best Practices

For Users

  1. Authentication

    • Use strong passwords (minimum 12 characters)
    • Enable Two-Factor Authentication (2FA) when available
    • Rotate API keys regularly
    • Never commit secrets or credentials to version control
  2. Environment Configuration

    • Keep .env files secure and never commit them
    • Use different credentials for development and production
    • Regularly update dependencies (npm audit fix)
    • Enable HTTPS in production
  3. Access Control

    • Follow the principle of least privilege
    • Regularly review user permissions
    • Disable unused API endpoints
    • Monitor audit logs for suspicious activity

For Developers

  1. Code Security

    • Run npm audit before every deployment
    • Keep all dependencies up to date
    • Use parameterized queries to prevent SQL injection
    • Validate and sanitize all user inputs
    • Implement rate limiting on all API endpoints
  2. Secrets Management

    • Never hardcode secrets in source code
    • Use environment variables for sensitive data
    • Use .env.example for templates (without actual values)
    • Rotate secrets regularly
  3. Testing

    • Write security tests for authentication and authorization
    • Test for common vulnerabilities (OWASP Top 10)
    • Perform regular security audits
    • Use tools like npm audit, snyk, or similar

Known Security Features

Authentication & Authorization

  • βœ… Clerk-based authentication with OAuth support (Google, GitHub, Facebook)
  • βœ… JWT token-based session management
  • βœ… Role-based access control (RBAC)
  • βœ… Two-Factor Authentication (2FA) support
  • βœ… Session management and device tracking
  • βœ… API key authentication for external services

Data Protection

  • βœ… Bcrypt password hashing
  • βœ… HTTPS/TLS encryption in production
  • βœ… Input validation using class-validator
  • βœ… SQL injection prevention via Prisma ORM
  • βœ… XSS protection with helmet middleware
  • βœ… CORS configuration for trusted origins

Rate Limiting & DDoS Protection

  • βœ… Redis-backed distributed rate limiting
  • βœ… Throttling guards on sensitive endpoints
  • βœ… Request timeout configuration
  • βœ… Body parser limits

Monitoring & Logging

  • βœ… Prometheus metrics for security events
  • βœ… OpenTelemetry tracing
  • βœ… Audit logs for sensitive operations
  • βœ… Slow query logging
  • βœ… Error tracking and alerting

Security Checklist for Deployment

  • Environment variables properly configured
  • Database connection uses SSL
  • Redis connection secured with password
  • Clerk credentials configured (production keys)
  • JWT secrets are strong and unique
  • Rate limiting enabled and tested
  • CORS configured for production domains only
  • HTTPS/TLS certificates installed
  • Security headers configured (helmet)
  • File upload limits set appropriately
  • Logging configured for audit trails
  • Backup strategy in place
  • Monitoring and alerting configured
  • Regular security updates scheduled
  • Incident response plan documented

Security Contacts

Acknowledgments

We would like to thank the following security researchers for responsibly disclosing vulnerabilities:

  • No security issues reported yet

Additional Resources


Last Updated: October 15, 2025
Policy Version: 1.0.0

There aren't any published security advisories