Skip to content

Security: masabinhok/create-nestjs-auth

Security

SECURITY.md

Security Policy

Supported Versions

We release patches for security vulnerabilities. Which versions are eligible for receiving such patches depends on the CVSS v3.0 Rating:

Version Supported
2.x.x
1.x.x

Reporting a Vulnerability

Please do not report security vulnerabilities through public GitHub issues.

Instead, please report them via email to sabin.shrestha.er@gmail.com.

You should receive a response within 48 hours. If for some reason you do not, please follow up via email to ensure we received your original message.

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:

  • Type of issue (e.g., buffer overflow, SQL injection, cross-site scripting, etc.)
  • Full paths of source file(s) related to the manifestation of the issue
  • The location of the affected source code (tag/branch/commit or direct URL)
  • Any special configuration required to reproduce the issue
  • Step-by-step instructions to reproduce the issue
  • Proof-of-concept or exploit code (if possible)
  • Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

Preferred Languages

We prefer all communications to be in English.

Policy

We follow the principle of Coordinated Vulnerability Disclosure.

Security Best Practices for Generated Projects

Projects generated by create-nestjs-auth include several security features:

Built-in Security Features

  1. JWT Authentication

    • Access tokens with short expiry (15 minutes default)
    • Refresh tokens stored in HttpOnly cookies
    • Automatic token rotation
  2. Password Security

    • bcrypt hashing with 12 rounds
    • Password strength validation
    • No plain-text password logging
  3. Rate Limiting

    • Configurable rate limits for auth endpoints
    • Brute-force protection
  4. CORS Configuration

    • Configurable allowed origins
    • Credentials handling
  5. Helmet Integration

    • Security headers automatically set

Recommended Post-Installation Steps

  1. Change default secrets

    # Generate new JWT secrets
    openssl rand -base64 32
  2. Update default admin credentials

    • Change the seeded admin password immediately
    • Use a strong, unique password
  3. Configure environment variables

    • Never commit .env files
    • Use secrets management in production
  4. Enable HTTPS

    • Always use HTTPS in production
    • Configure proper SSL certificates
  5. Database Security

    • Use strong database passwords
    • Limit database user permissions
    • Enable SSL for database connections

Security Updates

Security updates will be released as patch versions. Subscribe to GitHub releases to stay informed about security updates.

There aren't any published security advisories