Repository navigation
zn-gate 1.8.1
If you use the zn-gate agent hooks with Claude Code, Codex CLI, Cursor or OpenCode, update. This release reads Codex and OpenCode patches the way those agents read them, and makes the secret scrubber and several other checks run in linear time. Update with npm install -g zn-gate@1.8.1; the Python package has no code changes and moves to 1.8.1 to keep the versions in step.
Fixed
- The vault audit log no longer slows down when the end of the file holds a long run of blank lines before a large record. Reading the last record used a regular expression that took seconds in that case, on every new audit record.
- File names in a Codex or OpenCode patch (
apply_patch), values in.env,.npmrcand.znrulesfiles, and a fewzn auditchecks are now read in linear time. Long runs of blank lines, spaces,*or=used to make them take seconds.SCRUB_RULES_VERSIONis now2026-10-15.2andAUDIT_RULES_VERSION2026-10-15.1. - File names in a Codex or OpenCode patch (
apply_patch) are read the way each agent reads them: lines split only at line feeds, and names in every form Codex or OpenCode could use. A patch with a name zn cannot read safely, or with a line that looks like a file marker but is not one, is blocked.
Changed
- In Codex and OpenCode, a patch (
apply_patch) longer than 100 KB is blocked, like shell commands over 100 KB, because zn could not check it within the time the agent waits for the hook.
How to verify these files: docs/verify-release.md