rapid7-insightidr 1.11.1: strip whitespace from comma-separated filter params
"HIGH, CRITICAL" as typed sent " CRITICAL" to the API, which rejects the whole call — a priority filter written naturally fetched nothing. Normalize statuses/priorities/sources/tags in list_investigations, get_investigations_full and search_investigation_alerts before the URL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L1fWBoEKvAw3k78XDkpRQo
This commit is contained in:
@@ -477,8 +477,10 @@ def run():
|
||||
inv_page = request("GET", "idr/v2/investigations", params={
|
||||
"index": inp.get("index") or "0",
|
||||
"size": inp.get("page_size") or limit,
|
||||
"statuses": inp.get("statuses"),
|
||||
"priorities": inp.get("priorities"),
|
||||
# ",".join(_list(...)): the API rejects the whole call when a list value
|
||||
# carries whitespace, so "HIGH, CRITICAL" as typed must lose its space.
|
||||
"statuses": ",".join(_list(inp.get("statuses"))) or None,
|
||||
"priorities": ",".join(_list(inp.get("priorities"))) or None,
|
||||
"start_time": start_time,
|
||||
"end_time": inp.get("end_time"),
|
||||
"sort_field": "Created time",
|
||||
|
||||
Reference in New Issue
Block a user