Repository navigation
PDF: repin the shared reader to craft-libs 9f75d3dc (xref, object-stream, graphics-state and JBIG2 input bounds) - #2265
Conversation
…d3dc for its xref, object-stream, graphics-state and JBIG2 input bounds
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Align PDF dependency pins and validation Cargo.toml, xtask/src/pdf_deps.rs, crates/pdf/README.md |
The workspace pins craft-pdf, hayro-syntax, and hayro-jbig2 to the same craft-libs revision. Dependency validation adds hayro-jbig2 version 0.3.0. The README updates the revision and describes parser bounds, xref reads, and JBIG2 caps. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
storytold/craft-libs#115— The issue identifiescraft-pdfas a shared crate candidate for PDF work; this change updates EffectCraft’s shared PDF dependency revision.
Suggested reviewers: skylartaylor
Merge Risk: 
Minimal · up to d1c49
-
The PDF dependency update is internally aligned and has no established merge-blocking risk.
Security architecture risk: 
Low · up to d1c49
-
The update preserves the existing parser-only feature selection and dependency restrictions. No newly exposed entrypoint or weakened control was found. The remaining uncertainty concerns the upstream parser implementation, whose input-bound guarantees were not independently verified here.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- inferred — The security-relevant exposure is the shared PDF reader processing document-controlled input. Dependency selection changes code inside that existing exposure; the inspected application diff does not introduce a new caller, privilege grant or network-facing entrypoint. Upstream implementation effects remain only partially assessed.
Trust Boundaries and Controls
- observed — The provenance control becomes broader: hayro-jbig2 must now satisfy the same exact source, version and uniqueness checks as the other required PDF packages. Existing feature and backend-package restrictions remain unchanged, providing counterevidence to a control-bypass interpretation of the routed entrypoint signals.
Resilience and Maintainability Implications
- observed — Validation failures remain externally visible through the existing CLI failure exit and aggregated CI failure result. The repin does not change that failure-reporting control.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Repins the shared PDF reader to craft-libs
9f75d3dc, for the input bounds and crash fixes that landed afterca50d63b:/W[0]xref entry type width is read;Changes
craft-pdfmoves to9f75d3dc, still withdefault-features = falseand onlyread.[patch.crates-io]entry forhayro-syntaxmoves to the same revision.hayro-jbig2from the same revision. The JBIG2 bounds live in craft-libs' vendored copy; the crates.io release lacks them.cargo xtask pdf-depspins all three packages to the new revision.crates/pdf/README.mdnames the new revision and what it bounds.No other craft-libs crate changes revision.
Checks
Local
cargo xtask cipassed, includingpdf-depsand the wasm check, except two tests main already fails on machines with ffmpeg 8:effectcraft-export::it hevc_av1_roundtrip::{av1_webm_with_opus, webm_low_bitrate_opus_modes}(#1952). It ran 3631 nextest tests and 232 gpu tests on lavapipe.Summary by CodeRabbit