Why this matters
Structured events improve SOC 2 auditability and incident response.
Emit JSON audit events via ActiveSupport::Notifications with user_id, action, resource_id, and request_id.
Structured events improve SOC 2 auditability and incident response.
Side-by-side examples engineers can pattern-match during review.
Rails.logger.info('user updated')ActiveSupport::Notifications.instrument('audit', {user_id:u.id, action:'user.update', resource_id:u.id, request_id:req.request_id})ActiveSupport::Notifications.instrument('audit', {action:'login'})Rails.logger.info('login')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.