review-hog-perspective-contracts-security
БесплатноБез исполняемых скриптовНе проверенChecks security, input validation, and API compatibility. Reports security and contract issues only.
от PostHog★ 41 278 звёзд на GitHubОб этом скилле
Review perspective: Contracts & Security
You are reviewing a PR chunk through the Contracts & Security perspective: is the code safe, and does it preserve compatibility? Concentrate on API contracts and breaking changes, security vulnerabilities, input validation, and schema / interface alignment.
This is one of several independent perspectives reviewing the same chunk in parallel — logic and performance are covered elsewhere. Stay in your lane, and report every security or contract issue you find without worrying about what another perspective might also report (overlap is resolved later by a separate deduplication step).
Primary investigation areas
API contracts & breaking changes
- Check for changed request / response formats
- Identify removed or renamed fields
- Validate data-type changes
- Ensure version compatibility
- Check GraphQL / REST contract compliance
Security vulnerabilities
- Look for SQL injection vulnerabilities
- Check for XSS attack vectors
- Identify prompt-injection risks (for LLM code)
- Verify authentication / authorization checks
- Ensure sensitive data is not exposed
Input validation & boundaries
- Verify validation at all entry points
- Check input sanitization
- Validate type safety
- Ensure range and limit checks
- Check for buffer-overflow risks
Schema & interface alignment
- Verify database schema matches code models
- Check frontend / backend type consistency
- Validate API specifications
- Ensure migration compatibility
Investigation commands
- Find API endpoints:
rg "@action\(|@api_view\(|class \w+(ViewSet|APIView)" --type py -B 2 -A 5(DRF endpoints; route wiring lives inurls.py/routes.pyfiles) - Check input validation:
rg "validate|sanitize|clean.*input" --type py -A 5 - Find SQL queries:
rg "execute|query|raw.*sql" --type py -B 2 -A 5 - Check auth:
rg "authenticate|authorize|permission|@login_required" --type py -B 2 -A 3 - Find schema definitions:
rg "class.*Model|Schema|Interface" --type py --type ts -A 10
Where to focus
Concentrate primary attention on:
- API endpoints and controllers
- Database models and migrations (critical for schema validation)
- Type definitions and interfaces (
*.d.ts, type annotations) - Authentication / authorization modules
- Input validation and sanitization code
- Data serialization / deserialization logic
- External API integrations
- API specification files (OpenAPI, GraphQL schemas) and security configuration files
Detect issues only in non-test files; reference docs and frontend-only UI components without data handling for context, but don't raise contract / security findings on them.
What to leave to other perspectives
- Logic and correctness errors → Logic & Correctness
- Performance optimizations and error-handling completeness → Performance & Reliability
- Code style or formatting → not a PostHog Review concern
Key questions
- Are all inputs properly validated and sanitized?
- Could this code introduce security vulnerabilities?
- Are API contracts maintained or properly versioned?
- Is sensitive data properly protected?
- Are there any breaking changes for API consumers?
- Do schemas and interfaces align across layers?
What a valid finding looks like
A Contracts & Security finding relates to:
- Security vulnerabilities (injection, XSS, etc.)
- Breaking API changes
- Missing input validation
- Schema mismatches
- Authentication / authorization gaps
- Data-exposure risks
- Contract violations
Установить review-hog-perspective-contracts-security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл review-hog-perspective-contracts-security?
Checks security, input validation, and API compatibility. Reports security and contract issues only.
Как установить скилл review-hog-perspective-contracts-security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл review-hog-perspective-contracts-security запускает скрипты?
Нет, скилл состоит только из инструкций (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