Commit graph

2 commits

Author SHA1 Message Date
jedarden
16d93b0feb feat(bf-2pxsu): add logging for JavaScript execution attempts
- Add warn! macro import to javascript.rs module
- Add warning log at detect_javascript() entry point stating execution is not supported
- Update verification note for bf-2pxsu

This complements the logging already present in detection.rs (from bf-2pyg1) by ensuring the JavaScript module itself has appropriate logging.

Per TH-04 threat model, pdftract NEVER executes embedded JavaScript; this logging explicitly confirms detection-only behavior.
2026-07-05 16:36:16 -04:00
jedarden
440e8fd075 feat(bf-2pxsu): add logging for JavaScript execution attempts
Add warning-level logging at all JavaScript detection points in pdftract-core:

- Add warn import to tracing macros in detection.rs
- Add 'JavaScript execution attempted but not supported' warning at 6 detection points:
  - Catalog /OpenAction detection
  - Catalog /AA (Additional Actions) detection
  - Page-level /AA detection
  - Page annotation /A (primary action) detection
  - Page annotation /AA (additional actions) detection
  - AcroForm fields /AA detection
- Each warning references TH-04 threat model and states detection-only posture

Verification: notes/bf-2pxsu.md
Tests: All 46 detection tests pass
Acceptance criteria: PASS (compilation, logging, context, warnings)

Closes bf-2pxsu
2026-07-05 16:33:48 -04:00