|
| 1 | +# MailStack v1.2.1 Security Audit Report |
| 2 | + |
| 3 | +## Result |
| 4 | + |
| 5 | +**Static/application security review: PASS** |
| 6 | +**Live production security acceptance: pending controlled installation** |
| 7 | + |
| 8 | +## Dependency remediation |
| 9 | + |
| 10 | +- Rejected release v1.2.0 pinned vulnerable Bleach 6.3.0 and python-dotenv 1.2.1. |
| 11 | +- v1.2.1 pins Bleach 6.4.0 and python-dotenv 1.2.2. |
| 12 | +- Bleach email linkification is explicitly disabled with `parse_email=False`. |
| 13 | +- `scripts/audit_dependencies_v1_2_1.sh` uses an AST check to guarantee exactly one `Linker` call and a literal `parse_email=False` before applying the narrow `GHSA-g75f-g53v-794x` exception. |
| 14 | +- Any additional Linker call or any change enabling email parsing fails the audit. |
| 15 | +- Deployment and post-deployment verification require exact Django, Bleach, and python-dotenv versions. |
| 16 | + |
| 17 | +## Application controls verified |
| 18 | + |
| 19 | +- Central object-level authorization for mailbox, message, safe HTML, attachment, dashboard, and live-update access |
| 20 | +- Administrator-only user management |
| 21 | +- Ordinary-user mailbox isolation |
| 22 | +- Separate message-delete and mailbox-delete permissions |
| 23 | +- CSRF-protected POST destructive actions with confirmation |
| 24 | +- Soft deletion preserves Maildir evidence and blocks re-ingestion/reuse |
| 25 | +- No user password-change or public password-reset route |
| 26 | +- Case-insensitive username and mailbox uniqueness |
| 27 | +- Inter-process mailbox provisioning lock |
| 28 | +- Parameterized cross-schema SQL |
| 29 | +- Confined paths and symlink rejection |
| 30 | +- Sanitized HTML in a sandboxed iframe |
| 31 | +- Authorized attachment delivery as `application/octet-stream` |
| 32 | +- Authenticated, scoped, bounded, body-free live-update payloads |
| 33 | +- Safe DOM insertion using `textContent` |
| 34 | +- Nginx duplicate Host-header defect remains closed |
| 35 | +- ACME, dotfile denial, TLS, protected attachments, and security headers preserved |
| 36 | +- Release source cannot be the live application tree |
| 37 | + |
| 38 | +## Tool results |
| 39 | + |
| 40 | +- 187 automated tests: PASS |
| 41 | +- Ruff: PASS |
| 42 | +- Bandit: PASS |
| 43 | +- Django checks: PASS |
| 44 | +- Migration drift: PASS |
| 45 | +- Local online vulnerability query: unavailable because the build container cannot resolve public PyPI |
| 46 | + |
| 47 | +## Mandatory server gate |
| 48 | + |
| 49 | +Run `scripts/audit_dependencies_v1_2_1.sh` on the network-enabled VPS. Installation is prohibited unless it reports `Online dependency vulnerability audit: PASS`. |
0 commit comments