LayoutProof is a local command-line tool that reads .pptx files and reports layout, readability and integrity problems. This document describes the security model it is designed around, and how to report a vulnerability.
- LayoutProof makes no network requests. It does not phone home, upload decks, download rule packs, or call out to any analytics service.
- There is no telemetry, no update check, and no remote configuration. Everything runs in-process on your machine.
A .pptx is a zip of XML and binary parts. Untrusted decks are treated as hostile input:
- Never extracted to disk. Archives are read in memory through Python's
zipfile; entries are opened by name and consumed as bytes, so there is no on-disk extraction step for an attacker to influence. - Zip-slip and path traversal rejected. Entry names must be relative POSIX paths. Absolute paths, drive letters, backslashes, and any
..segment are flagged as anomalies and skipped. - Duplicate entries rejected as package anomalies.
- Resource bombs capped. Default hard limits: source file ≤ 100 MB (configurable via
max_file_size_mb), ≤ 5000 zip entries, ≤ 2 GB total uncompressed size. - Required parts validated. A package missing
[Content_Types].xmlor appt/presentation*.xmlmain part is reported as astructure_anomaly, not trusted blindly.
- XML parts are parsed with
lxmlusingresolve_entities=False,no_network=True,huge_tree=False, and DTD loading/validation disabled. - This blocks external entity expansion (XXE), billion-laughs/entity-expansion bombs, and any attempt by a malicious deck to reach the network while being parsed.
layoutproof scannever modifies, moves or deletes the.pptxyou point it at. It opens the archive read-only and closes it.- The
fixsubcommand (alpha) writes only to an explicitly requested--outputpath (default<name>.fixed.pptx) and, unless--no-backupis passed, keeps a backup; it never overwrites the source in place. - The
--output/-oflag forscanwrites a report (text or JSON) to a path you choose; it does not rewrite the deck.
- When given a directory, LayoutProof lists
*.pptx(or**/*.pptxwith-r) directly under that directory. It does not follow symlinks, does not walk hidden or system directories implicitly, and does not read any file outside the target you supplied. - It operates only on files whose suffix is
.pptx.
- LayoutProof does not open slides in PowerPoint/LibreOffice and does not render macros, ActiveX, embedded OLE objects or media players. It inspects OOXML structure only.
- It is not a malware scanner: a deck may contain malicious embedded media that LayoutProof simply cannot execute. Treat untrusted attachments as untrusted regardless.
Only the latest released minor version receives security fixes. As of the 0.1.0a1 alpha, security fixes land on main and are included in the next release.
Please report security issues privately rather than opening a public GitHub issue:
- Open a confidential report through the repository's Security → Report a vulnerability advisory (GitHub Private Vulnerability Reporting).
- Include: the version/commit, your OS and Python version, the smallest
.pptxor input that reproduces the issue, the exact command run, and what went wrong.
We aim to acknowledge reports promptly and will keep you informed through the fix. Because decks can be sensitive, you may redact or scrub content before sharing; a synthetic reproducer is preferred.
- Run LayoutProof with the least-privilege account available; it needs only read access to the decks and write access to wherever you point
--output. - In CI, do not mount secrets into the job that runs
layoutproof scan— the tool itself does not need them, and it should never have a reason to read them. - Keep the default
max_file_size_mbcap for untrusted input.