Repository navigation
zn-gate 1.10.0
zn-gate 1.10.0 adds an audit mode with SARIF output to the GitHub Action, makes the commands that only you may run harder for an AI agent to start, gives the right repair in zn-gate check and zn-gate init when the zn-gate plugin is broken next to zn's own hooks, and checks long shell commands much faster. Update with npm install -g zn-gate@1.10.0 and pip install -U zn-gate.
If you run zn unlock from a script with the system keychain: it now needs an interactive terminal (--passphrase-stdin with the passphrase backend still works from a pipe). If you scan docker-compose files or .env.example: database URLs whose password is only a reference such as ${PGPASSWORD} are no longer reported.
Added
- GitHub Action:
modeinput (scan,audit,both; defaultscan).auditrunszn auditfrom the npm package on agent configs, hooks, MCP servers, plugins and skills;bothruns the scan and the audit, and runs the scan only, with a warning, whenversionis older than 1.6.0 or is a PyPI-only.postversion.mode: scankeeps the previous behaviour. - GitHub Action:
format: sarifwrites a SARIF file with one run per check and exposes it as thesarif-fileoutput, forgithub/codeql-action/upload-sarif. New inputsseverity-threshold(critical,high,mediumorlow; defaulthigh: the lowest audit severity that fails the step whenfail-on-threatistrue),fail-on(passed tozn audit --fail-on; overridesfail-on-threatandseverity-thresholdfor the audit),agents,sarif-file(inside the workspace or the runner temp directory, never through a symbolic link) andnpm-integrity; new outputsaudit-exit-codeandsarif-file.
Changed
- GitHub Action: the default
versionis now 1.9.0. - GitHub Action:
fail-on-threatmust betrueorfalse, in any case (TrueandFALSEstill work); any other value now fails the step instead of being read astrue. - Contributors: a pull request describes its change in a
changelog.d/fragment instead of editingCHANGELOG.md, and the release collects the fragments into its section. A newChangelogcheck asks for a fragment when a pull request changes what ships.
Fixed
- The agent hooks check a long shell command faster: each word is looked up once per command, so a command of 80 KB that repeats its words takes well under a second instead of several seconds. A hook that runs out of time lets the command go ahead unchecked, so this also keeps long commands checked.
POLICY_RULES_VERSIONis2026-10-16.6. zn-gate checkandzn-gate init: when both the zn-gate plugin and the hooks ofzn hooks install claude-codeare set up and the plugin does not work (for example on a Node.js the plugin does not support), they now check those hooks too, and run them the way Claude Code does. If the hooks work, the fix is to turn the plugin off withclaude plugin disable zn-gate@usezn, which keeps them, instead of removing the hooks. If the hooks do not work either, the hooks are repaired first (npm install -g zn-gate, thenzn hooks install claude-code) and only then is the plugin turned off, so the plugin is turned off only after the hooks are repaired. A Claude Code setting that stops all hooks (disableAllHooks, managed settings) is reported as such, and neither the plugin nor the hooks are touched.zn-gate checkandzn-gate init: when zn's own rules do not block the test.envfile, the fix is now to install zn-gate again (npm install -g zn-gate), also with the zn-gate plugin; before, they asked to install the plugin that was already installed.zn-gate init: with a broken plugin next to zn's own hooks that do not work either, it now checks that the repaired hooks work before it turns the plugin off, and leaves the plugin on when they still do not.- A database URL whose password is only a reference to a name (
postgres://${PGUSER}:${PGPASSWORD}@db/app,$PASS,%PASS%,<password>,{{ password }};${name}may also be lower case) is no longer reported or redacted as a secret, in Node.js and Python alike. Anything else is still a password, including a lower-case$wordor%word%and digits inside<>or{{ }}.RULES_VERSIONis2026-10-16.6.
Security
- Commands that only you may run (
zn secret setand the other secret commands,zn unlock, the guidedzn-gate init) now also check the parent processes for the AI agents' command-line programs (claude,codex,opencode,cursor-agent), which makes it harder for an agent that removed its environment variables to run them. It is not a guarantee: a process can detach from its parent, and the hook that denies these commands to agents stays the main guard. Editor apps such as VS Code or Cursor are not counted, so their integrated terminals keep working. zn unlockwith the system keychain now needs an interactive terminal, since that unlock asks nothing.--passphrase-stdinstill works from a pipe.
How to verify these files: docs/verify-release.md