This release adds team-shareable project policies with a human-confirmed policy apply, curated official rulebooks for infrastructure CLIs, and replaces the rulebook lock-and-cache with live vendored files. Installs that added GitHub rulebooks on 2.2 or earlier need a one-time rule sync per scope after upgrading.
Highlights
- Added a project policy scope: a team lead commits
.cc-safety-net/policy.jsonand every clone picks it up with no member action, layered over each member's own user policy. (#97) - Added official rulebooks for Terraform, AWS, gcloud, and Azure, installable with
cc-safety-net rule add --only terraform aws --global. (#96) - Changed rulebooks to live files: the runtime reads each
rulebook.jsonon every tool call, so an edit applies to the next command with no sync step. (#97)
Added
- Added
cc-safety-net policy check <file>to validate a policy proposal and print its diff, andcc-safety-net policy apply <file>to write it after an interactive terminal confirmation. Add--globalto target the user policy instead of the project one. - Added project-scope policy merging: the project file supplies safety level, per-feature toggles, per-rule overrides, and path lists, while any field it leaves out keeps inheriting from the user policy. Per-rule overrides merge by rule id, path lists are the union of both scopes, and
auditstays user scope only. - Added project-policy reporting across every surface:
statusshows the project policy path and a line-by-line list of what it relaxed,doctorprints the same deltas under Effective Safety,explainnames the scope that supplied the safety preset, and the status line shows a🔻marker. - Added a "Draft project policy" mode to
cc-safety-net gui: pick a project directory, mark only the fields to write, review the merged diff and relaxation warnings, and save.cc-safety-net/policy.json. (#98) - Added repository-wide rulebook installs:
rule add owner/repoadds every rulebook on the default branch,--only <rulebook...>selects specific ones, and--ref <ref>picks a branch, tag, or commit. Runningrule add --only <rulebook...>with no source selects from the officialcc-safety-net/rulebooksrepository. The command now prints the scope it wrote to and the rulebooks and commits it vendored. - Added
rulebook_version2, which replacessubcommandandblock_argswith an exact-tokenmatchobject (command_path,any_args,exclude_args). Value-taking global options foraws,gcloud, andazare recognized when locating the command path, so options such as--profile proddo not defeat a rule. Version 1 rulebooks keep their fields and behavior. - Added fixture evaluation for version 2 rulebooks: their
testsentries are checked against the rulebook's own rules byrule add,rule update, andrule verify, and a failing fixture rejects the source before it is written. Fixture commands are analyzed, never executed. - Added support for GitHub refs containing
/, such asowner/repo#feature/rulebook-v2.
Changed
- Changed remote rulebook handling:
rule addvalidates and vendors the rulebook files into your own configuration, and nothing updates in the background. Runrule update [source]to re-fetch and rewrite the vendored copies; a source with an ordinary update failure keeps its existing copy while the others still update. - Changed
rule listto describe version 2 rules by their command path andany_args/exclude_argsinstead of printing an emptyBlock argsrow. - Changed the
/cc-safety-netskill into a full operator: it explains why a command was blocked, triages false positives, authors rules and policy proposals, manages agent CLI integrations, and diagnoses protection. It is manual-only and never triggers on its own. - Changed
doctorto report leftover rulebook lock and cache files from an earlier version, with the command that migrates them.
Breaking Changes
- Replaced the
rule syncsynchronization step: rulebooks no longer have a lock or cache, and the command now only migrates leftovers from an earlier install.- Migration: If you installed rulebooks from GitHub on 2.2 or earlier, run
npx -y cc-safety-net rule synconce per scope after upgrading, adding--globalfor user-scope sources. Until then, those GitHub-sourced rules are inactive andstatusanddoctorreport the degraded sources.
- Migration: If you installed rulebooks from GitHub on 2.2 or earlier, run
- Removed the
--checkoption from everyrulesubcommand; passing it is now an error.- Migration: Use
cc-safety-net rule verifyfor offline validation of config and rulebooks.
- Migration: Use
Security
- Blocked agents from applying policy proposals:
cc-safety-net policy applyis denied when an agent runs it, including through package runners such asnpx,pnpm dlx, andnpm exec, and it refuses to run without an interactive terminal.cc-safety-net policy checkstays available so an agent can show what a proposal would change. - Extended policy-file protection to the project
.cc-safety-net/policy.json, so an agent can no longer create or modify the project policy that the guards enforce.