Skip to content

PDF: repin the shared reader to craft-libs 9f75d3dc (xref, object-stream, graphics-state and JBIG2 input bounds) - #2265

Merged
aiongg merged 1 commit into
storytold:mainfrom
aiongg:craft-pdf-repin
Oct 24, 2026
Merged

aiongg merged 1 commit into
storytold:mainfrom
aiongg:craft-pdf-repin

Conversation

@aiongg

@aiongg aiongg commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Repins the shared PDF reader to craft-libs 9f75d3dc, for the input bounds and crash fixes that landed after ca50d63b:

  • xref, object-stream and graphics-state work is bounded;
  • the full /W[0] xref entry type width is read;
  • JBIG2 caps long-form referred-to segment counts and allocates bitmaps fallibly.

Changes

  • craft-pdf moves to 9f75d3dc, still with default-features = false and only read.
  • The [patch.crates-io] entry for hayro-syntax moves to the same revision.
  • A new patch entry takes hayro-jbig2 from the same revision. The JBIG2 bounds live in craft-libs' vendored copy; the crates.io release lacks them.
  • cargo xtask pdf-deps pins all three packages to the new revision.
  • crates/pdf/README.md names the new revision and what it bounds.

No other craft-libs crate changes revision.

Checks

Local cargo xtask ci passed, including pdf-deps and 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

  • Chores
    • Updated the components used for PDF processing to a newer revision. The update includes refinements to how document structure and embedded image data are handled, supporting more reliable processing of PDFs with varied content. No new user-facing features or changes to the app’s controls are included in this update.

…d3dc for its xref, object-stream, graphics-state and JBIG2 input bounds
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between b898ba7 and d1c4976.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 3
  • Cargo.toml
  • crates/pdf/README.md
  • xtask/src/pdf_deps.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

Walkthrough

The workspace advances its craft-pdf, hayro-syntax, and hayro-jbig2 pins to one craft-libs revision. Dependency validation now requires hayro-jbig2 version 0.3.0. The PDF README documents the revision and associated parser bounds.

Changes: PDF dependency update

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: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • storytold/craft-libs#115 — The issue identifies craft-pdf as 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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning 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 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: repinning the shared PDF reader to craft-libs revision 9f75d3dc. It also accurately names the key bounds and parser fixes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full 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.

@aiongg
aiongg merged commit eb51087 into storytold:main Oct 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant