
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Mock framework for Claude Code tool responses — test hooks and Sentinel state transitions without real side effects
Mock framework for testing Claude Code hooks. Build fake payloads, run hooks against them, assert decisions.
npm install -g tool-mock
import { preToolUse, postToolUse, runHook, expectAllow, expectDeny } from 'tool-mock'
// Build a mock payload
const payload = preToolUse('Read', { file_path: '/etc/passwd' })
// Run a hook against it
const response = await runHook('~/.claude/hooks/my-hook.sh', payload)
// Assert the decision
expectDeny(response.unwrap())
# Generate payloads
tool-mock payload pre Read --input '{"file_path":"/etc/passwd"}'
tool-mock payload post Bash --input '{"command":"cat .env"}' --response 'SECRET=abc'
# Run a scenario file
tool-mock run scenario.json
Define multi-step test scenarios in JSON:
{
"name": "scope-lock denies .env access",
"steps": [
{
"description": "Reading .env should be denied",
"hook": "~/.claude/hooks/scope-lock.sh",
"event": "PreToolUse",
"toolName": "Read",
"toolInput": { "file_path": ".env" },
"expect": "deny"
}
]
}
MIT
FAQs
Mock framework for Claude Code tool responses — test hooks and Sentinel state transitions without real side effects
We found that tool-mock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.