pdftract/crates/pdftract-cli
jedarden ea1184168d test(pdftract-4h06h): implement TH-02 path traversal security test
Implement comprehensive path-traversal security tests documenting
the 10 canonical payloads from the threat model (plan line 891).

The test suite verifies that the resolve_path function in
mcp/root.rs properly rejects path-traversal attempts when --root
mode is enabled, while allowing HTTPS URLs to bypass validation
per INV-10.

Test coverage:
- All 10 traversal payloads rejected when --root is set
- Valid paths within root are accepted
- HTTPS URLs bypass root check
- Symlink escapes are caught
- URL-encoded traversal is rejected
- Special filesystem paths are rejected
- Deep traversal payloads are caught

Acceptance: All 10 tests pass. Current state documented:
Phase 1 (current): paths pass through without --root; validated with --root
Phase 2 (future): --root mode to be wired to MCP server entry point

References: Plan line 891 (TH-02), INV-10 (no file-path params in HTTP mode)

Closes: pdftract-4h06h
2026-05-25 13:03:45 -04:00
..
benches feat(pdftract-5bzpg): implement pdftract-grep-1000 CI benchmark skeleton 2026-05-25 08:53:23 -04:00
src feat(pdftract-4z362): implement inspector API endpoints 2026-05-25 12:56:01 -04:00
tests test(pdftract-4h06h): implement TH-02 path traversal security test 2026-05-25 13:03:45 -04:00
build.rs docs(pdftract-32y9): finalize SDK architecture note with workspace layout, cross-compile matrix, and KU-12 alignment 2026-05-24 06:38:23 -04:00
Cargo.toml feat(pdftract-4z362): implement inspector API endpoints 2026-05-25 12:56:01 -04:00
pdftract-cli.cdx.json feat(pdftract-67tm8): implement MCP stdio transport with integration tests 2026-05-23 00:16:42 -04:00