Dependency security scanning. Use when auditing npm packages for vulnerabilities.
/plugin marketplace add IvanTorresEdge/molcajete.ai/plugin install ivantorresedge-js-tech-stacks-js-common@IvanTorresEdge/molcajete.aiThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill covers security scanning for npm dependencies.
Use this skill when:
DEFENSE IN DEPTH - Use multiple tools for security scanning. No single tool catches everything.
# Run audit
npm audit
# JSON output for parsing
npm audit --json
# Only high/critical
npm audit --audit-level=high
# Production dependencies only
npm audit --omit=dev
# Safe fixes (semver-compatible)
npm audit fix
# Force fixes (may have breaking changes)
npm audit fix --force
# Dry run
npm audit fix --dry-run
# vulnerabilities found
Severity: high
Package: example-package
Dependency of: my-dep
Path: my-dep > sub-dep > example-package
More info: https://npmjs.com/advisories/XXXXX
npm install -g snyk
snyk auth
# Test for vulnerabilities
snyk test
# Monitor project (continuous)
snyk monitor
# High severity only
snyk test --severity-threshold=high
# Specific package
snyk test --package-manager=npm
- name: Snyk Security Scan
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=high
npm install -g @socketsecurity/cli
# Scan for supply chain issues
npx @socketsecurity/cli scan
# Detailed report
npx @socketsecurity/cli report
| Level | Description | Action |
|---|---|---|
| Critical | RCE, data breach | Fix immediately |
| High | Privilege escalation | Fix within 24 hours |
| Moderate | DoS, info disclosure | Fix within 1 week |
| Low | Minor issues | Fix when convenient |
# Full audit
npm audit
# Check for outdated packages
npm outdated
For each vulnerability:
# Update specific package
npm update package-name
# Update to latest
npm install package-name@latest
# Replace package
npm uninstall vulnerable-package
npm install alternative-package
# Re-run audit
npm audit
# Run tests
npm test
# Verify package-lock.json
npm ci # Clean install from lock file
# Check for lock file modifications
git diff package-lock.json
npm ci in CI/CD# .github/dependabot.yml
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
groups:
dev-dependencies:
dependency-type: "development"
{
"extends": ["config:base"],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
]
}
name: Security
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 0 * * *' # Daily
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
- name: npm audit
run: npm audit --audit-level=high
- name: Snyk scan
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
npm audit fix
# or
npm update vulnerable-package
{
"overrides": {
"vulnerable-package": "2.0.0"
}
}
## Security Exceptions
### vulnerable-package@1.0.0
- **Vulnerability**: CVE-2024-XXXXX
- **Reason Accepted**: Only used in tests, not production
- **Review Date**: 2024-12-01
- **Assignee**: @developer
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.