4 Commits

Author SHA1 Message Date
Username
c996b7166d tests: fix ruff 0.15 formatting
Some checks failed
CI / Security Scan (push) Successful in 32s
CI / Lint & Format (push) Successful in 37s
CI / Security Tests (push) Successful in 41s
CI / Unit Tests (push) Successful in 1m4s
CI / Advanced Security Tests (push) Successful in 29s
CI / Memory Leak Check (push) Successful in 28s
CI / Fuzz Testing (push) Successful in 40s
CI / SBOM Generation (push) Successful in 33s
CI / Build & Push Image (push) Failing after 1m11s
CI / Harbor Vulnerability Scan (push) Has been skipped
2026-02-16 22:04:27 +01:00
Username
3cda73c8b0 simplify MIME detection to text/binary only
Remove magic byte detection in favor of simple UTF-8 validation:
- text/plain for valid UTF-8 content
- application/octet-stream for binary data

Security maintained via headers (X-Content-Type-Options: nosniff, CSP).
Magic signatures preserved as comments for future reference.

Disabled test files:
- test_mime_detection.py.disabled (magic-dependent tests)
- test_polyglot.py.disabled (polyglot format tests)

For full MIME detection, consider using the `filetype` library.
2025-12-26 18:44:24 +01:00
Username
dc2da67fb3 add Hypothesis property-based MIME detection tests
Some checks failed
CI / Lint & Format (push) Failing after 16s
CI / Unit Tests (push) Has been skipped
CI / Memory Leak Check (push) Has been skipped
CI / SBOM Generation (push) Has been skipped
CI / Security Scan (push) Successful in 20s
CI / Security Tests (push) Has been skipped
CI / Advanced Security Tests (push) Has been skipped
- test_magic_prefix_detection: verify all signatures with random suffix
- test_random_binary_never_crashes: random data never crashes
- test_partial_magic_no_false_match: truncated magic handled safely
- test_magic_not_at_start_ignored: only detect magic at offset 0
2025-12-26 17:09:02 +01:00
Username
debdc8478e add hypothesis-based fuzzing test suite
Some checks failed
CI / Lint & Format (push) Failing after 16s
CI / Unit Tests (push) Has been cancelled
CI / Security Tests (push) Has been cancelled
CI / Memory Leak Check (push) Has been cancelled
CI / SBOM Generation (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
18 property-based tests covering:
- Content handling (binary, text, unicode)
- Paste ID validation and path traversal
- Header fuzzing (auth, proxy, XFF)
- JSON endpoint fuzzing
- Size limit enforcement
- Injection detection (SQLi, SSTI, XSS)
- Error handling paths
2025-12-25 19:20:16 +01:00