Spaces:
Running
Running
Revise SECURITY.md for clarity and completeness
Browse filesUpdated the security policy to include new version support, improved vulnerability reporting instructions, detailed security measures, logging practices, and known limitations.
- SECURITY.md +37 -16
SECURITY.md
CHANGED
|
@@ -2,28 +2,49 @@
|
|
| 2 |
|
| 3 |
## Supported Versions
|
| 4 |
|
| 5 |
-
| Version | Supported
|
| 6 |
-
|
|
| 7 |
-
|
|
|
|
|
| 8 |
|
| 9 |
## Reporting a Vulnerability
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
Include:
|
| 16 |
-
-
|
| 17 |
-
- Steps to reproduce
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
|
| 21 |
-
Expected response time: 48 hours
|
| 22 |
|
| 23 |
-
## Security
|
| 24 |
|
| 25 |
-
|
| 26 |
-
-
|
| 27 |
-
-
|
| 28 |
-
-
|
| 29 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
## Supported Versions
|
| 4 |
|
| 5 |
+
| Version | Supported |
|
| 6 |
+
|---|---|
|
| 7 |
+
| 8.x.x | Yes |
|
| 8 |
+
| < 8.0 | No |
|
| 9 |
|
| 10 |
## Reporting a Vulnerability
|
| 11 |
|
| 12 |
+
Do not open a public issue for a security vulnerability.
|
| 13 |
|
| 14 |
+
Report privately to: abinazebinoy@gmail.com
|
| 15 |
|
| 16 |
Include:
|
| 17 |
+
- A description of the vulnerability
|
| 18 |
+
- Steps to reproduce it
|
| 19 |
+
- Its potential impact
|
| 20 |
+
- A suggested fix, if you have one
|
| 21 |
|
| 22 |
+
Expected initial response time: 48 hours. Please allow a reasonable period to investigate and release a fix before any public disclosure.
|
| 23 |
|
| 24 |
+
## Security Measures in Place
|
| 25 |
|
| 26 |
+
- **Access control** β API-key based role access control (admin / analyst), enforced through a single shared FastAPI dependency (`backend/core/auth.py`) applied uniformly across every router, rather than a per-file reimplementation that could drift or be forgotten on a new endpoint
|
| 27 |
+
- **Key storage** β API keys are stored as salted hashes only; the raw key is shown exactly once, at creation
|
| 28 |
+
- **Admin gate fails closed** β admin-only endpoints return `503` unless `ADMIN_KEY_HASH` is explicitly configured, rather than falling back to a weaker check by default
|
| 29 |
+
- **SSRF protection** β webhook registration resolves the target hostname and rejects private, loopback, link-local, reserved, and multicast IP ranges before accepting the URL
|
| 30 |
+
- **Input validation** β file type is checked against actual file content (magic bytes), not just the extension or the client-supplied MIME type, and the two are cross-checked against each other
|
| 31 |
+
- **Rate limiting** β per-IP sliding-window limits on every endpoint, both a per-route override and a global default
|
| 32 |
+
- **Output escaping** β user-supplied strings that reach the frontend (filename, EXIF field values, tampering-flag text) are HTML-escaped before being rendered, to prevent stored XSS
|
| 33 |
+
- **No persistent storage of uploaded images** β uploaded files are processed in memory for the duration of a single request and are not written to disk
|
| 34 |
+
- **Dependency scanning** β `pip-audit` runs on every CI build against all pinned dependency files
|
| 35 |
+
|
| 36 |
+
## What Is Logged
|
| 37 |
+
|
| 38 |
+
VeriFile-X keeps an append-only audit log (`backend/core/audit_log.py`) recording the uploaded filename, a content hash, and the resulting classification for each analysis, for operational accountability. This is a disclosed, deliberate feature, not incidental data collection β the raw image itself is not persisted, and the log does not record request source IPs in plaintext (IPs are hashed before being written, where logged at all).
|
| 39 |
+
|
| 40 |
+
If your deployment has additional privacy requirements (for example, not recording filenames), that is a configuration decision to make before deploying, not something this document guarantees on your behalf.
|
| 41 |
+
|
| 42 |
+
## Known, Tracked Limitations
|
| 43 |
+
|
| 44 |
+
- `data/api_keys.jsonl` grows by one line per successful authentication with no rotation yet implemented; tracked in [PHASE_ROADMAP.md](PHASE_ROADMAP.md)
|
| 45 |
+
- Webhook SSRF validation currently runs at registration time; re-validating at delivery time (to defeat DNS rebinding between registration and delivery) is a tracked follow-up
|
| 46 |
+
- Several third-party dependencies (notably `transformers` and `torch`) have open, upstream-unfixed CVEs at the time of writing β see the repository's Dependabot alerts for current status; these are tracked, not ignored, and will be resolved as upstream stable fixes ship
|
| 47 |
+
|
| 48 |
+
## License and Responsible Disclosure
|
| 49 |
+
|
| 50 |
+
This project is licensed under the terms in [LICENSE](LICENSE) (PolyForm Noncommercial 1.0.0). Reporting a vulnerability does not grant any additional rights beyond that license, and does not obligate the maintainer to a bug bounty or similar compensation.
|