Why this matters
Prevents leakage of sensitive details and aligns with SOC 2 secure operations.
Set APP_DEBUG=false and hide stack traces; send errors to a centralized logger with trace_id instead.
Prevents leakage of sensitive details and aligns with SOC 2 secure operations.
Side-by-side examples engineers can pattern-match during review.
APP_DEBUG=trueAPP_DEBUG=false; Log::error(json_encode(['trace_id'=>$tid,'err'=>$e->getCode()]));config(['app.debug'=>false])config(['app.debug'=>true])From the same buckets as this rule.
Public services must require TLSv1.2 or higher and set HSTS (max-age ≥ 15552000, includeSubDomains). Reject plaintext HTTP and weak ciphers; cookies must be Secure and HttpOnly with SameSite set.