Skip to content

Security: bryamzxz/sensor_app

Security

SECURITY.md

Security Policy

Supported Versions

Version Supported
2.x.x
< 2.0

Reporting a Vulnerability

We take security seriously. If you discover a security vulnerability, please follow these steps:

Do NOT

  • Open a public GitHub issue for security vulnerabilities
  • Disclose the vulnerability publicly before it's fixed

Do

  1. Email the maintainers with details about the vulnerability
  2. Include the following information:
    • Description of the vulnerability
    • Steps to reproduce
    • Potential impact
    • Suggested fix (if any)

What to Expect

  • Acknowledgment: We will acknowledge receipt within 48 hours
  • Initial Assessment: Within 7 days, we will provide an initial assessment
  • Resolution Timeline: We aim to fix critical vulnerabilities within 30 days
  • Disclosure: We will coordinate disclosure timing with you

Security Best Practices

When deploying sensor_app, follow these security practices:

Environment Variables

  • Never commit .env files to version control
  • Store secrets securely (use vault solutions in production)
  • Rotate Telegram tokens periodically
  • Use restrictive file permissions for .env files:
    chmod 600 .env

Container Security

  • Run containers as non-root user (default in our Containerfile)
  • Use read-only file systems where possible
  • Limit container capabilities (configured in Quadlet with --cap-drop=all)
  • Use --security-opt=no-new-privileges for additional security

Network Security

  • Use HTTPS for Telegram API (default)
  • Consider network isolation for the container
  • Limit outbound connections if possible

Data Security

  • Database files are stored in /app/data by default
  • Ensure proper file permissions on host volumes
  • Consider encryption at rest for sensitive deployments
  • Review data retention settings (DATA_RETENTION_DAYS)

Logging

  • Log files may contain sensitive timing information
  • Ensure log directory has restricted permissions
  • Consider log rotation and secure deletion

Dependencies

  • Regularly update dependencies using Dependabot
  • Review security advisories for dependencies
  • Run pip-audit to check for known vulnerabilities:
    pip install pip-audit
    pip-audit

Security Features

Input Validation

  • Sensor values are validated against expected ranges
  • Serial input is sanitized before processing
  • Database queries use parameterized statements

Rate Limiting

  • Telegram notifications have configurable rate limiting
  • Prevents accidental notification flooding

Secure Defaults

  • Non-root user in container
  • Restrictive directory permissions (0o700)
  • WAL mode for database integrity

Vulnerability History

No known vulnerabilities at this time.

Contact

For security concerns, contact the maintainers through:

  • GitHub security advisories (preferred for confirmed vulnerabilities)
  • Direct email to maintainers

Thank you for helping keep sensor_app secure!

There aren’t any published security advisories