{"slug": "show-hn-stegguard-check-prompts-and-llm-output-for-hidden-characters", "title": "Show HN: StegGuard, check prompts and LLM output for hidden characters", "summary": "StegGuard v0.6.0, an Apache-2.0 alpha tool published on PyPI, scans files for hidden characters — zero-width Unicode, bidirectional overrides, Cyrillic and Greek homoglyphs, trailing-space and tab channels, and mixed line endings — and can decode hidden messages and strip them from plain text while preserving the original. The tool runs on the Python standard library only, makes no network calls by default, returns JSON with a confidence score per channel, and exits with code 1 when something is flagged so CI can fail a build; sanitized copies go to report.sanitized.txt unless --in-place and --confirm are both passed. The project's author positions it for scanning pull requests, commits and scraped pages before anyone or any model reads them, and cautions that StegGuard is alpha software whose reports should be treated as evidence to check rather than a final verdict.", "body_md": "### Text and source\n\nZero-width Unicode, bidirectional overrides, Cyrillic and Greek homoglyphs, trailing-space and tab channels, mixed line endings.\n\n[Read the docs: Text and source](https://stegguard.com/docs#commands)\n\nOpen source · [v0.6.0 on PyPI](https://pypi.org/project/stegguard/) · Apache-2.0 · alpha\n\nStegGuard finds them. It scans files for zero-width characters, homoglyphs, whitespace channels and watermark signals. If it finds a hidden message it can decode it, and it can remove hidden characters from plain text while preserving your original. Python standard library only, offline by default.\n\n[Install StegGuard](#install)[Try it on your text](https://stegguard.com/scan/)[See it run on seven sample files](https://stegguard.com/demo)[CLI reference](https://stegguard.com/docs)\n\nWhat StegGuard sees\n\nQ3 numbers are final.16 zero-width Please summarize them for the U+202E RLOboard.\n\nNothing hidden found in this text. The command-line tool checks more channels, such as trailing whitespace and whole files.\n\nThis example scans a plain-text file, reads its hidden message and removes the hidden characters from a copy. Your original stays as it is unless you ask for an in-place rewrite.\n\n01 / Detect\n\nRuns on the standard library, with no network calls. It exits with 1 when something is flagged, so CI can fail the build.\n\n02 / Decode\n\nThe result is JSON, with a confidence score for each channel.\n\n03 / Sanitize\n\nThe copy goes to `report.sanitized.txt` by default. Overwriting the original takes `--in-place` and `--confirm` together.\n\nScan pull requests, commits, scraped pages and files before anyone, or any model, reads them.\n\nFails the pull request when any file in the checkout is flagged. Directories need -r to be scanned recursively.\n\nA local hook, since the package doesn't ship a .pre-commit-hooks.yaml yet. pre-commit passes the staged file names.\n\nanalyze_file takes a Path and returns a dict. total_hidden is set for text and binary files alike.\n\nThe same three steps as the workflow above. Rewriting the original takes --in-place and --confirm together.\n\nPixel-level LSB anomalies (chi-square, RS, entropy, sample-pair), PNG private chunks, JPEG EXIF/XMP/IPTC, PCM audio statistics.\n\nPDF embedded files, DOCX/PPTX/XLSX/ZIP members, nested archives, hidden content in SVG and HTML.\n\nMetadata, structural and text-pattern evidence, device fingerprints, and C2PA manifests validated through c2patool.\n\nStegGuard is alpha software. Treat what it reports as evidence to check, not a final verdict.", "url": "https://wpnews.pro/news/show-hn-stegguard-check-prompts-and-llm-output-for-hidden-characters", "canonical_source": "https://stegguard.com/", "published_at": "2026-11-25 06:53:41+00:00", "updated_at": "2026-11-25 07:13:52.833558+00:00", "lang": "en", "topics": ["ai-safety", "ai-tools", "developer-tools", "large-language-models"], "entities": ["StegGuard", "PyPI", "Apache-2.0", "c2patool"], "also_reported_by": [], "takeaway": "StegGuard v0.6.0 scans text and files for zero-width characters, bidirectional overrides, homoglyphs and whitespace channels, exits with code 1 when flagged so CI can block a pull request, and writes a sanitized copy to report.sanitized.txt unless --in-place and --confirm are both given.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-stegguard-check-prompts-and-llm-output-for-hidden-characters", "markdown": "https://wpnews.pro/news/show-hn-stegguard-check-prompts-and-llm-output-for-hidden-characters.md", "text": "https://wpnews.pro/news/show-hn-stegguard-check-prompts-and-llm-output-for-hidden-characters.txt", "jsonld": "https://wpnews.pro/news/show-hn-stegguard-check-prompts-and-llm-output-for-hidden-characters.jsonld"}}