项目文件夹

文件
TJF 8de788c07f fix(governance): pin protect-mcp@0.7.4 so evaluate/sign hooks resolve (#602)
Bumps the protect-mcp pin from 0.5.5 to 0.7.4 in both review-agent-governance and protect-mcp hooks so the PreToolUse `evaluate` and PostToolUse `sign` verbs resolve and the governance gate runs fail-closed (deny -> exit 2). Rewrites the test suite (init --dir, receipts.jsonl, v2 receipt schema, real Cedar entity shape); 8/8 pass. Verified locally: verbs function on 0.7.4, deny path exits 2, make validate STRICT=1 clean.

Closes #601.
2026-07-08 10:22:44 -04:00

27 行
851 B
JSON

{
"hooks": {
"PreToolUse": [
{
"matcher": ".*",
"hooks": [
{
"type": "command",
"command": "if [ -f \"${REVIEW_APPROVAL_FLAG:-./.review-approved}\" ]; then exit 0; fi; npx protect-mcp@0.7.4 evaluate --policy \"${REVIEW_GOVERNANCE_POLICY:-./review-governance.cedar}\" --tool \"$TOOL_NAME\" --input \"$TOOL_INPUT\" --fail-on-missing-policy false"
}
]
}
],
"PostToolUse": [
{
"matcher": ".*",
"hooks": [
{
"type": "command",
"command": "npx protect-mcp@0.7.4 sign --tool \"$TOOL_NAME\" --input \"$TOOL_INPUT\" --output \"$TOOL_OUTPUT\" --receipts \"${REVIEW_GOVERNANCE_RECEIPTS:-./review-receipts/}\" --key \"${REVIEW_GOVERNANCE_KEY:-./review-governance.key}\""
}
]
}
]
}
}