pdf-toolkit
Audit PDF files for metadata leakage, page count, encryption, JavaScript, embedded files, and version. Use before sending a PDF externally, when redacting sensitive metadata, or when the user mentions PDF audit, PDF metadata, PDF leakage check, or PDF security review.
What this skill does
# PDF Toolkit Audit `.pdf` files for metadata, page count, encryption status, embedded JavaScript, embedded files, and PDF version — using the standard library only. --- ## Table of Contents - [Keywords](#keywords) - [Quick Start](#quick-start) - [Core Workflows](#core-workflows) - [Tools](#tools) - [Reference Guides](#reference-guides) - [Templates](#templates) - [Best Practices](#best-practices) --- ## Keywords pdf, pdf audit, pdf metadata, pdf review, pdf leakage, pdf security, redaction, document handoff --- ## Quick Start ```bash python scripts/pdf_auditor.py contract.pdf ``` Outputs: PDF version, page count, file size, metadata (Author, Title, Producer, Creator, dates), encryption status, embedded JavaScript indicators, embedded file indicators. --- ## Core Workflows ### Workflow 1: Pre-Handoff PDF Metadata Audit **Goal:** Stop leaking author identity, prior client names, or document history when handing a PDF to an external party. **Steps:** 1. Run: `python scripts/pdf_auditor.py document.pdf` 2. Review metadata fields: - `Author` matches the sender (not "Bob's intern" from a prior project) - `Title` matches the document, not a leftover working title - `Producer` doesn't reveal an internal-only PDF tool - `CreationDate` and `ModDate` are reasonable for the deal 3. If metadata leaks, re-export from source with cleaned properties (or use a redaction tool) **Time Estimate:** 2-3 minutes per document. ### Workflow 2: PDF Security Triage **Goal:** Decide whether a received PDF can be opened safely on a managed laptop. **Steps:** 1. Run audit 2. JavaScript indicator present → quarantine; review in a sandbox 3. Embedded files indicator present → list of file types; quarantine if unexpected 4. Encrypted with non-empty owner password → request password from sender via separate channel 5. Decision: open / quarantine / reject **Time Estimate:** 1-2 minutes per inbound document. ### Workflow 3: Bulk Audit of an Outbound Document Set **Goal:** Audit every PDF in a folder before zipping for a customer or partner. **Steps:** 1. Loop: `for f in *.pdf; do python scripts/pdf_auditor.py "$f" --json; done > audit.jsonl` 2. Parse the JSON Lines for any metadata leakage or anomalies 3. Re-export problem files from source 4. Re-run audit until clean **Time Estimate:** 1-2 minutes per file. --- ## Tools ### pdf_auditor.py Reads a PDF using stdlib parsing — no `pypdf` or `pdfplumber` required. Detects: - PDF version (from header) - Page count (via `/Type /Page` object scan) - File size - Document Info / XMP metadata (Title, Author, Subject, Keywords, Producer, Creator, CreationDate, ModDate) - Encryption status (`/Encrypt` reference present) - JavaScript indicators (`/JS`, `/JavaScript`, `/AA` keys) - Embedded files indicator (`/EmbeddedFiles`) ```bash python scripts/pdf_auditor.py document.pdf python scripts/pdf_auditor.py document.pdf --json ``` **Limits:** - Does **not** extract text content — pure PDF text extraction with stdlib is unreliable. For text extraction install `pdfplumber` or `pypdf` separately. - Cannot decrypt encrypted files. - Detects only the presence of JavaScript/embedded files, not their behavior. --- ## Reference Guides - **`references/pdf_handoff_guide.md`** — What to scrub from PDFs before external send; PDF/A and PDF/UA basics; common leakage patterns --- ## Templates - **`assets/pdf_handoff_checklist.md`** — Pre-send PDF sign-off checklist --- ## Best Practices - **Re-export rather than redact.** Redaction tools that "remove" content can leave it recoverable. The safest path is regenerating the PDF from the source document with sensitive fields removed. - **Scrub document properties at the source.** In Word: File → Inspect Document → Document Inspector. In Pages: File → Properties. Then export to PDF. - **Don't trust filenames.** A file named `Public-Report.pdf` can carry private metadata indistinguishable to the human eye. - **Use PDF/A for archival.** PDF/A removes JavaScript and external dependencies, making documents safe for long-term archive. --- ## Integration Points - Pairs with `legal/` for redacted contract handoffs - Pairs with `c-level-advisor/board-deck-builder` for board pack handoff - Used by `marketing/` for whitepaper / case-study handoff
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.