Skip to content

Generalize trusted file conversion beyond PDFs #10884

@Jayant-kernel

Description

@Jayant-kernel

Summary

This tracks the GSoC work to generalize the Qubes PDF converter into a safer file conversion flow for more untrusted formats.

The existing qvm-convert-pdf design is the base: parsing and rendering happen inside a Disposable VM, and the client receives only simple output data to rebuild a trusted file. The goal is to keep that model, keep qvm-convert-pdf backward compatible, and add a generic qvm-convert-file path for other formats.

Planned direction

  • Keep qvm-convert-pdf and qubes.PdfConvert working as they do today.
  • Add qvm-convert-file with MIME-based dispatch instead of trusting file extensions.
  • Start with PDF-only dispatch, then add document conversion in small steps.
  • For office-like files, convert to PDF inside the Disposable VM, then reuse the existing PDF-to-pixels style pipeline.
  • Learn from Dangerzone's document conversion design where it makes sense, while keeping the Qubes implementation compatible with qrexec and Disposable VMs.
  • Decide later how the generic command should interact with the existing Qubes image converter, rather than duplicating that work.

First steps

  1. Split PDF rendering from the common server flow.
  2. Add a small renderer dispatch/interface, with PDF as the first renderer.
  3. Add qvm-convert-file with PDF-only MIME dispatch.
  4. Add client-side service/profile routing for future converters.
  5. Add the first document renderer and qrexec service after the structure is reviewed.
  6. Add tests, hardening, docs, and desktop integration as the supported formats grow.

Non-goals for the early PRs

  • No change to the existing PDF wire protocol unless explicitly reviewed.
  • No large "all file types at once" PR.
  • No direct import of the full Dangerzone app.
  • No GUI/OCR/media work before the core document path is reviewed.

Related PRs

Done when

  • qvm-convert-pdf remains backward compatible.
  • qvm-convert-file exists and dispatches supported formats by MIME type.
  • At least one non-PDF document path works through a Disposable VM.
  • Failure cases and unsupported types are handled clearly.
  • Tests and docs cover the supported formats and safety tradeoffs.

Metadata

Metadata

Assignees

Labels

C: otherNo other component ("C:") label applies to this issue, or the appropriate label is not yet known.P: defaultPriority: default. Default priority for new issues, to be replaced given sufficient information.S: passed reviewStatus: passed review. Waiting for the core devs to add the contrib package or merge the code.community devThis is being developed by a member of the community rather than a core Qubes developer.pr submittedA pull request has been submitted for this issue.
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions