Skip to content

meltedinhex/analyst-ai-pack / skills/operationalizing-a-hunt-into-a-detection

operationalizing-a-hunt-into-a-detection

Verified

Converts a successful threat hunt into a durable detection by extracting the discriminating logic, defining data sources and thresholds, and emitting a Sigma rule plus a test and tuning plan. Activates for requests to operationalize a hunt, turn a finding into a detection rule, or productionize hunt logic as a Sigma detection.

FileKindSize
LICENSEother340 B
SKILL.mdskill md2.8 KB
references/api-reference.mdmarkdown1.3 KB
scripts/analyst.pyscript2.7 KB

references/api-reference.md

View on GitHub
# API Reference: Operationalizing a Hunt Into a Detection

## Overview

`scripts/analyst.py` generates a Sigma rule from a detection spec describing the logsource,
selection, optional filter, condition, level, and ATT&CK tags. It generates text only and executes
nothing.

## Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | JSON, file IO |

## Spec format

```json
{
  "title": "Suspicious certutil download",
  "logsource": {"category": "process_creation", "product": "windows"},
  "selection": {"Image|endswith": "\\certutil.exe", "CommandLine|contains": ["-urlcache", "http"]},
  "filter": {"CommandLine|contains": "internal-mirror"},
  "condition": "selection and not filter",
  "level": "high",
  "attack": ["T1218", "T1105"]
}
```

## Core functions

### `generate(spec, out)`
Writes a Sigma YAML rule with title/status/logsource/detection/condition/falsepositives/level/tags.

## Usage

```bash
python scripts/analyst.py generate --spec detection.json --out rule.yml
```

## Sources

- Sigma rule specification — https://github.com/SigmaHQ/sigma-specification
- MITRE ATT&CK threat-hunting resources (hunt→detect loop) — https://attack.mitre.org/resources/
- Sigma logsource/detection/condition structure from the official specification
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall