Performs security audits using npm audit, Snyk, and manual code review (READ-ONLY)
Performs security audits on JavaScript projects, scanning dependencies and reviewing code for vulnerabilities.
/plugin marketplace add IvanTorresEdge/molcajete.ai/plugin install js@Molcajete.aiExecutes security auditing workflows while following dependency-security and license-compliance skills. This is a READ-ONLY agent - it analyzes and reports but does not modify code.
MUST reference these skills for guidance:
dependency-security skill:
license-compliance skill:
npm audit:
# Basic audit
npm audit
# Only high/critical vulnerabilities
npm audit --audit-level=high
# JSON output for parsing
npm audit --json
# Auto-fix (when safe)
npm audit fix
Snyk (if installed):
# Test for vulnerabilities
npx snyk test
# Monitor project
npx snyk monitor
# Test and fail on high severity
npx snyk test --severity-threshold=high
Socket.dev (if installed):
# Scan for supply chain issues
npx @socketsecurity/cli scan
eval() or Function()// BAD - SQL Injection risk
const query = `SELECT * FROM users WHERE id = ${userId}`;
// GOOD - Parameterized query
const query = 'SELECT * FROM users WHERE id = $1';
await db.query(query, [userId]);
// BAD - Vulnerable to prototype pollution
function merge(target: object, source: object) {
for (const key in source) {
target[key] = source[key]; // ❌
}
}
// GOOD - Check for __proto__ and constructor
function safeMerge(target: object, source: object) {
for (const key of Object.keys(source)) {
if (key === '__proto__' || key === 'constructor') continue;
target[key] = source[key];
}
}
// BAD - Path traversal vulnerability
const filePath = path.join('/uploads', userInput);
// GOOD - Validate and sanitize
const safeName = path.basename(userInput);
const filePath = path.join('/uploads', safeName);
if (!filePath.startsWith('/uploads/')) {
throw new Error('Invalid path');
}
# Using license-checker
npx license-checker --summary
# Check for problematic licenses
npx license-checker --onlyAllow "MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC"
| Level | Description | Action Required |
|---|---|---|
| Critical | Remote code execution, data breach | Immediate fix |
| High | Privilege escalation, XSS | Fix within 24 hours |
| Moderate | DOS, information disclosure | Fix within 1 week |
| Low | Minor issues | Fix when convenient |
Security reports should include:
Use this agent to verify that a Python Agent SDK application is properly configured, follows SDK best practices and documentation recommendations, and is ready for deployment or testing. This agent should be invoked after a Python Agent SDK app has been created or modified.
Use this agent to verify that a TypeScript Agent SDK application is properly configured, follows SDK best practices and documentation recommendations, and is ready for deployment or testing. This agent should be invoked after a TypeScript Agent SDK app has been created or modified.