Commands, exit codes and limits.

The short reference. Detection categories, how sanitizing works and the report schema are covered in the full docs on GitHub.

Commands

stegguard detectScans files or directories for hidden content.exit 0/1/2
stegguard decodePulls out hidden payloads it recognizes in text, without changing the input.exit 0/2
stegguard sanitizeWrites a cleaned copy and lists every change it made.exit 0/2
stegguard watermarkLooks for watermark, fingerprint and provenance evidence, including C2PA.exit 0/2

Exit codes

Command names, long option names, JSON field meanings, and exit codes are public. They only change in a major release.

0The scan finished and nothing was flagged.
1The scan finished and found something. Only detect uses this code.
2Bad arguments, or the scan could not finish (for example, a resource limit was hit).

Resource limits

StegGuard treats every file it scans as untrusted. Each limit can be set with a ScanLimits object or the matching CLI flag.

max_file_bytesCaps a top-level file read100 MiB
max_decompressed_bytesCaps decompressed PNG and nested content50 MiB
max_image_pixelsRejects declared image dimensions before allocation40 million
max_archive_membersCaps entries visited in a container500
max_nesting_depthStops recursive containers and embedded media3
max_scan_secondsProvides a cooperative per-scan deadline30 seconds
max_findingsCaps accumulated evidence records10,000
stegguard detect upload.zip \
  --max-file-bytes 16777216 \
  --max-decompressed-bytes 33554432 \
  --max-archive-members 1000 \
  --max-nesting-depth 2 \
  --max-scan-seconds 10 \
  --max-findings 2000

Platform support

The core is pure Python and targets CPython 3.12 to 3.14. Development happens on Linux x86-64. Other architectures have not been verified yet.

Linux, GitHub-hosted runner3.12, 3.13, 3.14Local Linux 3.12 passes; hosted results require GitHub
Windows, GitHub-hosted runner3.12Configured; hosted result pending
macOS, GitHub-hosted runner3.12Configured; hosted result pending

The compatibility policy, detection-quality notes and report schema are in the repo.

Browse the docs on GitHub →