Never swallow exceptions in catch blocks; either rethrow or return an explicit error result.
error-handling
High
React "render" functions should return a value
Ensure that React class components' render functions return a value. Forgetting a return statement results in missing UI elements and potential bugs.
error-handlingstack-react+1
High
React children should not be passed as props
Check if React children are passed as regular props instead of being nested inside components. Passing them incorrectly can cause conflicts and reduce clarity.
readability-refactorstack-react+1
High
React Context values should have stable identities
Identify cases where React Context values are being reassigned dynamically. Unstable context values trigger unnecessary re-renders. Use memoization to stabilize them.
performance-efficiencystack-react+1
High
Read headers/cookies only on the server
Use headers() and cookies() in Server Components, Route Handlers, or server actions; never in Client Components.
stack-nextjsstack-react+2
High
Redact CHD in CI and fail builds on PAN patterns
CI logs must redact secrets and CHD; disable shell xtrace, and add a job that fails if PAN regex (e.g., [0-9]{13,19} with Luhn) appears in logs/artifacts. (PCI DSS 4.0 Req. 10 & CI hygiene)
compliance-pci-dssci-cd-build-hygiene+1
High
Redact PII in logs and metrics by default
Logging/metrics must redact or hash personal data; attach lawful_basis and purpose to diagnostic context; forbid raw PII in logs. (GDPR Art. 5(1)(c) data minimization)
compliance-gdprobservability-logging+1
High
Remove Items Safely During Iteration
Verify that collections are not modified directly during iteration. Instead, ensure safe removal techniques such as iterating over a copy or using `ToList()`.
error-handling
High
Remove Unused Function Parameters
Identify function parameters that are declared but never used within the function body. Remove them to improve clarity and maintainability.
maintainabilityreadability-refactor
High
Replace null assertions with explicit null handling
Avoid the !! operator. Prefer safe calls, Elvis (?:), early returns, or explicit exceptions with a clear message.
error-handlingreadability-refactor
High
Replace printStackTrace with proper logging
Do not use printStackTrace/System.err; log via a structured logger with context and level.
observability-logging
High
Require a plan artifact and policy checks in CI
CI must run fmt/validate, produce and upload a plan artifact (e.g., terraform plan -out plan.bin), run policy-as-code (e.g., tfsec/checkov/conftest), and gate apply on manual approval for prod.
infra-as-codeci-cd-build-hygiene+1
High
Require Changeset for publishable package changes
If a PR modifies a workspace with "private": false in its package.json, enforce a .changeset/*.md entry describing semver impact for each affected package.
monorepo-hygieneapi-contracts-versioning+1
High
Require HTTPS and HSTS with Data Protection keys
Use app.UseHsts(); app.UseHttpsRedirection(); store DataProtection keys in Azure Key Vault or KMS with rotation.
compliance-soc2-essentialssecurity-hardening+1
High
Require MFA for admin actions touching ePHI
Endpoints under /admin or privileged routes that can view or export ePHI must enforce multi-factor authentication and recent re-auth (e.g., within 15 minutes).
compliance-hipaasecurity-hardening+1
High
Require step-up MFA for privileged operations
Actions like role changes, key rotations, and exports of PII require MFA re-authentication within the last 5 minutes; record mfa_verified_at in the audit log.
compliance-soc2-essentialssecurity-hardening
High
Require TLSv1.2+ and secure cookies
Configure http.Server with tls.Config{MinVersion: tls.VersionTLS12} and set cookies with Secure, HttpOnly, SameSite.
compliance-soc2-essentialssecurity-hardening
High
Retention: set TTLs for caches and temp stores with PII
All cache entries containing PII must set an explicit TTL aligned to the retention policy (e.g., 24h). No indefinite storage of personal data in Redis or in-memory caches.
compliance-lgpdcaching-strategy+1
High
Retrieve Only Necessary Fields in SQL Queries
Ensure that SQL queries specify only the necessary fields instead of using `SELECT *` to optimize database performance.
database-query-performance
High
Return explicit HTTP responses from API methods
API endpoints should return an explicit status code and minimal error body on failures; avoid 200 with error payload.
api-conventions
High
Return proper HTTP status codes
Return 2xx only on success; use 4xx for client errors and 5xx for server errors, with a minimal JSON error body.
api-conventionsstack-php
High
Return proper HTTP status codes for errors
Handlers must return non-2xx status codes for error outcomes and include a minimal error body that does not leak sensitive details.
api-conventionserror-handling+2
High
Revalidate after mutations to keep UI cache coherent
After server-side mutations, call revalidatePath or revalidateTag to refresh cached RSC data.
stack-nextjsstack-react+2
High
Right-size the PR or justify size
If the PR is large (many files/lines), split it into logical chunks or provide a clear justification and review guide listing file groups and what to focus on.