
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
scope-locker
Advanced tools
PreToolUse hook for Claude Code that enforces filesystem permissions per project. Define which files the agent can read and write in a manifest — everything else is denied.
npm install -g scope-lock
.scope-lock.json in your project root:{
"allow": {
"read": ["src/**", "package.json", "README.md", "tsconfig.json", "*.config.*"],
"write": ["src/**"]
},
"deny": [".env*", "node_modules/**", ".git/**", "**/secrets/**"]
}
~/.claude/settings.json:{
"hooks": {
"PreToolUse": [
{
"matcher": "Read|Write|Edit|Glob|Grep|Bash",
"hooks": [
{
"type": "command",
"command": "scope-lock",
"timeout": 5
}
]
}
]
}
}
Supports both .scope-lock.json and .scope-lock.yaml:
JSON:
{
"allow": {
"read": ["src/**", "docs/**", "*.md"],
"write": ["src/**"]
},
"deny": [".env*", ".git/**", "node_modules/**"]
}
YAML:
allow:
read:
- src/**
- docs/**
- "*.md"
write:
- src/**
deny:
- .env*
- .git/**
- node_modules/**
* — matches any characters except /** — matches any characters including / (recursive)? — matches a single character.env* — matches .env, .env.local, .env.productionsrc/** — matches everything under src/| Tool | Path Source |
|---|---|
| Read, Write, Edit | tool_input.file_path |
| Glob | tool_input.path (default: .) |
| Grep | tool_input.path (default: .) |
| Bash | Best-effort regex extraction from command |
MIT
FAQs
PreToolUse hook that enforces filesystem permissions per project
We found that scope-locker 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.