Skip to content

LLLL Guard 0.2.0: one engine, no silent passes

Choose a tag to compare

@JettyMarquis JettyMarquis released this 03 Oct 07:56
· 16 commits to main since this release
Immutable release. Only release title and notes can be modified.
218bace

LLLL Guard 0.2.0: one engine, no silent passes

Guard is now a single TypeScript engine (@layrix.ai/llll-guard, Node.js 20 or newer). The bash guard script is a small launcher that finds Node and the engine; it holds no rules. This release is a transition release: it is warn-first (see below), and 1.0 will fail closed.

What changed

The gate no longer passes when it could not look. Exit code 0 is a pass, 1 is a block, 2 means the guard could not run, and 2 is never a pass. Before: the bash script crashed or passed silently on macOS's bash 3.2, the release gate printed "Nothing to scan" and exited 0, and an unreadable policy or a git error could end in a pass.

Push gate

  • The pushed range comes from git's pre-push input (new branches, tags, force-pushes, deletions, several refs), not from the current branch's upstream.
  • Secrets: provider-format keys and private keys (including PKCS#8 and PGP) are never downgraded; values published on purpose (NEXT_PUBLIC_*, env templates) are reported, not blocked, by comparing the value itself. Docs and env templates are scanned.
  • Overrides work: token-scoped to one finding on one version of one file, expiring (14 days by default), confirmed in a terminal, logged. HARD rules cannot be overridden.
  • Changes to llll.policy.json, .guardignore or llll.whitelist.json raise PG-S011. The policy is read from the remote's default branch, so a push cannot switch the gate off for itself.

Release gate: reads the files npm pack would publish (with --ignore-scripts), every file, any encoding; inline source maps, internal files, secrets; a file it could not read is a finding (RG-S008).

Hook: works in git worktrees and with core.hooksPath; keeps your own pre-push hook and runs it after the guard; no network npx; uninstall-hook restores it. husky, overcommit and lefthook are not chained: the installer prints the line to add.

Installers: Claude Code links the skill files only; opencode and Codex installers can upgrade and --uninstall, never truncate your config, and back files up.

Skill: one folding rule (round(N/2)), the credential downgrade rule matches the engine, corrected scan patterns, allowed-tools narrowed to specific commands plus llll-guard push|release, and /llll guard runs the engine first.

Upgrading

npm install -g @layrix.ai/llll-guard      # Node.js 20 or newer
cd your-project && llll-guard install-hook

If you installed the old bash hook, git pull in ~/.llll and run ~/.llll/guard doctor --fix; the old hook keeps working and tells you to reinstall it.

Warn-first. If Node or the engine cannot be found when you push, the hook warns loudly, writes .llll/logs/guard-not-run.log and lets the push through. Set LLLL_GUARD_STRICT=1 to stop the push instead. Failing closed becomes the default in 1.0.

Known gaps

Legal and factual corrections in the examples and sample audits are pending an expert review; SKILL.md is still one large file.