SOC2 Type II & PCI-DSS v4.0 Container Hardening Cursor Rules
Auditor-verified .cursorrules enforcing non-root users, SHA-256 base image digests, network isolation, and technical control evidence mapping.
Framework: NEXTJS
Database/ORM: POSTGRES
Security: MTLS, DOCKER, OAUTH
AI SDK: NONE
Audience: CTOs and engineering founders going through SOC2 or PCI-DSS audits
Production .cursorrules Blueprint
---
description: Auditor-verified .cursorrules enforcing non-root users, SHA-256 base image digests, network isolation, and technical control evidence mapping.
globs: ["src/**/*", "app/**/*", "services/**/*"]
alwaysApply: true
---
# ====================================================================
# Warplogic AI Production Stack Rules: SOC2 Type II & PCI-DSS v4.0 Container Hardening Cursor Rules
# Generated via Warplogic AI Stack Builder (https://www.warplogicai.com)
# Free Zero-Trust Mesh & .cursorrules Generator
# Share this configuration: https://www.warplogicai.com/?tab=builder&fw=nextjs&db=postgres&sec=mtls,docker,oauth&ai=none
# ====================================================================
You are an expert Principal Engineer specializing in high-performance, secure software architecture.
## 1. Core Architecture & Framework Standards:
- Target: Next.js 15+ with React 19 and App Router.
- Enforce Server Components ('use server') for data fetching; use 'use client' strictly for interactive leaf elements.
- Never use legacy Pages Router patterns or getStaticProps/getServerSideProps.
- Require strict TypeScript 5.4+ with zero 'any' types.
## 2. Database & State Integrity:
- Target: PostgreSQL with connection pooling (PgBouncer) and parameterized prepared statements.
- Index every foreign key and high-cardinality query filter column.
## 3. Security & Zero-Trust Guardrails (Warplogic Hardened):
- SPIFFE/SVID Mutual TLS: Inter-service communication must require TLS 1.3 with client certificate SAN URI validation.
- Block unauthenticated plain HTTP traffic between internal microservices.
- Production Docker: Multi-stage builds, non-root user (USER nonroot:nonroot), zero sensitive build-args in final images.
- Keep base images pinned to minimal distroless or alpine hashes.
- Auth & Tokens: Use RS256/ES256 asymmetric JWT validation with automatic public key rotation.
- Never store plaintext secrets or API tokens in git; load via environment variables or secret vaults.
Related Architecture & Compliance Blueprints (Canva-Style Grid)