Enforcement hooks: what apm can ship and portable alternatives #168
Notifications
Due Date
No due date set.
Blocks
#172 Safety model: action tiers, secrets, enforcement
Mortis/Holocron
Reference: Mortis/Holocron#168
Reference in new issue
Block a user
Part of #166
Question
Can the infra package enforce (not just instruct) the safety stance on the map — block
kubectl apply/delete,helm upgrade, un-checkedansible-playbook,tofu apply, vault decryption and reads of vault password files unless a human has approved — and through what mechanism?kyberforgeships itsSessionStarthook, ADR-0019), and which targets (Claude Code, Copilot, Codex, Gemini, Cursor) actually receive and honour them.Resolution
Findings:
docs/research/infra-packages/enforcement-hooks.mdonresearch/enforcement-hooks(throwaway branch, never merged). Sources: apm 0.28.0 source and each provider's official docs (Context7 was unavailable)..apm/hooks/deploys to Claude, Copilot, Codex, Gemini, Cursor (not OpenCode). Events are renamed per target; tool-name matchers are not translated; no permission/sandbox settings ship. Codex/Gemini only receive hooks if.codex//.gemini/already exist; Cursor output unverified.Recommended layering: skill instructions → one portable matcher-less guard hook (through apm's executable-trust gate) → documented host settings → credential boundary (read-only kubeconfig, apply creds the agent never holds, unreadable vault password, branch protection) → infra-repo pre-commit/CI. PATH wrappers rejected.
Surfaced conflict (vault password vs
--check) carried to the Safety model ticket.Claude referenced this issue2026-11-12 18:19:41 +00:00