| 1 |
.. _splunk.es.splunk_investigation_module: |
| 2 |
|
| 3 |
|
| 4 |
****************************** |
| 5 |
splunk.es.splunk_investigation |
| 6 |
****************************** |
| 7 |
|
| 8 |
**Manage Splunk Enterprise Security investigations** |
| 9 |
|
| 10 |
|
| 11 |
Version added: 5.1.0 |
| 12 |
|
| 13 |
.. contents:: |
| 14 |
:local: |
| 15 |
:depth: 1 |
| 16 |
|
| 17 |
|
| 18 |
Synopsis |
| 19 |
-------- |
| 20 |
- This module allows for creation and update of Splunk Enterprise Security investigations. |
| 21 |
- When ``investigation_ref_id`` is not provided, a new investigation is created. |
| 22 |
- When ``investigation_ref_id`` is provided, the module will update the existing investigation. |
| 23 |
- Update operations can modify all fields except ``name``. |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
Parameters |
| 29 |
---------- |
| 30 |
|
| 31 |
.. raw:: html |
| 32 |
|
| 33 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 34 |
<tr> |
| 35 |
<th colspan="1">Parameter</th> |
| 36 |
<th>Choices/<font color="blue">Defaults</font></th> |
| 37 |
<th width="100%">Comments</th> |
| 38 |
</tr> |
| 39 |
<tr> |
| 40 |
<td colspan="1"> |
| 41 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 42 |
<b>api_app</b> |
| 43 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 44 |
<div style="font-size: small"> |
| 45 |
<span style="color: purple">string</span> |
| 46 |
</div> |
| 47 |
</td> |
| 48 |
<td> |
| 49 |
<b>Default:</b><br/><div style="color: blue">"missioncontrol"</div> |
| 50 |
</td> |
| 51 |
<td> |
| 52 |
<div>The app portion of the Splunk API path for the investigations endpoint.</div> |
| 53 |
<div>Override this if your environment uses a different app name.</div> |
| 54 |
</td> |
| 55 |
</tr> |
| 56 |
<tr> |
| 57 |
<td colspan="1"> |
| 58 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 59 |
<b>api_namespace</b> |
| 60 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 61 |
<div style="font-size: small"> |
| 62 |
<span style="color: purple">string</span> |
| 63 |
</div> |
| 64 |
</td> |
| 65 |
<td> |
| 66 |
<b>Default:</b><br/><div style="color: blue">"servicesNS"</div> |
| 67 |
</td> |
| 68 |
<td> |
| 69 |
<div>The namespace portion of the Splunk API path.</div> |
| 70 |
<div>Override this if your environment uses a different namespace.</div> |
| 71 |
</td> |
| 72 |
</tr> |
| 73 |
<tr> |
| 74 |
<td colspan="1"> |
| 75 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 76 |
<b>api_user</b> |
| 77 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 78 |
<div style="font-size: small"> |
| 79 |
<span style="color: purple">string</span> |
| 80 |
</div> |
| 81 |
</td> |
| 82 |
<td> |
| 83 |
<b>Default:</b><br/><div style="color: blue">"nobody"</div> |
| 84 |
</td> |
| 85 |
<td> |
| 86 |
<div>The user portion of the Splunk API path.</div> |
| 87 |
<div>Override this if your environment requires a different user context.</div> |
| 88 |
</td> |
| 89 |
</tr> |
| 90 |
<tr> |
| 91 |
<td colspan="1"> |
| 92 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 93 |
<b>description</b> |
| 94 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 95 |
<div style="font-size: small"> |
| 96 |
<span style="color: purple">string</span> |
| 97 |
</div> |
| 98 |
</td> |
| 99 |
<td> |
| 100 |
</td> |
| 101 |
<td> |
| 102 |
<div>The description of the investigation.</div> |
| 103 |
</td> |
| 104 |
</tr> |
| 105 |
<tr> |
| 106 |
<td colspan="1"> |
| 107 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 108 |
<b>disposition</b> |
| 109 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 110 |
<div style="font-size: small"> |
| 111 |
<span style="color: purple">string</span> |
| 112 |
</div> |
| 113 |
</td> |
| 114 |
<td> |
| 115 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 116 |
<li>unassigned</li> |
| 117 |
<li>true_positive</li> |
| 118 |
<li>benign_positive</li> |
| 119 |
<li>false_positive</li> |
| 120 |
<li>false_positive_inaccurate_data</li> |
| 121 |
<li>other</li> |
| 122 |
<li>undetermined</li> |
| 123 |
</ul> |
| 124 |
</td> |
| 125 |
<td> |
| 126 |
<div>The disposition of the investigation.</div> |
| 127 |
<div>Can be updated on existing investigations.</div> |
| 128 |
</td> |
| 129 |
</tr> |
| 130 |
<tr> |
| 131 |
<td colspan="1"> |
| 132 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 133 |
<b>finding_ids</b> |
| 134 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 135 |
<div style="font-size: small"> |
| 136 |
<span style="color: purple">list</span> |
| 137 |
/ <span style="color: purple">elements=string</span> |
| 138 |
</div> |
| 139 |
</td> |
| 140 |
<td> |
| 141 |
</td> |
| 142 |
<td> |
| 143 |
<div>List of finding IDs (event_ids) to attach to the investigation.</div> |
| 144 |
<div>When updating, findings are added to the investigation via a separate API call.</div> |
| 145 |
<div>Finding IDs can only be added, removal is not supported.</div> |
| 146 |
</td> |
| 147 |
</tr> |
| 148 |
<tr> |
| 149 |
<td colspan="1"> |
| 150 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 151 |
<b>investigation_ref_id</b> |
| 152 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 153 |
<div style="font-size: small"> |
| 154 |
<span style="color: purple">string</span> |
| 155 |
</div> |
| 156 |
</td> |
| 157 |
<td> |
| 158 |
</td> |
| 159 |
<td> |
| 160 |
<div>Reference ID of an existing investigation.</div> |
| 161 |
<div>If provided, the module will update the existing investigation.</div> |
| 162 |
<div>If not provided, a new investigation is created.</div> |
| 163 |
<div>When updating, all fields except <code>name</code> can be modified.</div> |
| 164 |
</td> |
| 165 |
</tr> |
| 166 |
<tr> |
| 167 |
<td colspan="1"> |
| 168 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 169 |
<b>investigation_type</b> |
| 170 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 171 |
<div style="font-size: small"> |
| 172 |
<span style="color: purple">string</span> |
| 173 |
</div> |
| 174 |
</td> |
| 175 |
<td> |
| 176 |
</td> |
| 177 |
<td> |
| 178 |
<div>The type of the investigation.</div> |
| 179 |
<div>If not specified, the default investigation type is used.</div> |
| 180 |
<div>Can be updated on existing investigations.</div> |
| 181 |
</td> |
| 182 |
</tr> |
| 183 |
<tr> |
| 184 |
<td colspan="1"> |
| 185 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 186 |
<b>name</b> |
| 187 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 188 |
<div style="font-size: small"> |
| 189 |
<span style="color: purple">string</span> |
| 190 |
</div> |
| 191 |
</td> |
| 192 |
<td> |
| 193 |
</td> |
| 194 |
<td> |
| 195 |
<div>The name of the investigation.</div> |
| 196 |
<div>Required when creating a new investigation (without <code>investigation_ref_id</code>).</div> |
| 197 |
<div>Cannot be updated after creation.</div> |
| 198 |
<div>Note that names are not unique - multiple investigations can have the same name.</div> |
| 199 |
</td> |
| 200 |
</tr> |
| 201 |
<tr> |
| 202 |
<td colspan="1"> |
| 203 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 204 |
<b>owner</b> |
| 205 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 206 |
<div style="font-size: small"> |
| 207 |
<span style="color: purple">string</span> |
| 208 |
</div> |
| 209 |
</td> |
| 210 |
<td> |
| 211 |
</td> |
| 212 |
<td> |
| 213 |
<div>The owner of the investigation.</div> |
| 214 |
<div>Use <code>admin</code> for the administrator user.</div> |
| 215 |
<div>Use <code>unassigned</code> to leave the investigation unassigned.</div> |
| 216 |
<div>Can be updated on existing investigations.</div> |
| 217 |
</td> |
| 218 |
</tr> |
| 219 |
<tr> |
| 220 |
<td colspan="1"> |
| 221 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 222 |
<b>sensitivity</b> |
| 223 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 224 |
<div style="font-size: small"> |
| 225 |
<span style="color: purple">string</span> |
| 226 |
</div> |
| 227 |
</td> |
| 228 |
<td> |
| 229 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 230 |
<li>white</li> |
| 231 |
<li>green</li> |
| 232 |
<li>amber</li> |
| 233 |
<li>red</li> |
| 234 |
<li>unassigned</li> |
| 235 |
</ul> |
| 236 |
</td> |
| 237 |
<td> |
| 238 |
<div>The sensitivity of the investigation.</div> |
| 239 |
<div>Can be updated on existing investigations.</div> |
| 240 |
</td> |
| 241 |
</tr> |
| 242 |
<tr> |
| 243 |
<td colspan="1"> |
| 244 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 245 |
<b>status</b> |
| 246 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 247 |
<div style="font-size: small"> |
| 248 |
<span style="color: purple">string</span> |
| 249 |
</div> |
| 250 |
</td> |
| 251 |
<td> |
| 252 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 253 |
<li>unassigned</li> |
| 254 |
<li>new</li> |
| 255 |
<li>in_progress</li> |
| 256 |
<li>pending</li> |
| 257 |
<li>resolved</li> |
| 258 |
<li>closed</li> |
| 259 |
</ul> |
| 260 |
</td> |
| 261 |
<td> |
| 262 |
<div>The status of the investigation.</div> |
| 263 |
<div>Can be updated on existing investigations.</div> |
| 264 |
</td> |
| 265 |
</tr> |
| 266 |
<tr> |
| 267 |
<td colspan="1"> |
| 268 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 269 |
<b>urgency</b> |
| 270 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 271 |
<div style="font-size: small"> |
| 272 |
<span style="color: purple">string</span> |
| 273 |
</div> |
| 274 |
</td> |
| 275 |
<td> |
| 276 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 277 |
<li>informational</li> |
| 278 |
<li>low</li> |
| 279 |
<li>medium</li> |
| 280 |
<li>high</li> |
| 281 |
<li>critical</li> |
| 282 |
<li>unknown</li> |
| 283 |
</ul> |
| 284 |
</td> |
| 285 |
<td> |
| 286 |
<div>The urgency of the investigation.</div> |
| 287 |
<div>Can be updated on existing investigations.</div> |
| 288 |
</td> |
| 289 |
</tr> |
| 290 |
</table> |
| 291 |
<br/> |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
Examples |
| 297 |
-------- |
| 298 |
|
| 299 |
.. code-block:: yaml |
| 300 |
|
| 301 |
# Create a new investigation |
| 302 |
- name: Create an investigation |
| 303 |
splunk.es.splunk_investigation: |
| 304 |
name: "Security Incident 2026-01" |
| 305 |
description: "Investigation into suspicious login activity" |
| 306 |
status: new |
| 307 |
owner: admin |
| 308 |
urgency: high |
| 309 |
sensitivity: amber |
| 310 |
disposition: undetermined |
| 311 |
|
| 312 |
# Create an investigation with findings attached |
| 313 |
- name: Create investigation with findings |
| 314 |
splunk.es.splunk_investigation: |
| 315 |
name: "Malware Investigation" |
| 316 |
description: "Investigation into potential malware detection" |
| 317 |
status: new |
| 318 |
owner: admin |
| 319 |
urgency: critical |
| 320 |
sensitivity: red |
| 321 |
finding_ids: |
| 322 |
- "A265ED94-AE9E-428C-91D2-64BB956EB7CB@@notable@@62eaebb8c0dd2574fc0b3503a9586cd9" |
| 323 |
|
| 324 |
# Create an investigation with a specific type |
| 325 |
- name: Create investigation with investigation type |
| 326 |
splunk.es.splunk_investigation: |
| 327 |
name: "Phishing Investigation" |
| 328 |
description: "Investigation into phishing attempt" |
| 329 |
status: new |
| 330 |
owner: admin |
| 331 |
urgency: high |
| 332 |
investigation_type: "phishing" |
| 333 |
|
| 334 |
# Update an existing investigation status |
| 335 |
- name: Update investigation status |
| 336 |
splunk.es.splunk_investigation: |
| 337 |
investigation_ref_id: "inv-12345-abcde" |
| 338 |
status: in_progress |
| 339 |
owner: analyst1 |
| 340 |
|
| 341 |
# Update investigation disposition |
| 342 |
- name: Close investigation as resolved |
| 343 |
splunk.es.splunk_investigation: |
| 344 |
investigation_ref_id: "inv-12345-abcde" |
| 345 |
status: resolved |
| 346 |
disposition: true_positive |
| 347 |
urgency: low |
| 348 |
|
| 349 |
# Add findings to an existing investigation |
| 350 |
- name: Add findings to investigation |
| 351 |
splunk.es.splunk_investigation: |
| 352 |
investigation_ref_id: "inv-12345-abcde" |
| 353 |
finding_ids: |
| 354 |
- "B376FE05-BF9F-539D-A2E3-75CC067FC8DC@@notable@@73fbccc9d1ee3685gd1c4614b0697de0" |
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
Return Values |
| 359 |
------------- |
| 360 |
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: |
| 361 |
|
| 362 |
.. raw:: html |
| 363 |
|
| 364 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 365 |
<tr> |
| 366 |
<th colspan="2">Key</th> |
| 367 |
<th>Returned</th> |
| 368 |
<th width="100%">Description</th> |
| 369 |
</tr> |
| 370 |
<tr> |
| 371 |
<td colspan="2"> |
| 372 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 373 |
<b>changed</b> |
| 374 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 375 |
<div style="font-size: small"> |
| 376 |
<span style="color: purple">boolean</span> |
| 377 |
</div> |
| 378 |
</td> |
| 379 |
<td>always</td> |
| 380 |
<td> |
| 381 |
<div>Whether any changes were made.</div> |
| 382 |
<br/> |
| 383 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 384 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">True</div> |
| 385 |
</td> |
| 386 |
</tr> |
| 387 |
<tr> |
| 388 |
<td colspan="2"> |
| 389 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 390 |
<b>investigation</b> |
| 391 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 392 |
<div style="font-size: small"> |
| 393 |
<span style="color: purple">dictionary</span> |
| 394 |
</div> |
| 395 |
</td> |
| 396 |
<td>always</td> |
| 397 |
<td> |
| 398 |
<div>The investigation result containing before/after states.</div> |
| 399 |
<br/> |
| 400 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 401 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'before': None, 'after': {'name': 'Security Incident 2026-01', 'description': 'Investigation into suspicious login activity', 'status': 'new', 'owner': 'admin', 'urgency': 'high', 'sensitivity': 'amber', 'disposition': 'undetermined', 'investigation_type': 'phishing'}}</div> |
| 402 |
</td> |
| 403 |
</tr> |
| 404 |
<tr> |
| 405 |
<td class="elbow-placeholder"> </td> |
| 406 |
<td colspan="1"> |
| 407 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 408 |
<b>after</b> |
| 409 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 410 |
<div style="font-size: small"> |
| 411 |
<span style="color: purple">dictionary</span> |
| 412 |
</div> |
| 413 |
</td> |
| 414 |
<td>always</td> |
| 415 |
<td> |
| 416 |
<div>The investigation state after module execution.</div> |
| 417 |
<br/> |
| 418 |
</td> |
| 419 |
</tr> |
| 420 |
<tr> |
| 421 |
<td class="elbow-placeholder"> </td> |
| 422 |
<td colspan="1"> |
| 423 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 424 |
<b>before</b> |
| 425 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 426 |
<div style="font-size: small"> |
| 427 |
<span style="color: purple">dictionary</span> |
| 428 |
</div> |
| 429 |
</td> |
| 430 |
<td>when investigation existed</td> |
| 431 |
<td> |
| 432 |
<div>The investigation state before module execution (if existed).</div> |
| 433 |
<br/> |
| 434 |
</td> |
| 435 |
</tr> |
| 436 |
|
| 437 |
<tr> |
| 438 |
<td colspan="2"> |
| 439 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 440 |
<b>msg</b> |
| 441 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 442 |
<div style="font-size: small"> |
| 443 |
<span style="color: purple">string</span> |
| 444 |
</div> |
| 445 |
</td> |
| 446 |
<td>always</td> |
| 447 |
<td> |
| 448 |
<div>Message describing the result.</div> |
| 449 |
<br/> |
| 450 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 451 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">Investigation created/updated successfully</div> |
| 452 |
</td> |
| 453 |
</tr> |
| 454 |
</table> |
| 455 |
<br/><br/> |
| 456 |
|
| 457 |
|
| 458 |
Status |
| 459 |
------ |
| 460 |
|
| 461 |
|
| 462 |
Authors |
| 463 |
~~~~~~~ |
| 464 |
|
| 465 |
- Ron Gershburg (@rgershbu) |