Debian Codegraph @

ansible_collections/splunk/es/docs/splunk.es.splunk_finding_info_module.rst

raw
1 .. _splunk.es.splunk_finding_info_module:
2
3
4 *****************************
5 splunk.es.splunk_finding_info
6 *****************************
7
8 **Gather information about Splunk Enterprise Security Findings**
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 querying information about Splunk Enterprise Security Findings.
21 - Use this module to retrieve finding configurations without making changes.
22 - Query by ``ref_id`` to fetch a specific finding. Without ``earliest`` and ``latest``.
23 - Query by ``title`` to filter findings by exact title match.
24 - Use ``earliest`` and ``latest`` to control the time range of returned findings.
25 - By default, if ``earliest`` and ``latest`` are not specified, findings from the last 24 hours are returned.
26 - This default time (24 hours) range applies when querying by ``title`` or all findings (not by ``ref_id``).
27 - This module uses the httpapi connection plugin and does not require local Splunk SDK.
28
29
30
31
32 Parameters
33 ----------
34
35 .. raw:: html
36
37 <table border=0 cellpadding=0 class="documentation-table">
38 <tr>
39 <th colspan="1">Parameter</th>
40 <th>Choices/<font color="blue">Defaults</font></th>
41 <th width="100%">Comments</th>
42 </tr>
43 <tr>
44 <td colspan="1">
45 <div class="ansibleOptionAnchor" id="parameter-"></div>
46 <b>api_app</b>
47 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
48 <div style="font-size: small">
49 <span style="color: purple">string</span>
50 </div>
51 </td>
52 <td>
53 <b>Default:</b><br/><div style="color: blue">"SplunkEnterpriseSecuritySuite"</div>
54 </td>
55 <td>
56 <div>The app portion of the Splunk API path for the findings endpoint.</div>
57 <div>Override this if your environment uses a different app name.</div>
58 </td>
59 </tr>
60 <tr>
61 <td colspan="1">
62 <div class="ansibleOptionAnchor" id="parameter-"></div>
63 <b>api_namespace</b>
64 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
65 <div style="font-size: small">
66 <span style="color: purple">string</span>
67 </div>
68 </td>
69 <td>
70 <b>Default:</b><br/><div style="color: blue">"servicesNS"</div>
71 </td>
72 <td>
73 <div>The namespace portion of the Splunk API path.</div>
74 <div>Override this if your environment uses a different namespace.</div>
75 </td>
76 </tr>
77 <tr>
78 <td colspan="1">
79 <div class="ansibleOptionAnchor" id="parameter-"></div>
80 <b>api_user</b>
81 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
82 <div style="font-size: small">
83 <span style="color: purple">string</span>
84 </div>
85 </td>
86 <td>
87 <b>Default:</b><br/><div style="color: blue">"nobody"</div>
88 </td>
89 <td>
90 <div>The user portion of the Splunk API path.</div>
91 <div>Override this if your environment requires a different user context.</div>
92 </td>
93 </tr>
94 <tr>
95 <td colspan="1">
96 <div class="ansibleOptionAnchor" id="parameter-"></div>
97 <b>earliest</b>
98 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
99 <div style="font-size: small">
100 <span style="color: purple">string</span>
101 </div>
102 </td>
103 <td>
104 </td>
105 <td>
106 <div>The earliest time for findings to return.</div>
107 <div>All findings returned have a _time greater than or equal to this value.</div>
108 <div>Accepts relative time (e.g. <code>-30m</code>, <code>-7d</code>, <code>-1w</code>), epoch time, or ISO 8601 time.</div>
109 <div>If not provided, defaults to the last 24 hours (<code>-24h</code>).</div>
110 <div>Ignored when querying by <code>ref_id</code> (time is extracted from ref_id automatically).</div>
111 <div>Applies when querying by <code>title</code> or all findings.</div>
112 </td>
113 </tr>
114 <tr>
115 <td colspan="1">
116 <div class="ansibleOptionAnchor" id="parameter-"></div>
117 <b>latest</b>
118 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
119 <div style="font-size: small">
120 <span style="color: purple">string</span>
121 </div>
122 </td>
123 <td>
124 </td>
125 <td>
126 <div>The latest time for findings to return.</div>
127 <div>All findings returned have a _time less than or equal to this value.</div>
128 <div>Accepts relative time (e.g. <code>-30m</code>, <code>now</code>), epoch time, or ISO 8601 time.</div>
129 <div>If not provided, defaults to the current time (<code>now</code>).</div>
130 <div>Ignored when querying by <code>ref_id</code> (time is extracted from ref_id automatically).</div>
131 <div>Applies when querying by <code>title</code> or all findings.</div>
132 </td>
133 </tr>
134 <tr>
135 <td colspan="1">
136 <div class="ansibleOptionAnchor" id="parameter-"></div>
137 <b>limit</b>
138 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
139 <div style="font-size: small">
140 <span style="color: purple">integer</span>
141 </div>
142 </td>
143 <td>
144 </td>
145 <td>
146 <div>Maximum number of findings to return.</div>
147 <div>If not specified, all matching findings are returned.</div>
148 <div>Use this to limit large result sets.</div>
149 </td>
150 </tr>
151 <tr>
152 <td colspan="1">
153 <div class="ansibleOptionAnchor" id="parameter-"></div>
154 <b>ref_id</b>
155 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
156 <div style="font-size: small">
157 <span style="color: purple">string</span>
158 </div>
159 </td>
160 <td>
161 </td>
162 <td>
163 <div>Reference ID (finding ID) to query a specific finding.</div>
164 <div>If specified, returns only the finding with this ID.</div>
165 <div>Takes precedence over <code>title</code> if both are provided.</div>
166 <div>The time is automatically extracted from the ref_id (format uuid@@notable@@time{timestamp}).</div>
167 <div>When querying by ref_id, the <code>earliest</code> and <code>latest</code> parameters are ignored.</div>
168 </td>
169 </tr>
170 <tr>
171 <td colspan="1">
172 <div class="ansibleOptionAnchor" id="parameter-"></div>
173 <b>title</b>
174 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
175 <div style="font-size: small">
176 <span style="color: purple">string</span>
177 </div>
178 </td>
179 <td>
180 </td>
181 <td>
182 <div>Title name to filter findings.</div>
183 <div>Returns all findings with an exact title match.</div>
184 <div>Ignored if <code>ref_id</code> is provided.</div>
185 <div>The <code>earliest</code> and <code>latest</code> time filters still apply when querying by title.</div>
186 </td>
187 </tr>
188 </table>
189 <br/>
190
191
192
193
194 Examples
195 --------
196
197 .. code-block:: yaml
198
199 - name: Query specific finding by ref_id (time extracted automatically from ref_id)
200 splunk.es.splunk_finding_info:
201 ref_id: "abc-123-def-456@@notable@@time1234567890"
202 register: result
203
204 - name: Display the finding info
205 debug:
206 var: result.findings
207
208 - name: Query findings by title (from last 24 hours by default)
209 splunk.es.splunk_finding_info:
210 title: "Suspicious Login Activity"
211 register: result
212
213 - name: Query findings by title from the last 7 days
214 splunk.es.splunk_finding_info:
215 title: "Suspicious Login Activity"
216 earliest: "-7d"
217 register: result
218
219 - name: Display findings with matching title
220 debug:
221 var: result.findings
222
223 - name: Query all findings (from last 24 hours by default)
224 splunk.es.splunk_finding_info:
225 register: all_findings
226
227 - name: Display all findings
228 debug:
229 var: all_findings.findings
230
231 - name: Query all findings from the last 7 days
232 splunk.es.splunk_finding_info:
233 earliest: "-7d"
234 latest: "now"
235 register: all_findings
236
237 - name: Query all findings from the last 30 days
238 splunk.es.splunk_finding_info:
239 earliest: "-30d"
240 register: all_findings
241
242 - name: Query findings with a limit on results
243 splunk.es.splunk_finding_info:
244 earliest: "-7d"
245 limit: 100
246 register: limited_findings
247
248 - name: Query findings from a specific time range (ISO 8601)
249 splunk.es.splunk_finding_info:
250 earliest: "2026-01-01T00:00:00"
251 latest: "2026-01-07T23:59:59"
252 register: all_findings
253
254 - name: Filter findings by status using Jinja2
255 splunk.es.splunk_finding_info:
256 earliest: "-7d"
257 register: all_findings
258
259 # Query findings with custom API path (for non-standard environments)
260 - name: Query findings with custom API path
261 splunk.es.splunk_finding_info:
262 earliest: "-7d"
263 api_namespace: "{{ es_namespace | default('servicesNS') }}"
264 api_user: "{{ es_user | default('nobody') }}"
265 api_app: "{{ es_app | default('SplunkEnterpriseSecuritySuite') }}"
266 register: custom_findings
267
268
269
270 Return Values
271 -------------
272 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:
273
274 .. raw:: html
275
276 <table border=0 cellpadding=0 class="documentation-table">
277 <tr>
278 <th colspan="2">Key</th>
279 <th>Returned</th>
280 <th width="100%">Description</th>
281 </tr>
282 <tr>
283 <td colspan="2">
284 <div class="ansibleOptionAnchor" id="return-"></div>
285 <b>findings</b>
286 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
287 <div style="font-size: small">
288 <span style="color: purple">list</span>
289 / <span style="color: purple">elements=dictionary</span>
290 </div>
291 </td>
292 <td>always</td>
293 <td>
294 <div>List of findings matching the query</div>
295 <br/>
296 <div style="font-size: smaller"><b>Sample:</b></div>
297 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[{&#x27;ref_id&#x27;: &#x27;abc-123-def-456&#x27;, &#x27;title&#x27;: &#x27;Suspicious Login Activity&#x27;, &#x27;description&#x27;: &#x27;Multiple failed login attempts detected&#x27;, &#x27;security_domain&#x27;: &#x27;access&#x27;, &#x27;entity&#x27;: &#x27;testuser&#x27;, &#x27;entity_type&#x27;: &#x27;user&#x27;, &#x27;finding_score&#x27;: 50, &#x27;owner&#x27;: &#x27;admin&#x27;, &#x27;status&#x27;: &#x27;new&#x27;, &#x27;urgency&#x27;: &#x27;high&#x27;, &#x27;disposition&#x27;: &#x27;undetermined&#x27;}]</div>
298 </td>
299 </tr>
300 <tr>
301 <td class="elbow-placeholder">&nbsp;</td>
302 <td colspan="1">
303 <div class="ansibleOptionAnchor" id="return-"></div>
304 <b>description</b>
305 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
306 <div style="font-size: small">
307 <span style="color: purple">string</span>
308 </div>
309 </td>
310 <td></td>
311 <td>
312 <div>Description of the finding</div>
313 <br/>
314 </td>
315 </tr>
316 <tr>
317 <td class="elbow-placeholder">&nbsp;</td>
318 <td colspan="1">
319 <div class="ansibleOptionAnchor" id="return-"></div>
320 <b>disposition</b>
321 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
322 <div style="font-size: small">
323 <span style="color: purple">string</span>
324 </div>
325 </td>
326 <td></td>
327 <td>
328 <div>Disposition of the finding</div>
329 <br/>
330 </td>
331 </tr>
332 <tr>
333 <td class="elbow-placeholder">&nbsp;</td>
334 <td colspan="1">
335 <div class="ansibleOptionAnchor" id="return-"></div>
336 <b>entity</b>
337 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
338 <div style="font-size: small">
339 <span style="color: purple">string</span>
340 </div>
341 </td>
342 <td></td>
343 <td>
344 <div>The risk object (entity) associated with the finding</div>
345 <br/>
346 </td>
347 </tr>
348 <tr>
349 <td class="elbow-placeholder">&nbsp;</td>
350 <td colspan="1">
351 <div class="ansibleOptionAnchor" id="return-"></div>
352 <b>entity_type</b>
353 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
354 <div style="font-size: small">
355 <span style="color: purple">string</span>
356 </div>
357 </td>
358 <td></td>
359 <td>
360 <div>Type of the risk object (user or system)</div>
361 <br/>
362 </td>
363 </tr>
364 <tr>
365 <td class="elbow-placeholder">&nbsp;</td>
366 <td colspan="1">
367 <div class="ansibleOptionAnchor" id="return-"></div>
368 <b>finding_score</b>
369 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
370 <div style="font-size: small">
371 <span style="color: purple">integer</span>
372 </div>
373 </td>
374 <td></td>
375 <td>
376 <div>Risk score of the finding</div>
377 <br/>
378 </td>
379 </tr>
380 <tr>
381 <td class="elbow-placeholder">&nbsp;</td>
382 <td colspan="1">
383 <div class="ansibleOptionAnchor" id="return-"></div>
384 <b>owner</b>
385 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
386 <div style="font-size: small">
387 <span style="color: purple">string</span>
388 </div>
389 </td>
390 <td></td>
391 <td>
392 <div>Owner of the finding</div>
393 <br/>
394 </td>
395 </tr>
396 <tr>
397 <td class="elbow-placeholder">&nbsp;</td>
398 <td colspan="1">
399 <div class="ansibleOptionAnchor" id="return-"></div>
400 <b>ref_id</b>
401 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
402 <div style="font-size: small">
403 <span style="color: purple">string</span>
404 </div>
405 </td>
406 <td></td>
407 <td>
408 <div>The unique reference ID of the finding</div>
409 <br/>
410 </td>
411 </tr>
412 <tr>
413 <td class="elbow-placeholder">&nbsp;</td>
414 <td colspan="1">
415 <div class="ansibleOptionAnchor" id="return-"></div>
416 <b>security_domain</b>
417 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
418 <div style="font-size: small">
419 <span style="color: purple">string</span>
420 </div>
421 </td>
422 <td></td>
423 <td>
424 <div>Security domain of the finding</div>
425 <br/>
426 </td>
427 </tr>
428 <tr>
429 <td class="elbow-placeholder">&nbsp;</td>
430 <td colspan="1">
431 <div class="ansibleOptionAnchor" id="return-"></div>
432 <b>status</b>
433 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
434 <div style="font-size: small">
435 <span style="color: purple">string</span>
436 </div>
437 </td>
438 <td></td>
439 <td>
440 <div>Status of the finding</div>
441 <br/>
442 </td>
443 </tr>
444 <tr>
445 <td class="elbow-placeholder">&nbsp;</td>
446 <td colspan="1">
447 <div class="ansibleOptionAnchor" id="return-"></div>
448 <b>title</b>
449 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
450 <div style="font-size: small">
451 <span style="color: purple">string</span>
452 </div>
453 </td>
454 <td></td>
455 <td>
456 <div>Title of the finding</div>
457 <br/>
458 </td>
459 </tr>
460 <tr>
461 <td class="elbow-placeholder">&nbsp;</td>
462 <td colspan="1">
463 <div class="ansibleOptionAnchor" id="return-"></div>
464 <b>urgency</b>
465 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
466 <div style="font-size: small">
467 <span style="color: purple">string</span>
468 </div>
469 </td>
470 <td></td>
471 <td>
472 <div>Urgency level of the finding</div>
473 <br/>
474 </td>
475 </tr>
476
477 </table>
478 <br/><br/>
479
480
481 Status
482 ------
483
484
485 Authors
486 ~~~~~~~
487
488 - Ron Gershburg (@rgershbu)