Skip to content

Security: betaversionio/flutter-boilerplate

Security

.github/SECURITY.md

Security Policy

Reporting a Vulnerability

The BetaVersion team takes security seriously. We appreciate your efforts to responsibly disclose your findings and will make every effort to acknowledge your contributions.

How to Report a Security Vulnerability

Please do not report security vulnerabilities through public GitHub issues.

Instead, please report security vulnerabilities via:

  1. Email: Send details to security@betaversion.io
  2. GitHub Security Advisory: Use the GitHub Security Advisory feature

What to Include in Your Report

Please include the following information in your report:

  • Description: A clear description of the vulnerability
  • Type: The type of vulnerability (e.g., XSS, SQL Injection, Authentication bypass)
  • Location: File path, line numbers, or affected endpoints
  • Impact: Potential impact and severity of the vulnerability
  • Steps to Reproduce: Detailed steps to reproduce the issue
  • Proof of Concept: If possible, include a PoC or example exploit code
  • Suggested Fix: If you have suggestions for fixing the vulnerability
  • Your Contact Information: So we can follow up with you

Example Report

Subject: [SECURITY] SQL Injection in User Profile

Description:
SQL injection vulnerability found in the user profile update endpoint.

Type: SQL Injection

Location:
- File: lib/features/profile/data/profile_repository.dart
- Line: 145

Impact:
An attacker could potentially access, modify, or delete database records.

Steps to Reproduce:
1. Navigate to profile edit page
2. Enter the following in the "bio" field: ' OR 1=1 --
3. Save the profile
4. Observe database query execution

Proof of Concept:
[Include sanitized PoC code or screenshots]

Suggested Fix:
Use parameterized queries or ORM methods to prevent SQL injection.

Response Timeline

  • Initial Response: Within 48 hours of receiving your report
  • Status Update: We will provide status updates every 7 days
  • Resolution Timeline: We aim to resolve critical vulnerabilities within 30 days
  • Public Disclosure: We will coordinate disclosure timing with you

Supported Versions

We currently support the following versions with security updates:

Version Supported
1.x.x
< 1.0

Security Best Practices

For Users

  1. Keep the App Updated: Always use the latest version
  2. Use Strong Passwords: Create strong, unique passwords
  3. Enable Security Features: Use biometric authentication if available
  4. Report Suspicious Activity: Report any unusual behavior immediately
  5. Be Cautious with Permissions: Only grant necessary permissions

For Developers

  1. Secure Coding Practices:

    • Never hardcode sensitive information (API keys, passwords)
    • Use environment variables for configuration
    • Validate and sanitize all user inputs
    • Implement proper authentication and authorization
    • Use HTTPS for all network communications
  2. Data Protection:

    • Encrypt sensitive data at rest and in transit
    • Use secure storage for credentials and tokens
    • Implement proper session management
    • Follow data minimization principles
  3. Dependency Management:

    • Regularly update dependencies
    • Review security advisories for packages
    • Use flutter pub outdated to check for updates
    • Run security audits on dependencies
  4. Code Review:

    • All code must be reviewed before merging
    • Security-focused reviews for sensitive changes
    • Use automated security scanning tools

Known Security Considerations

API Keys and Secrets

  • Never commit API keys or secrets to the repository
  • Use environment variables or secure vaults
  • Rotate keys regularly
  • Use different keys for different environments

Authentication

  • Implement secure token storage (Flutter Secure Storage)
  • Use token refresh mechanisms
  • Implement session timeout
  • Support multi-factor authentication

Data Storage

  • Encrypt sensitive data stored locally
  • Use Flutter Secure Storage for credentials
  • Clear sensitive data on logout
  • Implement secure data deletion

Network Security

  • Use certificate pinning for critical APIs
  • Implement request signing
  • Use secure protocols (HTTPS/WSS)
  • Validate SSL certificates

Platform-Specific Considerations

Android

  • ProGuard/R8 obfuscation enabled
  • App signing configured properly
  • Secure key storage using Android Keystore
  • Disable debug logging in production

iOS

  • App Transport Security (ATS) configured
  • Keychain used for sensitive data
  • Code signing configured properly
  • Disable debug logging in production

Security Scanning

We use the following tools for security scanning:

  • Static Analysis: Dart analyzer with strict lint rules
  • Dependency Scanning: GitHub Dependabot
  • Code Review: Manual security reviews
  • Penetration Testing: Periodic security audits

Security Updates

Security updates will be released as soon as possible after a vulnerability is confirmed. We will:

  1. Fix the vulnerability in a private repository
  2. Test the fix thoroughly
  3. Release a patched version
  4. Publish a security advisory
  5. Credit the reporter (if desired)

Bug Bounty Program

We do not currently have a formal bug bounty program, but we:

  • Acknowledge security researchers in our security advisories
  • Provide public recognition for responsible disclosure
  • May offer rewards for critical vulnerabilities on a case-by-case basis

Security Hall of Fame

We thank the following researchers for responsibly disclosing security vulnerabilities:

  • No reports yet

Compliance

This project aims to comply with:

  • OWASP Mobile Top 10: Following best practices
  • GDPR: Data protection and privacy
  • Indian IT Act: Compliance with local regulations

Contact

For any security-related questions or concerns:

Additional Resources


Last Updated: November 2024

Thank you for helping keep BetaVersion secure!

There aren’t any published security advisories