{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "ghuntley-preflight--scan-screenshots-and-pdfs-for-keys",
 "repo": "ghuntley/preflight",
 "repo_url": "https://github.com/ghuntley/preflight",
 "repo_slug": "ghuntley-preflight",
 "title": "Scan screenshots and PDFs for keys before upload",
 "page_title": "How to scan screenshots and PDFs for keys before upload with Preflight",
 "summary": "Let Preflight decode images and PDFs locally, run OCR, and sanitize them before inference.",
 "who": "A developer who attaches screenshots or PDF exports to an agent session and may not notice a key visible in the image.",
 "problem": "Attachments are a common path for secrets, and a key in a screenshot is easy to miss.",
 "outcome": "Attachments are decoded and OCR'd locally, and supported sanitization rewrites them before the model receives them.",
 "steps": [
  "Start the proxy with `nix run github:ghuntley/preflight -- serve`",
  "Point the harness at `http://127.0.0.1:8081/v1`",
  "Attach a screenshot containing a test key from <test-file> and send a prompt about it",
  "Check the logs for an `attachment.inspected` event with `rebuilt: true` when a rewrite happened",
  "Confirm that a finding without a safe replacement returns an error rather than forwarding"
 ],
 "agent_prompt": "Using the preflight repo at github.com/ghuntley/preflight, run the proxy with default settings, attach the image <test-file> containing a fake key to a request, and report the response status and the attachment.inspected log event. Verify that the forwarded attachment no longer shows the key or that the request was rejected.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Attachments that cannot be sanitized are blocked, and PDF page blacking out is off unless allow_page_redaction is set to true.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "A running underclass instance on 127.0.0.1:8080",
  "Nix (for `nix run`) or devenv and Cargo for a local checkout",
  "A coding harness or client that can change its base URL to http://127.0.0.1:8081/v1",
  "Bubblewrap available for the default sandboxed attachment workers"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ghuntley-preflight/scan-screenshots-and-pdfs-for-keys/",
 "md": "https://dedupedai.com/use-cases/ghuntley-preflight/scan-screenshots-and-pdfs-for-keys/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ghuntley-preflight--scan-screenshots-and-pdfs-for-keys.json",
 "api_version": "v1"
}
