一键导入
vulnerability-scanning
Scan dependencies and code for known vulnerabilities using automated tools, triage security issues, and prioritize remediation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scan dependencies and code for known vulnerabilities using automated tools, triage security issues, and prioritize remediation
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Design AI agents with appropriate capabilities, tools, and personas for specific software development tasks
Design RESTful APIs with proper resource modeling, HTTP methods, error handling, and clear contracts following REST principles
Document APIs comprehensively with signatures, parameters, return values, errors, and working code examples for developer reference
Implement robust third-party API integrations with proper authentication, error handling, and rate limiting
Apply proven architectural patterns (MVC, layered, microservices) to create maintainable systems with clear separation of concerns
Systematically reproduce, diagnose, and analyze bugs to determine root cause, assess severity, and plan fix strategy
| name | Vulnerability Scanning |
| description | Scan dependencies and code for known vulnerabilities using automated tools, triage security issues, and prioritize remediation |
| category | security |
| required_tools | ["Bash","Read","Grep","WebSearch"] |
Automate the detection of known vulnerabilities in dependencies and code using security scanning tools, triage findings, and prioritize remediation based on risk and exploitability.
Select Appropriate Tools
Run Scans
Parse and Triage Results
Assess Exploitability
Prioritize Remediation
Context: Scanning a Node.js application
Dependency Scan:
# Run npm audit
npm audit --json > audit-results.json
# Run Snyk scan
snyk test --json > snyk-results.json
Sample Results:
{
"vulnerabilities": {
"express": {
"severity": "high",
"via": ["qs"],
"cve": "CVE-2022-24999",
"description": "express accepts malformed URLs, leading to DoS",
"fixAvailable": {
"version": "4.18.2"
}
},
"jsonwebtoken": {
"severity": "critical",
"cve": "CVE-2022-23529",
"description": "JWT signature verification bypass",
"fixAvailable": {
"version": "9.0.0"
}
},
"lodash": {
"severity": "medium",
"cve": "CVE-2021-23337",
"description": "Prototype pollution",
"fixAvailable": {
"version": "4.17.21"
}
}
}
}
SAST Scan (Semgrep):
# Run Semgrep with security rules
semgrep --config=auto --json src/ > semgrep-results.json
Sample SAST Findings:
Finding 1: SQL Injection Risk
File: src/api/users.js:45
Code: db.query(`SELECT * FROM users WHERE id=${userId}`)
Severity: Critical
CWE: CWE-89
Finding 2: Hardcoded Secret
File: src/config/database.js:12
Code: const password = "P@ssw0rd123";
Severity: Critical
CWE: CWE-798
Finding 3: Missing Input Validation
File: src/api/uploads.js:28
Code: fs.writeFileSync(req.body.filename, data)
Severity: High
CWE: CWE-22 (Path Traversal)
Triage Analysis:
| Finding | Severity | Exploitable? | Priority | Action |
|---|---|---|---|---|
| JWT bypass (CVE-2022-23529) | Critical | Yes | P0 | Update to 9.0.0 immediately |
| Hardcoded password | Critical | Yes | P0 | Move to env var, rotate credentials |
| SQL injection in users.js | Critical | Yes | P0 | Use parameterized queries |
| Path traversal in uploads | High | Yes | P1 | Validate and sanitize filenames |
| Express DoS (CVE-2022-24999) | High | Partial | P2 | Update to 4.18.2, have rate limiting |
| Lodash prototype pollution | Medium | No | P3 | Not exploitable in our usage, update when convenient |
Remediation Report:
# Security Scan Report - 2025-01-10
## Critical Issues (Fix Immediately)
1. **JWT Signature Bypass (CVE-2022-23529)**
- Package: jsonwebtoken@8.5.1
- Fix: Upgrade to 9.0.0
- Command: `npm install jsonwebtoken@9.0.0`
- Status: ⏳ In Progress
2. **Hardcoded Database Password**
- File: src/config/database.js:12
- Fix: Move to environment variable
- Action: Create .env.example, update code
- Status: ⏳ In Progress
3. **SQL Injection - User Lookup**
- File: src/api/users.js:45
- Fix: Use parameterized queries
- Action: Replace string concatenation with prepared statement
- Status: ⏳ In Progress
## High Priority (Fix This Sprint)
4. **Path Traversal - File Upload**
- File: src/api/uploads.js:28
- Fix: Validate filename, use path.basename()
- Status: 📋 Planned
5. **Express DoS Vulnerability**
- Package: express@4.17.1
- Fix: Update to 4.18.2
- Status: 📋 Planned
## Medium Priority (Backlog)
6. **Lodash Prototype Pollution**
- Package: lodash@4.17.20
- Fix: Update to 4.17.21
- Risk: Low (not exploitable in our usage)
- Status: 📝 Documented
## Summary
- Total findings: 6
- Critical: 3 (all actionable)
- High: 2 (all actionable)
- Medium: 1 (accepted risk)
Expected Result: