Hook
compliance
✓ Verified
Free
Dependency License Checker
Block dependency installs that introduce GPL, AGPL, or other restrictive licenses incompatible with your policy.
4.6(41 reviews)
17,800 installs
by Community
About
Intercepts `npm install`, `pip install`, `cargo add`, etc., resolves the new dependency tree, and blocks the install if any package has a license outside your allowlist. Supports MIT/Apache/BSD allowlist by default.
Tags
licensescompliancedependenciesblock
Hook Configuration (hooks.json)
{
"hooks": [
{
"event": "preToolUse",
"matcher": "Bash(npm install*|pip install*|cargo add*)",
"command": ".github/hooks/dependency-license-checker/check.sh",
"env": {
"ALLOWED_LICENSES": "MIT,Apache-2.0,BSD-3-Clause,BSD-2-Clause,ISC,Unlicense",
"MODE": "warn"
}
}
]
}Triggers:preToolUsemode: warn
Related Hooks
Hook⭐
securityFREE
Secrets Scanner
Pre-commit hook that scans modified files for accidentally leaked secrets and blocks the commit.
secretssecuritypre-commit
G
GitHub4.9(142)
52k
★3.4k
Install
# Install hook into your project: mkdir -p .github/hooks/dependency-license-checker curl -fsSL "https://raw.githubusercontent.com/github/awesome-copilot/main/hooks/dependency-license-checker/hooks.json" \ -o .github/hooks/dependency-license-checker/hooks.json
C
Community
@awesome-copilot-community