Skip to content

Security: bahadhay/NutritionLab

Security

SECURITY.md

Security Policy

Reporting a Vulnerability

If you discover a security vulnerability within this project, please send an email to bahadhay7@gmail.com. All security vulnerabilities will be promptly addressed.

Security Best Practices

Configuration Files

This project uses sensitive configuration files that should NEVER be committed to Git:

  • backend/mail.config.php - Email/SMTP credentials
  • backend/config/dbcon.php - Database credentials

Setup Instructions:

  1. Copy backend/mail.config.example.php to backend/mail.config.php
  2. Update backend/mail.config.php with your actual credentials
  3. NEVER commit backend/mail.config.php to Git

Email Configuration

For Gmail users:

Database Security

  • Change default database credentials
  • Use strong passwords
  • Never commit database credentials to Git
  • Use prepared statements to prevent SQL injection

Production Deployment

  • Enable HTTPS/SSL
  • Change all default credentials
  • Use environment variables for sensitive data
  • Disable error display (display_errors = Off)
  • Enable error logging
  • Regular security updates

Known Issues

April 9, 2026: SMTP credentials were accidentally exposed in commit history.

  • Action Taken: Credentials rotated, .gitignore updated
  • Recommendation: All users should change their email passwords

Security Checklist

  • Email credentials changed from defaults
  • Database credentials changed from defaults
  • 2FA enabled on email accounts
  • Using App Passwords for Gmail
  • HTTPS enabled in production
  • Error logging enabled
  • Input validation implemented
  • SQL injection prevention (prepared statements)
  • Regular backups configured

There aren't any published security advisories