Security review checklist for authentication, authorization, and sensitive data handling. Use when changing auth, MFA, secrets, input validation, or security-critical features. Not for general code review.
Security review checklist for authentication, authorization, and sensitive data handling. Use when changing auth, MFA, secrets, input validation, or security-critical features. Not for general code review.
version
2.0.0
author
SublinkPro Team
user-invocable
true
Security Review Skill
This skill provides a comprehensive security review checklist for code changes that involve authentication, authorization, sensitive data handling, or security-critical features.
When to use: When making changes to:
Authentication/authorization logic
MFA (Multi-Factor Authentication) functionality
Sensitive data handling (passwords, tokens, API keys, secrets)
API endpoints with permission requirements
Input validation and sanitization
Database queries
Cryptographic operations
CORS/CSP configurations
Session management
File upload/download functionality
Security Review Checklist
🔐 1. Authentication & Authorization
Check for:
Authentication bypass: Can the endpoint/feature be accessed without proper authentication?
Authorization checks: Are user permissions verified before allowing access?
Role-based access control: Are roles (admin, user, guest) properly enforced?
Token validation: Are JWT/API tokens properly validated (signature, expiration, issuer)?
Session security: Are sessions properly managed (timeout, secure flags, HttpOnly)?
# Go: Check for known vulnerabilities
govulncheck ./...
# Frontend: Check npm dependenciescd webs && yarn audit
Security Review Process
Step 1: Identify Security-Sensitive Changes
Review the diff and identify if the change involves authentication, sensitive data, user input, database queries, API endpoints, file operations, or cryptographic operations.
Step 2: Apply Relevant Checklists
Go through the relevant sections above and verify each item. Consult detailed guides in references/ for in-depth coverage.
Step 3: Test Security Controls
Manual testing: Try to bypass security controls
Automated testing: Run security linters (gosec, eslint-plugin-security)
Dependency scanning: Check for known vulnerabilities
Run security linters:
# Backend: gosec
go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec ./...
# Frontend: eslint with security plugin (if configured)cd webs
yarn lint
Step 4: Document Security Implications
If the change has security implications:
Update docs/security-guidelines.md if introducing new security patterns
Add security notes to PR description
Request security review from another team member for critical changes
Common Security Anti-Patterns
Trusting user input: Never trust user input directly; always validate and sanitize
Security by obscurity: Obscure endpoints still need proper authentication
Client-side validation only: Always validate on backend; frontend validation can be bypassed
Logging sensitive data: Never log passwords, tokens, or API keys
Exit Criteria
Before completing the security review:
All relevant checklist items have been verified
Security linters (gosec, ESLint) pass with no critical issues
No sensitive data is exposed in logs, errors, or responses
Input validation is implemented for all user-controlled data
Authorization checks are in place for all sensitive operations