alpha · v0.3.0

Find what's hiding in plain sight.

Invisible Unicode, homoglyphs, whitespace channels, watermark signals — StegGuard finds them, decodes them, and writes a clean copy. Runs on the Python standard library. Offline by default.

pip install git+https://github.com/stegguard/stegguard
Read the docs
leaked-prompt.md
$ stegguard detect leaked-prompt.md

One shared workflow, instead of five one-off tools.

The original file stays untouched unless you explicitly authorize an in-place replacement.

Detect. Point it at a file, a folder, or a whole repo.

Runs on the standard library. No network calls, no upload. Exits 1 when something is flagged.

$ stegguard detect
$ stegguard detect report.md
 
📄 report.md
  ⚠  ZERO-WIDTH CHARACTERS DETECTED — Severity: MEDIUM
  …
    Line 2  Col 7  Char #15  U+200B  Zero Width Space
    Line 2  Col 8  Char #16  U+200C  Zero Width Non-Joiner
  …
  ⚠ 1/1 file(s) flagged
exit 1

Decode. Extract the payload without touching the source.

Prints a JSON report. The input file is never modified.

$ stegguard decode
$ stegguard decode report.md
…
  "status": "DECODED",
  "zero_width": {
    "decoded": "hi",
    "confidence": 0.9,
    "occurrences": 16
  },
…

Sanitize. Write a clean copy and get a change report.

Writes report.sanitized.md by default. Overwriting the original needs --in-place and --confirm, together.

$ stegguard sanitize
$ stegguard sanitize report.md
…
  "sanitized_path": "report.sanitized.md",
  "sha256_before": "6c39d823…",
  "sha256_after": "a5d49ca2…",
  "changes": {
    "zero_width_removed": 16,
    "bidi_removed": 1,
    …
  },
…
  "original_preserved": true,
  "sanitization_status": "SANITIZED"

Hidden content is rarely one neat payload in one neat format.

Text & sourceZero-width Unicode, bidirectional overrides, Cyrillic/Greek homoglyphs, trailing-space and tab channels, mixed line endings.any text or source file
Images, audio & mediaPixel-level LSB anomalies (chi-square, RS, entropy, sample-pair), PNG private chunks, JPEG EXIF/XMP/IPTC, PCM audio statistics.images, audio, structured media
Documents & containersPDF embedded files, DOCX/PPTX/XLSX/ZIP members, nested archives, SVG and HTML hidden content.documents, archives
Watermarks & provenanceMetadata, structural, and text-pattern evidence; device fingerprints; C2PA manifests validated through c2patool.images, audio, video

Built for the moment untrusted content meets your pipeline.

CI gate
Block pull requests that smuggle BIDI overrides or homoglyphs into source files before they merge.
LLM input sanitization
Catch zero-width prompt-injection payloads hiding in pasted text, scraped pages, or model output.
Pre-publish checks
Scan DOCX, PPTX, and PDF files for hidden fields and layout tricks before they go out the door.
Provenance audits
Validate C2PA Content Credentials and flag robust-watermark signals before trusting an image or audio file.

Everything on this page ships in the Apache-2.0 open-source package.

Read the full docs →

Try it on your own files.