1---2name: dt-sec-contextualization3description: Resolve security signals, IoC matches, or Smartscape nodes to runtime Dynatrace entities and connect findings on different entity levels through a shared runtime entity. Covers identity-to-Smartscape mapping (incl. container-image digest/ID to workload), cross-level topology (K8s pod detection vs. node CVE via pod-to-node), per-entity risk summarization, and coverage match recipes shared by dt-sec-insights. Trigger: "map these findings to workloads/hosts", "which workload does this container image run as", "do these findings relate through the same runtime entity", "enrich this IoC match with entity context", "which threat report mentions this IoC". Queries security.events ONLY for THREAT_REPORT IoC enrichment (matched IoC to attributing reports); Do NOT use for broad security.events posture/overview (use dt-sec-insights), general DQL (use dt-dql-essentials), IoC hunting in logs/spans (use dt-sec-ioc-hunting), or K8s observability outside the security cross-level context (use dt-obs-kubernetes).4license: Apache-2.05---6
7# Security Contextualization Skill
8
9Resolve security signals and entity attribute sets to runtime Dynatrace
10Smartscape entities, summarize findings across entity levels, and connect
11signals that land on different levels (e.g. a detection on a `K8S_POD` vs.
12a CVE on a `KUBERNETES_NODE`) via a shared runtime entity.
13
14## What This Skill Covers
15
16- **Identity → Smartscape mapping** — given a row carrying any of
17 `dt.smartscape_source.id`, `container_image.digest`, `container_image.id`,
18 `host.ip`, `dt.entity.*`, or `k8s.*` fields, resolve it to a Smartscape
19 entity at any requested level (CONTAINER / K8S_POD / workload /
20 K8S_NODE / HOST / cloud / `GENAI_SERVICE` — AI/GenAI workloads).
21- **Artifact → runtime bridge** — `container_image.digest` →
22 `smartscapeNodes CONTAINER` → `is_part_of.*` → parent workload or
23 `runs_on.host` → HOST. Works without pre-enriched `dt.smartscape_source.id`.
24- **Cross-level correlation** — tiered entity matching to determine whether
25 two findings (e.g. a detection and a CVE from different legs) relate through
26 a shared runtime entity. Tier 1: exact entity id match; Tier 2: same
27 workload/pod/host by name; Tier 3: same namespace/cluster (context-only —
28 does not contribute to scoring).
29- **Pod → node topology** — resolve `K8S_POD` to its `K8S_NODE` via
30 `k8s.node.name` (co-projected field) or Smartscape edge traversal. Enables
31 "detection hit pod X — does that pod run on a vulnerable node?"
32- **Coverage match recipes** — 2-way and 3-way container→workload match
33 patterns shared across dt-sec-insights coverage counting queries.
34- **Entity enrichment** — given findings, IoC matches, or raw Smartscape
35 nodes, produce per-entity risk-level breakdowns and entity-key bundles for
36 downstream scoring.
37- **IoC enrichment** — attribute an already-matched IoC (IP / domain / URL /
38 email / CVE / hash / MITRE TTP) with adversary context (actor, malware family,
39 MITRE technique, targeting, provider) by reverse-looking-up the ingested
40 `THREAT_REPORT` events whose observable arrays contain that IoC.
41
42## When to Use This Skill
43
44| Intent / trigger | Reference |
45|---|---|
46| Map findings / IoC matches to workloads, hosts, or cloud entities | `identity-mapping.md` -> `entity-enrichment.md` |
47| Which Smartscape entity does this container image / digest run as? | `identity-mapping.md` § Mapping Primitive (Path 2 - container digest) |
48| Do this detection and this CVE relate via a shared entity? | `correlation-and-coverage.md` § Correlation |
49| Pod X fired - does it run on a vulnerable node? | `correlation-and-coverage.md` § Correlation (Pod->Node Topology) |
50| Per-entity risk summary (Critical/High/Medium/Low) | `entity-enrichment.md` |
51| Coverage match recipe - which workloads are covered by product Y? | `correlation-and-coverage.md` § Coverage |
52| Which entity-identity fields are relevant to a finding type? | `identity-mapping.md` § Data Model |
53| Enrich a matched IoC (IP/domain/hash/CVE/...) with threat-report adversary context | `ioc-enrichment.md` |
54| Scope findings to AI/GenAI workloads; which processes belong to an AI service; resolve a process to its AI service | `identity-mapping.md` § Mapping Primitive (Path 4 - `GENAI_SERVICE -> SERVICE -> PROCESS`) |
55
56## How This Skill Is Organized
57
581. **SKILL.md** (this file) — entry point and routing.
592. **references/**
60 - [**identity-mapping.md**](references/identity-mapping.md) — generalized
61 identity->Smartscape resolver (mapping primitive Paths 1/2/3/4), pre-flight
62 identifier checks, level selection, and entity-identity field guidance.
63 - [**entity-enrichment.md**](references/entity-enrichment.md) — consumers of
64 the mapping primitive: cloud (Path 1), K8s workload (3-way), host-by-IP,
65 host-by-entity, natural-language fallback, problem->entities->findings chain.
66 Per-entity risk-level breakdowns (Critical/High/Medium/Low).
67 - [**correlation-and-coverage.md**](references/correlation-and-coverage.md) —
68 cross-level entity convergence, pod->node topology resolution, scoring contract,
69 and 2-way/3-way coverage match recipes shared with dt-sec-insights.
70 - [**ioc-enrichment.md**](references/ioc-enrichment.md) — reverse-lookup IoC
71 enrichment: attribute a matched IoC to ingested `THREAT_REPORT` events and
72 surface adversary context (actor / malware / MITRE / targeting). Single and
73 batch (per-IoC) templates; supported-IoC taxonomy.
74
75## Universal Best Practices
76
771. **Always load `dt-dql-essentials` first** — DQL syntax and function names
78 differ from SQL. Confirm all functions before generating queries.
792. **Ground every query in a named template** — do not improvise Smartscape joins.
80 The 3-way match, digest→CONTAINER→workload, and pod→node traversal patterns
81 are precise; deviating produces silent zero-row results.
823. **Run the pre-flight check before the full 3-way enrichment** — external
83 providers vary widely. Confirm at least one identifier path is populated
84 before running the expensive append chain.
854. **Check `dt.smartscape_source.type` before trusting Path 1** — a non-null
86 `dt.smartscape_source.id` is not proof of workload-level resolution; the
87 field may point to a namespace, cluster, or cloud resource. Only K8s workload
88 types (`K8S_DEPLOYMENT`, `K8S_DAEMONSET`, `K8S_STATEFULSET`, `K8S_CRONJOB`,
89 `K8S_JOB`, `K8S_REPLICASET`) are eligible for workload enrichment via Path 1.
905. **Dedup early and after `append`** — dedup before joins to collapse
91 re-ingested duplicates; dedup again after `append` because the same finding
92 can match multiple paths.
936. **Tier 3 correlation is context only** — same namespace/cluster shared by
94 two findings does not raise the exposure score. Never treat a cluster-level
95 shared attribute as proof of entity-level relatedness.
967. **Route topology queries to `dt-obs-kubernetes`** — pod→node placement and
97 Smartscape edge traversal patterns live in
98 `dt-obs-kubernetes/references/pod-node-placement.md`. Do not re-author
99 them here; reference them and apply the output in `correlation-and-coverage.md`.
1008. **No `dt.system.bucket` filters** — security event data may live in any
101 bucket; filtering by bucket risks hiding findings.
1029. **THREAT_REPORT is the one `security.events` query allowed here — reverse
103 lookup only.** `ioc-enrichment.md` attributes a *matched IoC* to reports
104 (IoC → report). Broad THREAT_REPORT overviews, IOC rollups, and forward
105 report → environment correlation stay in `dt-sec-insights`
106 (`threat-intelligence.md`). Never author finding/posture queries here.
107
108## Related Skills
109
110| Skill | Role |
111|---|---|
112| `dt-dql-essentials` | **Load first.** Core DQL syntax, functions, Smartscape patterns. |
113| `dt-sec-insights` | Consumer of mapping primitive; owns finding-schema queries and coverage counting logic. Owns **forward** threat-intel (report → environment correlation, overviews, IOC rollups) in `threat-intelligence.md`; this skill owns only the **reverse** IoC → report enrichment (`ioc-enrichment.md`). |
114| `dt-sec-ioc-hunting` | Routes cross-evidence correlation and entity enrichment to this skill. |
115| `dt-obs-kubernetes` | Pod→node topology; K8s entity placement patterns. |
116| `dt-obs-hosts` | Host inventory; process-level context for HOST/PROCESS_GROUP findings. |
117| `dt-obs-aws` / `dt-obs-azure` / `dt-obs-gcp` | Cloud Smartscape topology for cloud-entity enrichment. |