barabashkad/dv-public-repo-guard
v0.1.0
Pre-commit guard for public repositories: blocks absolute home paths and e-mail addresses in staged text files, in zip-based files (FCStd, 3mf, Office, OpenDocument, epub) and in PNG/JPEG metadata. Stdlib-only checker, hook template and a PNG text-chunk stripper.
Changelog
0.1.0
- Initial release: skill
public-repo-guard, generalised from a project-local pre-commit guard of a public FreeCAD enclosure repository. scripts/check_private.py: blocks absolute home paths (macOS, Linux, Windows; also JSON-escaped and forward-slash forms) and e-mail addresses (GitHub noreply and the Claude co-author noreply address allowed) in text files, in text and PNG/JPEG members of zip-based files (FCStd, 3mf, zip, docx, xlsx, pptx, odt, ods, odp, epub) and in PNGtEXt/zTXt/iTXt/eXIfchunks and JPEG APPn/COM segments. Unparseable images, mislabelled images and unreadable archives are findings.--stagedscans the staged blobs (what the commit contains), not the working tree; submodules are skipped, symlink targets are scanned.--hintor envCHECK_PRIVATE_HINTsets the fix hint.assets/pre-commit: generic hook template (python3, override with envCHECK_PRIVATE_PYTHON); it fails closed when the interpreter or the script is missing.scripts/strip_png_text.py: removes PNG text chunks in place; every other chunk is kept byte for byte.- Tests: every check is shown failing on an injected fault and passing on clean input;
--stagedand the hook run in a temporary git repository.