Why this matters
Traceable actions enable SOC 2 audits and forensic investigations.
Attach a trace_id (e.g., from request header or generated UUID) and emit structured JSON logs for login, role change, and data export routes.
Traceable actions enable SOC 2 audits and forensic investigations.
Side-by-side examples engineers can pattern-match during review.
console.log('user logged in')logger.info({ ts:new Date().toISOString(), action:'auth.login', user_id:req.user.id, trace_id:req.id })logger.info({ action:'role.change', trace_id })console.log('role changed')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.