Staging environment exists with infrastructure and dependencies matching production
Why it matters
Deploying directly to production without a staging environment means every untested configuration change, database migration, or third-party integration issue hits live users first. NIST CM-4 requires evaluating the security impact of changes before production; that evaluation requires a representative environment. A staging environment that uses SQLite while production uses PostgreSQL is not representative — subtle query behavior differences and migration incompatibilities only surface at the worst time.
Severity rationale
High because skipping a production-equivalent staging environment means integration failures, migration errors, and environment-specific bugs are discovered by users rather than by the team.
Remediation
Configure a staging environment with matching infrastructure. For Docker Compose projects, use profiles to separate staging and production:
# docker-compose.yml
services:
app-staging:
build: .
environment:
DATABASE_URL: postgres://staging-db:5432/app
profiles: [staging]
app-prod:
build: .
environment:
DATABASE_URL: postgres://prod-db:5432/app
profiles: [prod]
Add a CI/CD step that deploys to staging after tests pass and before the production promotion step. For Vercel users, Preview Deployments already provide this gate — ensure the preview environment variables match production (same DB engine, same third-party service URLs, same feature flags).
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Deployment Readiness Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · reliability.maturity — Maturity — pre-production validation environment
- nist:rev5 · CM-4 — Impact Analyses (testing changes in staging before production)
- soc2:2017 · CC8.1 — Change management
Taxons
History
- 2026-04-18·v1.0.0·Initial import from deployment-readiness·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC8.1) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2