|
| 1 | +# Security Policy |
| 2 | + |
| 3 | +## Supported Versions |
| 4 | + |
| 5 | +| Version | Supported | |
| 6 | +| ------- | ------------------ | |
| 7 | +| 0.9.x | :white_check_mark: | |
| 8 | +| < 0.9 | :x: | |
| 9 | + |
| 10 | +## Security Model |
| 11 | + |
| 12 | +**Important**: This integration relies primarily on **Home Assistant's security model**. Camera Snapshot Processor is a lightweight image processing layer that: |
| 13 | + |
| 14 | +- Does not store credentials (Home Assistant does) |
| 15 | +- Does not handle authentication (Home Assistant does) |
| 16 | +- Does not expose additional network endpoints |
| 17 | +- Simply processes images from cameras already configured in Home Assistant |
| 18 | + |
| 19 | +The main security is provided by Home Assistant itself. This integration is as secure as your Home Assistant installation. |
| 20 | + |
| 21 | +## Reporting a Vulnerability |
| 22 | + |
| 23 | +This is an open source hobby project maintained in spare time. If you find a security issue: |
| 24 | + |
| 25 | +1. **For critical issues**: Use [GitHub Security Advisory](https://github.com/Patras3/camera-snapshot-processor/security/advisories/new) |
| 26 | +2. **For non-critical issues**: Regular [GitHub Issues](https://github.com/Patras3/camera-snapshot-processor/issues) are fine |
| 27 | + |
| 28 | +### What to Include |
| 29 | + |
| 30 | +- Description of the vulnerability |
| 31 | +- Steps to reproduce |
| 32 | +- Potential impact |
| 33 | +- Any suggested fixes (optional) |
| 34 | + |
| 35 | +### Response Timeline |
| 36 | + |
| 37 | +This is a hobby project, so: |
| 38 | +- **Response**: Best effort, when time allows |
| 39 | +- **Fixes**: Will be included in next scheduled release |
| 40 | +- **Critical CVEs**: May warrant immediate patch release if severe |
| 41 | + |
| 42 | +We use automated tools (pip-audit, CodeQL, Dependabot) to catch known vulnerabilities, but fixes are released on a regular schedule rather than emergency basis (unless critical). |
| 43 | + |
| 44 | +## Automated Security Scanning |
| 45 | + |
| 46 | +While this is a hobby project, we still care about security: |
| 47 | + |
| 48 | +- **pip-audit**: Daily scans for known CVEs in dependencies |
| 49 | +- **CodeQL**: Automated code analysis |
| 50 | +- **Dependabot**: Automatic PR for dependency updates |
| 51 | + |
| 52 | +These tools catch issues automatically, but fixes are released on a normal schedule. |
| 53 | + |
| 54 | +## Security Through Design |
| 55 | + |
| 56 | +### Minimal Attack Surface |
| 57 | + |
| 58 | +- **Only one dependency**: Pillow (Python Imaging Library) |
| 59 | +- No network listeners, no external services |
| 60 | +- No custom authentication or credential storage |
| 61 | +- Runs entirely within Home Assistant's security context |
| 62 | + |
| 63 | +### Home Assistant Integration |
| 64 | + |
| 65 | +This integration inherits Home Assistant's security: |
| 66 | +- **Authentication**: Handled by Home Assistant |
| 67 | +- **Credential Storage**: Home Assistant's encrypted database |
| 68 | +- **Template Execution**: Home Assistant's sandboxed template engine |
| 69 | +- **Network Security**: Home Assistant's web server and SSL |
| 70 | + |
| 71 | +### What We Do |
| 72 | + |
| 73 | +- ✅ Redact credentials from debug logs |
| 74 | +- ✅ Validate user inputs |
| 75 | +- ✅ Use minimal dependencies |
| 76 | +- ✅ Automated CVE scanning |
| 77 | + |
| 78 | +### What Home Assistant Does |
| 79 | + |
| 80 | +- 🔐 User authentication |
| 81 | +- 🔐 Credential encryption |
| 82 | +- 🔐 Template sandboxing |
| 83 | +- 🔐 HTTPS/SSL |
| 84 | +- 🔐 Access control |
| 85 | + |
| 86 | +## Best Practices for Users |
| 87 | + |
| 88 | +**Most important**: Keep Home Assistant updated! |
| 89 | + |
| 90 | +Other tips: |
| 91 | +- Use strong camera passwords |
| 92 | +- Enable HTTPS on Home Assistant |
| 93 | +- Don't share RTSP URLs publicly |
| 94 | +- Review templates before adding them |
| 95 | + |
| 96 | +## Known Design Choices |
| 97 | + |
| 98 | +- **Stream URLs forwarded as-is**: Required for streaming to work |
| 99 | +- **Credentials in logs**: Automatically sanitized (shown as `***:***@`) |
| 100 | +- **Minimal validation**: Relies on Home Assistant's validation |
| 101 | +- **No caching**: Always fresh images, no stale data |
| 102 | + |
| 103 | +## Contact |
| 104 | + |
| 105 | +Found a bug or have a security concern? |
| 106 | +- [GitHub Issues](https://github.com/Patras3/camera-snapshot-processor/issues) |
| 107 | +- [GitHub Discussions](https://github.com/Patras3/camera-snapshot-processor/discussions) |
| 108 | + |
| 109 | +Remember: This is a hobby project maintained in spare time. Be patient and kind! 😊 |
0 commit comments