CI/CD Runner Pipeline Gate

Terraform & OpenTofu (.tf / .tfstate) in SOC 2 Change Management & Audit Gate

Under SOC 2 CC6.1 and CC6.6 audit criteria, merging AI-assisted changes to Terraform & OpenTofu (.tf / .tfstate) without deterministic proof of zero-plaintext-egress invalidates compliance baselines. Pushing unredacted files containing `password` to third-party LLMs exposes infrastructure credentials. StackEngine validates that sensitive values like `__SE_AWS_8A68CC__` remain tokenized throughout the review pipeline.

Policy: block_and_rotateExit Code: 1 (Blocking)Zero-Plaintext-EgressMaker-Checker Governed

1. Runner Pipeline Gate Integration

scripts/soc2-audit-gate.sh

Enforce deterministic zero-plaintext redaction in runner memory before configuration payloads can reach external LLM diagnostic endpoints:

# Enforce Maker-Checker PR workflow & export SOC 2 CC6.1/CC6.6 evidence
stackengine scan main.tf || {
  stackengine fix main.tf --ci-pr
  stackengine policy export --format csv --controls > soc2-evidence.csv
  exit 1
}
Pre-Flight Execution Command
stackengine policy export --format csv --controls

Scale Across CI/CD Fleets

Unlock 500+ diagnostic matrices, repo-wide policies, and automated Pull Request generation.

SOC 2 Change Gate - CI Audit Check
[FAILED - EXIT 1]
[stackengine] Initializing Tier0Sentinel & TreeSitterWasmExtractor...
[stackengine] Scanning main.tf (latency: 0.33ms)...
[LEAK INTERCEPTED] Unredacted credential detected: AWS_SECRET_ACCESS_KEY
[AUDIT] SHA-256 Event logged to .stackengine/audit.jsonl
[ACTION] Maker-Checker PR synthesized. Merge blocked until human review.
Process terminated with exit code 1. Build Failed.
Synthesized Maker-Checker Pull Request
Parameterized Refactor
@@ -4,8 +4,8 @@ resource "aws_db_instance" "prod" {
identifier = "fin-prod-primary"
engine = "postgres"
username = "pg_admin"
- password = "SuperS3cretP@ss99!x9"
+ password = var.db_master_password # remediated: variable reference
}
provider "aws" {
- access_key = "AKIASIXWNGTJKX23MOP4"
- secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
+ # remediated: credentials sourced from ambient IAM role
}
MANDATORY REMEDIATION DIRECTIVE: Credentials committed to Git history are permanently compromised. Merging a masking patch alone does not eliminate exfiltration risk; commit authors must revoke and rotate compromised credentials immediately.

2. Shared Policy Specification & Audit Defensibility

To eliminate the Reviewer Blindspot in SOC 2 Change Management & Audit Gate, StackEngine enforces repo-wide `.stackengine.yaml` policies. At the runner gate, `stackengine policy export --format csv --controls` intercepts raw secrets via `Tier0Sentinel` and `TreeSitterWasmExtractor`. Because credentials committed to git history are permanently compromised, the gate exits with code 1, enforcing mandatory credential revocation and rotation (`block_and_rotate`). The Maker-Checker protocol synthesizes a syntax-validated Pull Request parameterizing secrets like `var.db_master_password` while human Tech Leads retain merge authority.

Repository-Root .stackengine.yaml Policy
version: 1
policy:
  enforce_zero_plaintext_egress: true
  remediation_mode: block_and_rotate
  exit_on_secret: 1
vault:
  in_memory_only: true
  ttl_seconds: 600
Offline Ed25519 & SHA-256 Audit Attestation

Every remediation draft synthesized by StackEngine is sealed with an offline Ed25519 cryptographic license attestation and appends immutable SHA-256 events to .stackengine/audit.jsonl. Provides deterministic proof for SOC 2 Type II CC6.1 & CC6.6 criteria without third-party cloud telemetry.