Interview Prep/DevSecOps/Compliance as Code, Threat Modeling & Incident Response

How do you run detection as code in production (rule testing, review and deployment)?

IntermediateProductionCompliance as Code, Threat Modeling & Incident Response
Answer

Detection rules are written in a standard format, stored in Git, reviewed in PRs, tested and deployed through CI, just like application code.

  • Sigma is a vendor-neutral rule format that converts to Splunk, Elastic, Sentinel and other query languages.
  • Each rule has metadata: MITRE ATT&CK technique, severity, owner, runbook link.
  • CI runs unit tests against sample log events (true positive and true negative).
  • Deployment pushes rules to the SIEM via API.

Benefits: version history, peer review, fewer broken detections, and a clear coverage map against ATT&CK.

All DevSecOps questions Roadmap: Policy as code

More on Compliance as Code, Threat Modeling & Incident Response