Prove — in your own CI, without uploading your code — that your project's dependency manifests and lockfiles pass a dependency-hygiene ruleset: no known-vulnerable or malware versions, a license allowlist, a minimum dependency age, and a lifecycle-script allowlist. The check runs against a registrar-signed feed; the witness is computed on your runner and never leaves it. Generating and submitting a zero-knowledge receipt is opt-in.
Check only (fails the job if the dependency tree doesn't pass):
- uses: HorizenLabs/zk-hygiene-action@v0.3.0
with:
feed-url: https://zk-hygiene.example.com
registrar-key: "0x…" # the feed's pinned registrar-key word
ruleset: baseline-14d-v1Also generate an UltraHonk proof and submit the receipt to the agent:
- uses: HorizenLabs/zk-hygiene-action@v0.3.0
with:
feed-url: https://zk-hygiene.example.com
registrar-key: "0x…"
ruleset: baseline-14d-v1
prove: "true"
expected-vk: "0x621132ca6dbf613a4f5c80022967ac75f5b560779e0281e0cb264df8f9ffb397"
agent-url: https://zk-hygiene.example.com
agent-token: ${{ secrets.ZK_HYGIENE_AGENT_TOKEN }}| Input | Description |
|---|---|
feed-url |
Feed agent base URL. Verified slices covering only your dependencies (~15 MB) are fetched and the witness is computed locally. |
slice-dir |
Local slice directory for offline runs (alternative to feed-url). |
registrar-key |
Required. The pinned registrar-key word (0x…) the feed must be signed by. The circuit commits it and the agent enforces it. |
ruleset |
Named ruleset from rulesets/ (e.g. baseline-14d-v1). Its policy and published rulesetHash are verified before proving. Mutually exclusive with allow-license. |
allow-license |
Comma-separated SPDX allowlist (ad-hoc alternative to ruleset; produces a hash an agent is unlikely to accept — prefer ruleset). |
allow-script-dep |
Comma-separated package names permitted to declare lifecycle (install) scripts, for the ad-hoc allow-license path. Named rulesets carry their own. |
ecosystem |
npm|cargo|go|pypi|nuget|rubygems. Empty auto-detects. |
include-untracked |
Include untracked, non-ignored dependency metadata (default: tracked git index only). |
tool-ref |
Release tag of the prebuilt binaries to install (default v0.3.0; keep in step with the action ref). |
prove |
"true" to generate the UltraHonk proof after a passing check. |
expected-vk |
Pinned UltraHonk verification-key hash (0x…); required when prove is true. |
agent-url |
Agent base URL (https://…) to submit the receipt to. |
agent-token |
Bearer token for receipt submission. Store as a repo secret. |
verbose-diagnostics |
Deprecated / no-op — witness assembly never prints exact dependency coordinates. |
| Output | Description |
|---|---|
result |
PASS or FAIL. |
digest |
The artifact digest (receipt key). |
ruleset-hash |
The verified rulesetHash (set only when ruleset is used). |
tx-explorer-url |
zkVerify explorer URL of the submitted proof (submit only). |
The rulesets/ catalog holds each policy in plain English
alongside its canonical rulesetHash. Naming a ruleset resolves its exact
flags (licenses, minDepAgeDays, and the P9 script allowlist) and verifies the
computed hash against the published one before any work is done, so a policy
mismatch fails in seconds. See rulesets/README.md to
read or regenerate a hash.
The zk-hygiene / hygiene-prover binaries and the Noir circuit package are
prebuilt, checksum-verified release assets — no compilation on your runner.
Proving installs the pinned Noir + Barretenberg toolchain (nargo
1.0.0-beta.18, bb 3.0.0-nightly.20260102) and fetches the published
verification key, checking its digest against expected-vk before proving, so
it reuses the pinned key rather than regenerating it. The witness and proof live
in a private .zkhygiene/ directory and are removed at the end of the job; only
a receipt you explicitly submit ever leaves the runner.
Supported runners: Linux x86_64 (the published release target — e.g.
ubuntu-latest). Other targets (aarch64 Linux, macOS) are not built yet; add
them to the release matrix before using this action on those runners.
prove: "true" needs a runner that can install nargo + bb and has enough
cores for proving (bb finalization needs all cores available; budget for
≥ ~8 cores). The check-only path (no prove) has no such requirement.