Currently supported versions with security updates:
| Version | Supported |
|---|---|
| 1.x | β |
If you discover a security vulnerability, please DO NOT:
- β Open a public issue on GitHub
- β Discuss it in public channels (Discord, Slack, etc.)
- β Exploit the vulnerability
Please DO:
- β Email us at furkankoykiran@gmail.com
- β Include "VULNERABILITY" in the subject line
- β Provide details about the vulnerability
- β Include steps to reproduce (if applicable)
When reporting a vulnerability, please include:
- Description: Clear description of the vulnerability
- Impact: Potential impact if exploited
- Reproduction: Steps to reproduce the issue
- Environment: Version number, OS, Python version
- Proof of Concept (if safe): Code or screenshot demonstrating the issue
- Initial response: Within 48 hours
- Detailed response: Within 7 days
- Patch release: As soon as feasible (typically within 14 days)
- Security advisory: Published with the patch
-
Keep dependencies updated:
pip install --upgrade -r requirements.txt
-
Run in isolated environment:
- Use Docker containers
- Use virtual environments
- Don't run as root/admin
-
Validate inputs:
- Check file types before upload
- Limit file sizes
- Sanitize user inputs
-
Secure deployment:
- Use HTTPS in production
- Add authentication
- Implement rate limiting
- Keep API keys private
-
Input validation:
# Validate file types ALLOWED_TYPES = {"image/jpeg", "image/png", "image/webp"} if file.content_type not in ALLOWED_TYPES: raise HTTPException(400, "Invalid file type")
-
File size limits:
MAX_FILE_SIZE = 5 * 1024 * 1024 # 5MB if file.size > MAX_FILE_SIZE: raise HTTPException(400, "File too large")
-
Secure dependencies:
pip install safety safety check
-
Code review:
- Review all code changes
- Use static analysis tools
- Run security scanners
Risk: Users can upload malicious files
Mitigation:
# Validate file type
ALLOWED_EXTENSIONS = {".jpg", ".jpeg", ".png"}
def validate_file(filename: str) -> bool:
return Path(filename).suffix.lower() in ALLOWED_EXTENSIONSRisk: Attackers can extract training data from the model
Mitigation:
- Don't expose raw model outputs in production
- Add noise to predictions
- Limit API access rate
Risk: Attackers can overwhelm the server with large files
Mitigation:
# Implement rate limiting
from slowapi import Limiter
limiter = Limiter(key_func=get_remote_address)
@app.post("/detect")
@limiter.limit("10/minute")
async def detect(request: Request):
...This project has NOT undergone a formal security audit. Use at your own risk.
For production deployments, consider:
- Professional security audit
- Penetration testing
- Regular dependency updates
- Monitoring and logging
For security-related questions:
- Email: furkankoykiran@gmail.com
- GitHub Security: Report vulnerability
Thank you for helping keep AI Face Detector secure! π