anthropics / anthropics/claude-code
Host-side AffixIO attestation for privileged tool calls (PreToolUse / PermissionRequest)
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
### Use case
Claude Code already has strong permission rules and hooks (`PreToolUse`, `PermissionRequest`, matchers for Bash / Write / MCP tools). Separately, some teams want a host-side signed proof that a specific privileged tool action was attested or approved before execution.
AffixIO proves a host-side ACTION completed (signed yes/no). PII stays on the host. Not person/age/KYC. This does not replace Claude Code permissions, sandbox, or managed settings. It sits beside them as an attestation / approval hook before the tool runs.
```bash
npm i affixio
# optional local MCP (stdio)
npm i @affixio/mcp@0.1.0
```
### Proposal
Document (or accept a tiny community example under `examples/hooks/`) a pattern where AffixIO gates privileged tool calls:
1. Claude intends Bash, file write, network, or an MCP tool call.
2. A `PreToolUse` (and/or `PermissionRequest`) hook runs on the host.
3. AffixIO attests that action (signed yes/no) before the tool proceeds.
4. On deny / no attestation, return `permissionDecision: "deny"` (or exit 2) so the call is blocked.
5. Keep existing Claude Code allow/ask/deny and sandbox rules unchanged.
Natural matchers already exist for this: `Bash`, `Write|Edit`, `WebFetch|WebSearch`, `mcp__.*`, plus `PermissionRequest` for interactive approval paths. The repo already ships `examples/hooks/bash_command_validator_example.py` as the shape we would follow.
Not asking for a full Claude Code plugin wrap or marketplace listing in this issue. Issue-first. Happy to PR a minimal AffixIO PreToolUse example into `examples/hooks/` if maintainers want that shelf used for third-party patterns.
### Additional information
- https://www.affix-io.com/
- https://hub.affix-io.com/onboarding/
- Hooks docs: https://code.claude.com/docs/en/hooks
Happy to align with whatever docs/examples shape you prefer.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with examples/hooks/bash_command_validator_example.py and the Claude Code hooks documentation linked in the issue, focusing on PreToolUse and PermissionRequest behavior. Add either documentation or a minimal examples/hooks community example showing host-side AffixIO approval and denial while leaving existing permission and sandbox rules unchanged; done means the pattern and blocking response are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100