Review Hog Perspective Contracts Security
PostHogOfficialPublished by PostHog
- Skill
- Review and audit
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Contracts & Security review perspective is designed to act as a focused audit layer during the code review process. It specifically targets the safety and compatibility of code changes by examining API contracts, security vulnerabilities, input validation, and schema alignment. By isolating these concerns from logic, performance, and style, it ensures that critical security and interface issues are identified without the noise of other review criteria.
What it does
- Identifies potential security vulnerabilities like SQL injection, XSS, and prompt injection.
- Validates API contracts for breaking changes, field removals, or data-type mismatches.
- Checks for robust input validation and sanitization at all entry points.
- Verifies consistency between database schemas, code models, and interface definitions.
- Audits authentication and authorization implementations for potential gaps.
- Ensures sensitive data handling practices are followed.
When to use it
- During pull request reviews to ensure security and API stability.
- When modifying database models or migration scripts.
- When updating API endpoints or changing request/response formats.
- When implementing new authentication or authorization logic.
- When integrating external APIs or updating interface definitions.
Advantages
- Provides a dedicated, specialized focus on high-risk areas like security and contracts.
- Reduces the likelihood of breaking changes in production APIs.
- Helps prevent common security vulnerabilities through systematic checks.
- Promotes consistency across different layers of the application stack.
- Simplifies the review process by separating security concerns from general logic.
Usage examples
- “Review this PR chunk for security and contract issues.”
- The agent will scan the code for missing input validation, potential SQL injection, or breaking changes in API schemas and report findings specifically related to these areas.
- “Check if these changes to the user model break the API contract.”
- The agent will analyze the model changes against existing interface definitions and report any schema mismatches or breaking changes to the API contract.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/posthog/review-hog-perspective-contracts-security/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip review-hog-perspective-contracts-security.zip -d .agents/skills
Documentation by PostHog
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 5Find SQL queries:
rg "execute|query|raw.*sql" --type py -B 2 -A 5Check auth:
rg "authenticate|authorize|permission|@login_required" --type py -B 2 -A 3Find 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
Files
- ATTRIBUTION.mdAdded by AutoGineer901 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md3.7 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PostHog
- Publisher
- PostHog (Official)
- Source
- PostHog/skills · skills/omnibus/review-hog-perspective-contracts-security · commit a5d30e7
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PostHog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download review-hog-perspective-contracts-security.zip