security-auditor · curiositech — скилл для Claude Code: аудит безопасности кода
Скилл security-auditor сканирует зависимости, ищет секреты в коде и проверяет проект по OWASP Top 10. Пригодится перед деплоем или code review, когда надо быстро найти уязвимости.
MIT 243 установок ★ 274 обновлён 2026-10-30
npx skills add curiositech/some_claude_skills --skill security-auditor -a claude-codeЧто делает security-auditor
Скилл запускает три типа проверок: npm audit и pip-audit для уязвимых зависимостей, поиск секретов по шаблонам и энтропии строк, статический анализ кода на инъекции и XSS. Отчёт собирается в JSON с severity по каждому найденному месту.
Внутри лежат скрипты full-audit.sh, detect-secrets.sh и owasp-check.py. Bash-доступ ограничен конкретными командами: npm audit:*, pip-audit:*, grep:*, find:*.
Скилл не трогает рантайм-защиту вроде WAF и rate limiting, сетевые правила и сертификации SOC2/HIPAA. Для них нужны другие инструменты. Зато умеет ловить eval(), pickle.loads() без проверки, innerHTML и строковую конкатенацию SQL.
Какие задачи решает
- найти уязвимые npm- и pip-зависимости
- обнаружить закоммиченные API-ключи и приватные ключи
- проверить код по чек-листу OWASP Top 10
- собрать security-отчёт для команды или стейкхолдеров
- прогнать быстрый аудит перед pull request
Примеры запросов агенту
- Запусти полный аудит безопасности проекта в текущей папке
- Проверь зависимости и покажи, где есть критические CVE
- Поищи секреты и ключи в
src/
Как установить security-auditor
1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill security-auditor -a claude-code2Вручную: положить файлы
~/.claude/skills/security-auditor/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/security-auditor/
1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill security-auditor -a codex2Вручную: положить файлы
.agents/skills/security-auditor/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill security-auditor -a cursor2Вручную: положить файлы
.cursor/skills/security-auditor/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install curiositech/some_claude_skills .claude/skills/security-auditor2Вручную: положить файлы
.github/skills/security-auditor/SKILL.md1Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill security-auditor -a gemini-cli2Командой платформы
gemini skills install https://github.com/curiositech/some_claude_skills --path .claude/skills/security-auditorВручную: положить файлы
.devin/skills/security-auditor/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add curiositech/some_claude_skills --skill security-auditor -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о security-auditor
Как установить security-auditor в Claude Code?
Выполни npx skills add curiositech/some_claude_skills --skill security-auditor -a claude-code. Файл скилла появится в ~/.claude/skills/security-auditor/SKILL.md.
Что делает security-auditor?
Сканирует кодовую базу на уязвимости: проверяет зависимости через npm audit и pip-audit, ищет секреты по энтропии строк, делает статический анализ на инъекции и XSS. Результат — JSON-отчёт с severity и рекомендациями по исправлению.
Чем security-auditor не занимается?
Не настраивает WAF и rate limiting, не проверяет сетевые правила и firewall, не проводит сертификации SOC2/HIPAA. Это детектор уязвимостей, а не инструмент пентеста и не комплаенс-процесс.
Исходный текст
SKILL.md · MIT
---
name: security-auditor
description: Security vulnerability scanner and OWASP compliance auditor for codebases. Dependency scanning (npm audit, pip-audit), secret detection (high-entropy strings, API keys), SAST for injection/XSS
vulnerabilities, and security posture reports. Activate on 'security audit', 'vulnerability scan', 'OWASP', 'secret detection', 'dependency check', 'CVE', 'security review', 'penetration testing prep'.
NOT for runtime WAF configuration (use infrastructure tools), network security/firewalls, or compliance certifications like SOC2/HIPAA (legal/organizational).
allowed-tools: Read,Write,Edit,Bash(npm audit:*,pip-audit:*,grep:*,find:*),Grep,Glob
metadata:
category: Code Quality & Testing
pairs-with:
- skill: devops-automator
reason: Secure deployment pipelines
- skill: mcp-creator
reason: Secure MCP server development
tags:
- security
- owasp
- vulnerabilities
- sast
- dependencies
---
# Security Auditor
Comprehensive security scanning for codebases. Identifies vulnerabilities before they become incidents. Focuses on actionable findings with remediation guidance.
## When to Use
**Use for:**
- Pre-deployment security audits
- Dependency vulnerability scanning
- Secret/credential leak detection
- Code-level SAST (Static Application Security Testing)
- Security posture reports for stakeholders
- OWASP Top 10 compliance checking
- Pre-PR security reviews
**Do NOT use for:**
- Runtime security (WAF, rate limiting) - use infrastructure tools
- Network security/firewall rules - use cloud/DevOps skills
- SOC2/HIPAA/PCI compliance - requires legal/organizational process
- Penetration testing execution - this is detection, not exploitation
## Quick Start
### Full Security Audit
```bash
# Run comprehensive scan
./scripts/full-audit.sh /path/to/project
# Output: security-report.json + summary
```
### Quick Checks
```bash
# Dependency vulnerabilities only
npm audit --json > deps-audit.json
# Secret detection only
./scripts/detect-secrets.sh /path/to/project
# OWASP check specific file
./scripts/owasp-check.py /path/to/file.js
```
## Core Scanning Capabilities
### 1. Dependency Scanning
| Package Manager | Command | Severity Levels |
|-----------------|---------|-----------------|
| npm | `npm audit --json` | critical, high, moderate, low |
| yarn | `yarn audit --json` | same as npm |
| pip | `pip-audit --format json` | critical, high, medium, low |
| cargo | `cargo audit --json` | same |
**Decision Tree:**
```
Critical severity found?
├── YES → Block deployment, immediate fix required
│ └── Check if patch available → npm audit fix --force
├── NO → High severity?
├── YES → Fix within sprint, document if deferred
└── NO → Low/Moderate → Track, fix during maintenance
```
### 2. Secret Detection
**High-Risk Patterns:**
- API keys: `/[A-Za-z0-9_]{20,}/` near "key", "api", "secret"
- AWS credentials: `AKIA[0-9A-Z]{16}`
- Private keys: `-----BEGIN (RSA|EC|OPENSSH) PRIVATE KEY-----`
- JWT tokens: `eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+`
- Connection strings: `://[^:]+:[^@]+@`
**Entropy Analysis:**
- Shannon entropy > 4.5 on strings > 20 chars = suspicious
- Base64-encoded blobs in source = investigate
**False Positive Handling:**
```
Secret-like pattern found?
├── In test file? → Lower severity, document
├── In example/docs? → Check if placeholder
├── High entropy + near "password"/"secret" → High confidence
└── In .env.example? → Acceptable if placeholder values
```
### 3. OWASP Top 10 Static Analysis
| # | Vulnerability | Detection Pattern |
|---|---------------|-------------------|
| A01 | Broken Access Control | Missing auth checks on routes |
| A02 | Cryptographic Failures | Weak algorithms (MD5, SHA1 for passwords) |
| A03 | Injection | Unparameterized queries, eval(), innerHTML |
| A04 | Insecure Design | Hardcoded credentials, missing rate limits |
| A05 | Security Misconfiguration | Debug mode in prod, default credentials |
| A06 | Vulnerable Components | Known CVEs in dependencies |
| A07 | Auth Failures | Weak password policies, session issues |
| A08 | Integrity Failures | Unsigned updates, untrusted deserialization |
| A09 | Logging Failures | Sensitive data in logs, missing audit trails |
| A10 | SSRF | Unvalidated URL inputs to fetch/request |
### 4. Language-Specific Checks
**JavaScript/TypeScript:**
- `eval()`, `new Function()` - code injection
- `innerHTML`, `outerHTML` - XSS vectors
- `document.write()` - DOM-based XSS
- `child_process.exec()` with user input - command injection
- Regex without timeout - ReDoS vulnerability
**Python:**
- `pickle.loads()` with untrusted data - arbitrary code execution
- `yaml.load()` without `Loader=SafeLoader` - code injection
- `subprocess.shell=True` - command injection
- `eval()`, `exec()` - code injection
- SQL string concatenation - SQL injection
**SQL:**
- String concatenation in queries - SQL injection
- `LIKE '%' + input + '%'` - injection via wildcards
- Missing parameterization - critical vulnerability
## Anti-Patterns
### Anti-Pattern: Security by Obscurity
**What it looks like**: "Nobody will find this hardcoded password"
**Why wrong**: Secrets in source always leak eventually
**Instead**: Environment variables, secret managers, zero hardcoded secrets
### Anti-Pattern: Audit Fatigue
**What it looks like**: 500 findings, all "medium", team ignores
**Why wrong**: Critical issues buried in noise
**Instead**: Prioritize by exploitability, start with critical/high only
### Anti-Pattern: Fix Without Understanding
**What it looks like**: `npm audit fix --force` without review
**Why wrong**: May introduce breaking changes, doesn't address root cause
**Instead**: Review each fix, understand the vulnerability, test after
### Anti-Pattern: One-Time Audit
**What it looks like**: "We did a security audit last year"
**Why wrong**: New CVEs daily, code changes constantly
**Instead**: CI/CD integration, weekly automated scans minimum
## Security Report Format
```json
{
"summary": {
"critical": 0,
"high": 2,
"medium": 5,
"low": 12,
"informational": 8
},
"findings": [
{
"id": "SEC-001",
"severity": "high",
"category": "A03:Injection",
"title": "SQL Injection in user search",
"location": "src/api/users.js:45",
"description": "User input concatenated directly into SQL query",
"evidence": "const query = `SELECT * FROM users WHERE name = '${input}'`",
"remediation": "Use parameterized queries: db.query('SELECT * FROM users WHERE name = $1', [input])",
"references": ["https://owasp.org/www-community/attacks/SQL_Injection"]
}
],
"recommendations": [
"Implement parameterized queries across all database access",
"Add input validation layer",
"Enable SQL query logging for monitoring"
]
}
```
## CI/CD Integration
### GitHub Actions Example
```yaml
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run security audit
run: |
npm audit --json > audit.json
./scripts/detect-secrets.sh . > secrets.json
./scripts/generate-report.py
- name: Fail on critical
run: |
if jq '.summary.critical > 0' report.json; then
echo "Critical vulnerabilities found!"
exit 1
fi
```
## Scripts (in `scripts/` folder)
| Script | Purpose |
|--------|---------|
| `full-audit.sh` | Comprehensive security scan |
| `detect-secrets.sh` | High-entropy string and pattern detection |
| `owasp-check.py` | OWASP Top 10 static analysis |
| `generate-report.py` | Combine findings into unified report |
## Expert vs Novice Approach
| Novice | Expert |
|--------|--------|
| Runs audit once before release | CI/CD integration, every commit |
| Focuses on tool output only | Understands vulnerability context |
| Fixes everything or nothing | Triages by exploitability |
| Uses one scanner | Layers multiple tools |
| Ignores false positives | Tunes detection rules |
## Success Metrics
| Metric | Target |
|--------|--------|
| Critical/High pre-production | 0 |
| Mean time to remediate critical | < 24 hours |
| False positive rate | < 10% |
| Scan coverage | 100% of deployable code |
## Reference Files
- `references/owasp-top-10-2024.md` - Detailed OWASP guidance
- `references/secret-patterns.md` - Comprehensive regex patterns
- `references/remediation-playbook.md` - Fix guidance by vulnerability type
- `references/ci-cd-templates.md` - Integration examples
- `scripts/` - Working security scanning scripts
---
**Detects**: Dependency CVEs | Secret leaks | Injection vulnerabilities | OWASP violations | Security misconfigurations
**Use with**: site-reliability-engineer (deployment gates) | code-review (PR security checks)
© curiositech · MIT · curiositech/some_claude_skills
Похожие скиллы
Все скиллы по теме «Безопасность» →Сначала — security-auditor от других авторов.