HuggingClip / SECURITY.md
somratpro's picture
chore: rename CLAUDE_API_KEY to ANTHROPIC_API_KEY and add GEMINI/OPENAI placeholders to configuration files
c465b41
# Security Policy
## Supported Versions
| Version | Supported |
|---------|-----------|
| 1.x | βœ… Yes |
## Reporting a Vulnerability
**Do NOT open a public issue for security vulnerabilities.**
Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
We will respond within 48 hours and aim to patch critical issues within 7 days.
## Security Best Practices
### Secrets Management
- **Never commit secrets to git** β€” use HF Space secrets or environment variables
- `HF_TOKEN`: Store as HF Space secret, not in code
- `ANTHROPIC_API_KEY`, `LLM_API_KEY`: Same β€” HF Space secrets only
- `BETTER_AUTH_SECRET`: Generate strong random secret (`openssl rand -base64 32`)
- Rotate tokens if accidentally exposed
### Network Security
- `umask 0077` enforced at startup β€” all files created owner-only
- Cloudflare proxy uses shared secret for authentication
- No hardcoded credentials anywhere in codebase
### Database Security
- PostgreSQL runs locally inside container β€” not exposed externally
- HF Dataset backups are **private by default**
- Backup file contains all database data β€” protect your HF Dataset access
### API Security
- Paperclip API runs on port 3100 (internal only)
- Port 7861 exposes health dashboard and proxied access only
- Configure `BETTER_AUTH_SECRET` for production authentication
- Use `PAPERCLIP_DEPLOYMENT_MODE=authenticated` for public-facing deployments
### Container Security
- Based on `node:lts-trixie-slim` (minimal attack surface)
- No root process execution where avoidable
- Regular base image updates recommended
## Known Limitations
- HF Spaces free tier is public β€” anyone can access your Paperclip UI unless auth is configured
- Database backup stored in HF Dataset β€” ensure dataset is **private**
- Cloudflare Worker proxy can access proxied traffic β€” review before enabling