TheHive responders and Cortex analyzers
Custom Cortex analyzers and responders turn TheHive into the place where an analyst runs enrichment and response in one click, without switching between consoles.
- −50%console switching per case
- 15+custom analyzers and responders
- 1 clickfrom observable to action
01Framing the project
The SOC ran TheHive for case management and Cortex for analysis, but its most useful lookups and actions were not in the standard library: an internal CMDB, a regional threat feed, EDR actions. Analysts copied observables out of the case and pasted them into other consoles.
Objectives and success criteria
- Let an analyst run enrichment and response without leaving the case.
- Make every action appear in the case timeline.
- Make a new integration a small, tested module.
Scope
- Custom Cortex analyzers for the repeated lookups
- Custom responders for blocking, isolating and ticketing
- Automatic triggers from case templates
- Packaging, tests and deployment of the components
- Replacing TheHive
- Changes to TheHive core
- Detection content
02Starting point
- Consoles opened to work one case
- several, observables copied by hand
- Time to the first action on a case
- about 14 min
- Custom analyzers and responders
- a handful, undocumented
- Tests for custom components
- none
We spent a week watching analysts work cases and noted every lookup and action they repeated. That list became the backlog, ordered by how often each one occurred.
03Design and integration
- Phase 1
Inventory the repeated work
Observables of every type (IP, domain, hash, URL, user, host) and the actions analysts took on them, ranked by frequency.
- Phase 2
Build the analyzers
Python analyzers that return a short structured report and taxonomy tags, so results read at a glance and stay searchable.
- Phase 3
Build the responders
Responders for blocking an indicator, isolating a host and opening a ServiceNow ticket, under TheHive roles.
- Phase 4
Automate the triggers
Analyzers run when an observable is added. Responders chain from case templates and alerts.
- Phase 5
Industrialize
Components are versioned and tested, their secrets stay outside the code, and a pipeline deploys them.
04Difficulties we solved
Cortex jobs timed out when an external API was slow.
Results are cached, slow lookups return a pending status, and the analyzer reports partial results instead of failing.
Analyzers needed API keys that analysts should never see.
Secrets are injected at runtime from a secrets manager, one least-privilege credential per analyzer.
Upgrades of TheHive or Cortex could break custom components silently.
Versions are pinned and every component has contract tests that replay recorded API responses.
05Results
| Measure | Before | After |
|---|---|---|
| Console switching per case | baseline | −50% |
| Time to the first action on a case | about 14 min | about 5 min |
| Custom analyzers and responders in production | a handful | 15+ |
| From observable to action | copy, paste, switch | 1 click |
Analysts stay in the case from alert to closure, and a new integration is now a small Python module with its own tests.
06Guardrails in production
- Analyzers are read-only. Responders run under TheHive roles, so only the right people can trigger a block or an isolation.
- Rate limits and caching protect the external APIs and their quotas.
- Unit tests replay recorded API responses, so a component is checked without calling the live service.
07Stack

Cortex
Python
- Git
GitHub Actions
GitLab CI


VirusTotal


Jira
- EDR APIs