security-engineer
БесплатноБез исполняемых скриптовНе проверенSecurity-first auditing of AI-generated code — Level 1 quick checks during /toh-dev and /toh-test (hardcoded secrets, dangerous code execution, obvious…
от wasintoh★ 99 звёзд на GitHubОб этом скилле
Security Engineer Skill
Overview
Security-first approach for AI-generated code auditing. Provides both quick checks (during dev/test) and comprehensive audits (full protection).
Core Philosophy
"Trust, but verify - especially AI-generated code"
- Proactive Detection - Catch issues before they become vulnerabilities
- Layer Defense - Quick checks + Full audits = Maximum coverage
- Zero False Sense - Don't trust code just because it "looks safe"
- Human-Readable Reports - Clear findings with actionable fixes
Security Check Levels
+-------------------------------------------------------------+
| LEVEL 1: Quick Check (during /toh-dev, /toh-test) |
| - Hardcoded secrets |
| - Dangerous imports/code execution |
| - Basic auth issues |
| - Obvious injection vectors |
| Duration: < 5 seconds |
+-------------------------------------------------------------+
|
v
+-------------------------------------------------------------+
| LEVEL 2: Full Audit (/toh-protect) |
| - All Level 1 checks |
| - Injection attacks (SQL, XSS, Command) |
| - Auth/Authorization flaws |
| - AI-Generated Code risks |
| - Configuration security |
| - Dependency vulnerabilities |
| Duration: 30-60 seconds |
+-------------------------------------------------------------+
Level 1: Quick Check Patterns
1.1 Hardcoded Secrets Detection
Detection Patterns:
SECRET_PATTERNS:
# API Keys
- Pattern for api_key, apikey with 20+ char values
- Pattern for sk-live, pk-live, sk-test prefixes
# AWS
- Pattern: AKIA followed by 16 alphanumeric chars
- Pattern for aws_secret values
# Database URLs
- Connection strings with embedded credentials
# Private Keys
- PEM format key headers
# JWT Secrets
- jwt_secret, secret_key patterns
# Generic passwords
- password/passwd/pwd assignments
Files to check:
**/*.ts,**/*.tsx,**/*.js,**/*.jsx**/*.env*(.env, .env.local, .env.production)**/config/**,**/*.json
Files to IGNORE:
**/node_modules/**,**/.git/****/dist/**,**/build/****/*.test.*,**/*.spec.*
1.2 Dangerous Code Patterns Detection
CRITICAL - Block immediately:
CRITICAL_PATTERNS:
# Dynamic code execution
- String-based code evaluation functions
- Timer functions with string arguments
# Dangerous Node.js modules
- Shell command execution
- Process spawning with shell mode
# SQL without parameterization
- Template literals in SQL statements
- String concatenation in queries
# Dangerous HTML rendering
- React's unsafe HTML rendering attribute
- Direct HTML content assignment to DOM
WARNING - Review required:
WARNING_PATTERNS:
# Disabled security
- ESLint security rule disabling
- TypeScript strict mode bypasses
- CORS with wildcard origin
# Unsafe data handling
- JSON parsing without validation
- Deserialization of untrusted data
# Weak cryptography
- Deprecated hash algorithms (MD5, SHA1)
- Non-cryptographic random for security
1.3 Basic Auth Issues
AUTH_PATTERNS:
# Hardcoded credentials
- Default admin/root credentials
# Disabled auth
- Authentication bypass flags
- Skip auth configurations
# Weak session
- Short session secrets
- Insecure cookie settings
# JWT issues
- None algorithm acceptance
- Signature verification disabled
Quick Check Output Format
+------------------------------------------------------------+
| QUICK SECURITY CHECK |
+------------------------------------------------------------+
Scanning: src/**/*.{ts,tsx,js,jsx}
CRITICAL (2 issues - must fix!)
-----------------------------------
1. Hardcoded API Key
File: src/lib/api.ts:15
Code: const API_KEY = "sk-live-abc123..."
Fix: Use environment variable: process.env.API_KEY
2. SQL Injection Risk
File: src/api/users.ts:42
Code: SELECT with template literal interpolation
Fix: Use parameterized query: WHERE id = $1
WARNING (1 issue - review recommended)
-----------------------------------
1. Disabled ESLint Security
File: src/utils/parse.ts:8
Why: Security rules should not be disabled
====================================
Summary: 2 critical, 1 warning
Status: BLOCKED - Fix critical issues
====================================
Level 2: Full Audit Patterns
2.1 Injection Attack Detection
SQL Injection
**Vulnerable
Установить security-engineer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл security-engineer?
Security-first auditing of AI-generated code — Level 1 quick checks during /toh-dev and /toh-test (hardcoded secrets, dangerous code execution, obvious injection vectors) and Level 2 full audits for /toh-protect (SQL/XSS/command injection, auth and authorization flaws, configuration and dependency risks) with human-readable, actionable fix reports. Use for any security review or before shipping.
Как установить скилл security-engineer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл security-engineer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic