Skip to main content

What is detection engineering?

Detection engineering is the practice of designing, testing, deploying, and tuning the rules that turn security telemetry into alerts.

Glossary
Updated 2 min read

Definition

Detection engineering

Also called Detection development, Detection engineer

Detection engineering is the practice of designing, building, testing, deploying, and maintaining the rules and analytics that turn security telemetry into alerts, treated with the rigor of software engineering.

How it works

A detection starts as a hypothesis about attacker behavior, often a MITRE ATT&CK technique, and becomes logic that runs against log data. The engineer checks that the needed telemetry exists, writes the rule, tests it against both malicious activity and normal history, documents how to respond, and deploys it. After deployment, alert outcomes feed back into tuning.

Palantir's Alerting and Detection Strategy (ADS) framework, published after low-quality, undocumented alerts led to fatigue and alerting apathy, makes this explicit. Every alert must complete sections for its goal, categorization, strategy abstract, technical context, blind spots and assumptions, false positives, validation, priority, and response before it reaches production, and each is stored in version control and peer-reviewed. Elastic's public detection-rules repository applies the same thinking with code: rules live in a repository alongside Python tooling for parsing, validating, unit testing, and packaging them.

Example

A threat report describes attackers creating cloud access keys from the console instead of through infrastructure-as-code. The engineer confirms cloud audit logs are collected, writes a rule for key creation outside the deployment pipeline, backtests it against past logs to see how often it would have fired, adds an exclusion for a sanctioned admin workflow, and ships it with a runbook. Cotool's detection page walks through this exact case with a coding agent connected over MCP: the agent searches the logs, creates the detection, tests it over past data, and deploys it.

A sketch of that rule's logic, independent of query language:

match:   cloud audit event = CreateAccessKey
where:   caller is a human user, not a deployment role
         and the request didn't come from the CI/CD pipeline's network
except:  break-glass admin accounts with an open change ticket
output:  user, key ID, source IP, user agent, recent sign-ins for that user

Useful health measures for a detection library include the share of each rule's alerts that turn out to be true positives, how many rules have fired at all in the last quarter, how many have a validation test that still passes, and how long a noisy rule waits for tuning.

Why it matters for a SOC

Detections decide what the SOC sees. Weak ones miss attacks, and noisy ones bury analysts in false positives. Treating rules as engineered artifacts, versioned, tested, and reviewed, is what detection as code formalizes. The bottleneck is engineer time, which is why some platforms now use agents for the feedback loop. Cotool, for example, writes detections as Python, has agents investigate every alert, and feeds each verdict back into tuning the detection that fired.

Go deeper

Sources

  1. GitHub - palantir/alerting-detection-strategy-framework · accessed November 16, 2026
  2. GitHub - elastic/detection-rules · accessed November 16, 2026
  3. AI Detection Engineering with Python Detections | Cotool · accessed November 16, 2026

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo