fix(crowdstrike): say what an empty alert search matched (1.6.1)
search_detections and search_ngsiem_detections now return a query block (FQL sent, Falcon's total, errors) next to resources, so an empty run can be told apart from a wrong region or an API client that sees no alerts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
id: crowdstrike
|
id: crowdstrike
|
||||||
name: CrowdStrike Falcon
|
name: CrowdStrike Falcon
|
||||||
version: 1.6.0
|
version: 1.6.1
|
||||||
description: "CrowdStrike Falcon (OAuth2 API) — full IR coverage: device/IOC/process enrichment, detections & cases, host groups, Real Time Response, ML/IOA exclusions, quarantine, Spotlight/CVE, ODS scans, CSPM, users, IOA rules, CNAPP, and Fusion workflows."
|
description: "CrowdStrike Falcon (OAuth2 API) — full IR coverage: device/IOC/process enrichment, detections & cases, host groups, Real Time Response, ML/IOA exclusions, quarantine, Spotlight/CVE, ODS scans, CSPM, users, IOA rules, CNAPP, and Fusion workflows."
|
||||||
changelog: "1.6.0 — New search_ngsiem_detections command for Next-Gen SIEM detections. Falcon files the detections of NG-SIEM correlation rules in the same unified Alerts API as the EDR, under product 'ngsiem', so search_detections' default epp/ldt scope never returned them, and its mapper reads device, process and file blocks an NG-SIEM detection does not carry. The new command always keeps the product:'ngsiem' clause and ANDs any filter to it, takes the same created_from watermark, and ships its own mapper and a CrowdStrike NG-SIEM Detection incident type. The mapper is a first cut on the fields every unified alert carries (identity, name, description, severity, status, timestamps, MITRE); hosts, users and the source log will follow from a real payload. | 1.5.0 — resolve_detection sets the verdict. Falcon has no verdict field on an alert: the console's Resolution column is read from the tags true_positive, false_positive and ignored, and the status only takes new, in_progress, reopened and closed — so no value of the old status box could record a verdict. The new verdict input adds the tag, after removing the other two so an alert never carries two resolutions, and status and verdict are now drop-downs. 1.4.0 — New device_count command: counts devices matching filters without listing them. The device query already answers with meta.pagination.total — the number of matches, independent of the page asked for — so device_count asks for a one-ID page and reads it, where search-device resolves every matching device in full through /devices/entities/devices/v2 to reach the same figure, and only filters on four properties. Filters cover sixteen device FQL properties (hostname, device id, local and external IP, platform, OS version, role, containment status, sensor version, AD domain/OU/site, serial, tags, host groups, RFM), add first_seen/last_seen bounds, and leave a raw FQL `filter` escape hatch for the rest. Several values on one property become an OR group, parenthesised so it binds before the AND that joins it to the others — the reference client omits those parentheses and leaves the precedence to the server. Values are quoted with the single quote escaped, so a hostname carrying an apostrophe cannot end the literal early and change what the query counts. The estate `total` comes back next to `count` so the figure reads as a proportion, and a filter too broad to mean anything shows as matching everything rather than passing for an answer. | 1.3.0 — search_detections takes a created_from timestamp, folded into the FQL as created_timestamp, and declares it as the ingestion watermark input. An alert rule can now fetch incrementally instead of re-reading the whole window every run: this API expresses its time bound inside the FQL, so the watermark used to have nowhere to go but the filter input, where it replaced the query rather than narrowing it. filter now carries the scoping only. 1.2.4 — Fixed two silent defects in the search_detections OCSF mapper: severity was a ternary that resolved to nothing, so every alert kept the alert rule's default severity instead of Falcon's — it is now a plain path to severity_name, whose words the engine reads natively; and no entry fed the OCSF `time` field, so detected_at was never stamped and MTTD measured the collection delay as zero. 1.2.3 — Documentation wording cleanup. 1.2.2 — Corrected the search_detections OCSF mapper against the Falcon Raptor alert schema: domain is device.hostinfo.domain, dropped non-existent fields, added scenario/alleged_filetype/cid. 1.2.1 — Marked search_detections as an ingestion source (ingest hints: results_path=resources, dedup_key=composite_id) so the alert-rule editor pre-fills it. 1.2.0 — Added a pre-built OCSF mapper for search_detections (Falcon unified alerts → OCSF: device, finding, MITRE, actor/parent process, file and IOC). 1.1.1 — Added test_connection for the instance Test button. 1.1.0 — Expanded to 81 commands (host groups, cases, RTR files/scripts/responders, ML/IOA exclusions, quarantine, Spotlight host-by-vuln/CVE, ODS scans, CSPM, users, IOA rules, CNAPP, identity/mobile detection resolve, and workflows). 1.0.0 — Initial release: device/detection enrichment, Spotlight, IOC management, contain/lift, and core RTR."
|
changelog: "1.6.1 — search_detections and search_ngsiem_detections return a query block next to resources: the FQL actually sent, the total Falcon counts for it and any errors the query carried. A search that matched nothing used to come back as a bare empty list, which could not be told apart from a wrong region, a filter Falcon read differently or an API client that sees no alerts. | 1.6.0 — New search_ngsiem_detections command for Next-Gen SIEM detections. Falcon files the detections of NG-SIEM correlation rules in the same unified Alerts API as the EDR, under product 'ngsiem', so search_detections' default epp/ldt scope never returned them, and its mapper reads device, process and file blocks an NG-SIEM detection does not carry. The new command always keeps the product:'ngsiem' clause and ANDs any filter to it, takes the same created_from watermark, and ships its own mapper and a CrowdStrike NG-SIEM Detection incident type. The mapper is a first cut on the fields every unified alert carries (identity, name, description, severity, status, timestamps, MITRE); hosts, users and the source log will follow from a real payload. | 1.5.0 — resolve_detection sets the verdict. Falcon has no verdict field on an alert: the console's Resolution column is read from the tags true_positive, false_positive and ignored, and the status only takes new, in_progress, reopened and closed — so no value of the old status box could record a verdict. The new verdict input adds the tag, after removing the other two so an alert never carries two resolutions, and status and verdict are now drop-downs. 1.4.0 — New device_count command: counts devices matching filters without listing them. The device query already answers with meta.pagination.total — the number of matches, independent of the page asked for — so device_count asks for a one-ID page and reads it, where search-device resolves every matching device in full through /devices/entities/devices/v2 to reach the same figure, and only filters on four properties. Filters cover sixteen device FQL properties (hostname, device id, local and external IP, platform, OS version, role, containment status, sensor version, AD domain/OU/site, serial, tags, host groups, RFM), add first_seen/last_seen bounds, and leave a raw FQL `filter` escape hatch for the rest. Several values on one property become an OR group, parenthesised so it binds before the AND that joins it to the others — the reference client omits those parentheses and leaves the precedence to the server. Values are quoted with the single quote escaped, so a hostname carrying an apostrophe cannot end the literal early and change what the query counts. The estate `total` comes back next to `count` so the figure reads as a proportion, and a filter too broad to mean anything shows as matching everything rather than passing for an answer. | 1.3.0 — search_detections takes a created_from timestamp, folded into the FQL as created_timestamp, and declares it as the ingestion watermark input. An alert rule can now fetch incrementally instead of re-reading the whole window every run: this API expresses its time bound inside the FQL, so the watermark used to have nowhere to go but the filter input, where it replaced the query rather than narrowing it. filter now carries the scoping only. 1.2.4 — Fixed two silent defects in the search_detections OCSF mapper: severity was a ternary that resolved to nothing, so every alert kept the alert rule's default severity instead of Falcon's — it is now a plain path to severity_name, whose words the engine reads natively; and no entry fed the OCSF `time` field, so detected_at was never stamped and MTTD measured the collection delay as zero. 1.2.3 — Documentation wording cleanup. 1.2.2 — Corrected the search_detections OCSF mapper against the Falcon Raptor alert schema: domain is device.hostinfo.domain, dropped non-existent fields, added scenario/alleged_filetype/cid. 1.2.1 — Marked search_detections as an ingestion source (ingest hints: results_path=resources, dedup_key=composite_id) so the alert-rule editor pre-fills it. 1.2.0 — Added a pre-built OCSF mapper for search_detections (Falcon unified alerts → OCSF: device, finding, MITRE, actor/parent process, file and IOC). 1.1.1 — Added test_connection for the instance Test button. 1.1.0 — Expanded to 81 commands (host groups, cases, RTR files/scripts/responders, ML/IOA exclusions, quarantine, Spotlight host-by-vuln/CVE, ODS scans, CSPM, users, IOA rules, CNAPP, identity/mobile detection resolve, and workflows). 1.0.0 — Initial release: device/detection enrichment, Spotlight, IOC management, contain/lift, and core RTR."
|
||||||
category: endpoint
|
category: endpoint
|
||||||
|
|
||||||
# Per-instance configuration. Scripts obtain an OAuth2 bearer token from
|
# Per-instance configuration. Scripts obtain an OAuth2 bearer token from
|
||||||
|
|||||||
@@ -51,6 +51,14 @@ def main():
|
|||||||
result = call("POST", "/alerts/entities/alerts/v2", tok, body={"composite_ids": ids})
|
result = call("POST", "/alerts/entities/alerts/v2", tok, body={"composite_ids": ids})
|
||||||
else:
|
else:
|
||||||
result = {"resources": []}
|
result = {"resources": []}
|
||||||
|
# An empty page says nothing on its own: keep what the query answered — the
|
||||||
|
# FQL actually sent, Falcon's total for it and any errors — so a run with no
|
||||||
|
# alerts reads as "matched nothing" rather than as a silent failure.
|
||||||
|
result["query"] = {
|
||||||
|
"filter": fql,
|
||||||
|
"total": ((found.get("meta") or {}).get("pagination") or {}).get("total"),
|
||||||
|
"errors": found.get("errors") or [],
|
||||||
|
}
|
||||||
print(json.dumps(result))
|
print(json.dumps(result))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,14 @@ def main():
|
|||||||
result = call("POST", "/alerts/entities/alerts/v2", tok, body={"composite_ids": ids})
|
result = call("POST", "/alerts/entities/alerts/v2", tok, body={"composite_ids": ids})
|
||||||
else:
|
else:
|
||||||
result = {"resources": []}
|
result = {"resources": []}
|
||||||
|
# An empty page says nothing on its own: keep what the query answered — the
|
||||||
|
# FQL actually sent, Falcon's total for it and any errors — so a run with no
|
||||||
|
# alerts reads as "matched nothing" rather than as a silent failure.
|
||||||
|
result["query"] = {
|
||||||
|
"filter": fql,
|
||||||
|
"total": ((found.get("meta") or {}).get("pagination") or {}).get("total"),
|
||||||
|
"errors": found.get("errors") or [],
|
||||||
|
}
|
||||||
print(json.dumps(result))
|
print(json.dumps(result))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user