brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
security-scannerComprehensive vulnerability and malware scanner for skills and code. Detects code execution vulnerabilities (eval, exec, dynamic require), credential theft patterns, network calls to suspicious domains, obfuscation, and more. Provides risk assessment (SAFE/CAUTION/DANGEROUS) with detailed findings and actionable recommendations. Use before installing untrus…
Independent GitHub snapshot · Automated classification · Original documentation governs
Comprehensive static analysis tool for detecting vulnerabilities, malware patterns, and security issues in code and skills.
Security Scanner performs deep static analysis on:
It flags dangerous patterns, suspicious behaviors, and obfuscation, then provides actionable recommendations.
# Scan a skill directory
security-scanner ./my-skill/
# Scan a single file
security-scanner ./package.js
# Scan code snippet
security-scanner --code "eval(userInput)"
# Get JSON output
security-scanner ./skill --output json
# See suggested fixes
security-scanner ./skill --fix
Verdict: Do not install this code.
Detected patterns:
eval() - Arbitrary code executionexec() - Command executionrequire() with variable pathsAction: Request source code review from maintainer or reject entirely.
Verdict: Review before installation.
Detected patterns:
child_process calls (spawning external commands)Action: Examine findings, ask maintainer about suspicious patterns, install with caution.
Verdict: No obvious malicious patterns detected.
Action: Safe to install. Standard security practices still recommended (keep updated, monitor permissions).
eval()exec()require() with variable pathschild_process module importsprocess.env.SECRET, process.env.API_KEY, etc.process.env[varName]fs.readFileSync() on sensitive system files (/etc/, ~/)fetch, http.get, etc.)net, dgram)\x41\x42\x43)\u0041\u0042)Why it matters: Obfuscated code hides malicious logic. Legitimate libraries don't need to be obfuscated.
=== Security Scanner Report ===
Target: ./my-skill
Files Scanned: 5
Findings: 2
Risk Level: CAUTION
Detailed Findings:
scripts/handler.js
Line 42: [CAUTION] child_process allows spawning external commands
Code: require('child_process')
Context: const spawn = require('child_process').spawn;
src/api.js
Line 18: [CAUTION] Network call to external domain
Code: fetch('https://api.example.com/verify')
Context: return fetch('https://api.example.com/verify', {...})
Recommendation:
Action: QUARANTINE
Reason: Code contains potentially suspicious patterns requiring review
Details: Review findings before installation. Consider asking maintainer about specific suspicious patterns.
Suggested Fixes:
• Replace dynamic require with static import
File: scripts/handler.js:42
Suggestion: Use static imports or a whitelist of allowed modules
Difficulty: MEDIUM
scanner --output json
Returns structured JSON with:
target: Path/name scannedtimestamp: ISO timestampriskLevel: SAFE | CAUTION | DANGEROUSfindings[]: Array of detected issues with line numbersscannedFiles[]: List of files analyzedrecommendation: Action and reasoningfixes[]: (if --fix used) Suggested code changes# Before installing a new skill
security-scanner ~/downloads/mystery-skill/
# If DANGEROUS → Don't install
# If CAUTION → Review output, ask author
# If SAFE → Good to go
# Check your own skill for issues
security-scanner ./my-skill/ --output json > security-report.json
# Fix issues
security-scanner ./my-skill/ --fix
# In your build pipeline - fail if DANGEROUS detected
security-scanner ./src/ --output json
if [ $? -eq 2 ]; then
echo "Security violations found"
exit 1
fi
# From a sub-agent or CLI
/Users/ericwoodard/clawd/security-scanner-skill/scripts/scanner.js ~/clawd/some-skill/
Finding: "eval() allows arbitrary code execution"
Interpretation: Code can run any arbitrary JavaScript at runtime. Extremely dangerous.
Response:
Finding: "child_process allows spawning external commands"
Interpretation: Code can run system commands. Used legitimately by build tools, but also by malware.
Response:
Finding: "Accessing sensitive environment variables"
Interpretation: Code reads secret keys from environment. This is standard, but verify:
Response:
Finding: "Code appears to be minified or obfuscated"
Interpretation: Source code is intentionally hidden. Why?
Response:
.js and .min.js → Standard practiceFinding: "Network call to external domain"
Interpretation: Code calls some external API. Is it expected?
Response:
fetch('https://api.github.com/...') → Normalfetch('https://malware-collection.ru/...') → Dangerousfetch(userProvidedUrl) → Dangerous (open redirect)From a sub-agent, invoke the scanner:
# Run scan
/Users/ericwoodard/clawd/security-scanner-skill/scripts/scanner.js <skill-path>
# Check exit code
if [ $? -eq 2 ]; then
# DANGEROUS - handle rejection
elif [ $? -eq 1 ]; then
# CAUTION - handle quarantine
else
# SAFE
fi
# Or parse JSON output
result=$(/Users/ericwoodard/clawd/security-scanner-skill/scripts/scanner.js <path> --output json)
riskLevel=$(echo "$result" | jq -r '.riskLevel')
⚠️ Static analysis only - Does not execute code, so:
Still safe: Unless the scanner says DANGEROUS, you should be fine. CAUTION requires manual review but many are false positives.
security-scanner <path>Scan a file or directory.
security-scanner ./my-skill/
security-scanner ./code.js
security-scanner --code "<snippet>"Scan inline code without creating a file.
security-scanner --code "eval(userInput)"
security-scanner <path> --output jsonOutput results as JSON for programmatic parsing.
security-scanner ./skill --output json > report.json
security-scanner <path> --output textOutput as human-readable text (default).
security-scanner <path> --fixShow suggested code fixes and mitigation strategies.
security-scanner ./skill --fix
security-scanner --helpShow usage information.
0 - SAFE (no dangerous patterns)1 - CAUTION (suspicious patterns found, manual review needed)2 - DANGEROUS (malicious patterns detected, do not install)Potential additions:
Last Updated: 2025-01-29 Status: Production Ready