Skip to content

Vaikora-SentinelOne v3.0.1 — omit empty agent_id query param - #14364

Merged
v-atulyadav merged 2 commits into
Azure:masterfrom
Data443:feature/vaikora-sentinelone-v3.0.1-agent-id-fix
Jun 18, 2026
Merged

Vaikora-SentinelOne v3.0.1 — omit empty agent_id query param#14364
v-atulyadav merged 2 commits into
Azure:masterfrom
Data443:feature/vaikora-sentinelone-v3.0.1-agent-id-fix

Conversation

@mazamizo21

Copy link
Copy Markdown
Contributor

Summary

The 3.0.0 playbook's `Get_Vaikora_Actions` HTTP action builds the URI by always concatenating `agent_id=` into the query string. When the operator leaves `VaikoraAgentId` blank (the documented "monitor all agents" mode), the request becomes:

```
GET https://api.vaikora.com/api/v1/actions?agent_id=&per_page=100
```

The Vaikora API's Pydantic validator rejects the empty string with HTTP 422:

```
{"type":"uuid_parsing","loc":["query","agent_id"],
"msg":"Input should be a valid UUID, invalid length: expected length 32 for simple format, found 0"}
```

Every downstream action skips with `ActionSkipped` and no IOCs are pushed to SentinelOne.

Fix

Wrap the `agent_id` segment with an `if(empty(...))` check so the param is omitted entirely when `VaikoraAgentId` is blank.

```
// before
@{concat(parameters('Vaikora_ApiBaseUrl'), '/actions?agent_id=', encodeUriComponent(parameters('VaikoraAgentId')), '&per_page=100')}

// after
@{concat(parameters('Vaikora_ApiBaseUrl'), '/actions?', if(empty(parameters('VaikoraAgentId')), '', concat('agent_id=', encodeUriComponent(parameters('VaikoraAgentId')), '&')), 'per_page=100')}
```

When an agent UUID is supplied the URL is unchanged: `...?agent_id=&per_page=100`. When empty: `...?per_page=100`.

Files changed

  • `Solutions/Vaikora-SentinelOne-ThreatIntelligence/Playbooks/VaikoraToSentinelOne_Playbook.json` — standalone playbook URI fix
  • `Solutions/Vaikora-SentinelOne-ThreatIntelligence/Package/mainTemplate.json` — inner contentTemplate URI mirrors the source; `_solutionVersion` bumped to 3.0.1
  • `Solutions/Vaikora-SentinelOne-ThreatIntelligence/Package/3.0.1.zip` — new package (3.0.0.zip kept per repo policy)
  • `Solutions/Vaikora-SentinelOne-ThreatIntelligence/ReleaseNotes.md` — v3.0.1 entry
  • `Solutions/Vaikora-SentinelOne-ThreatIntelligence/Data/Solution_VaikoraSentinelOne.json` — Version 3.0.1
  • `Solutions/Vaikora-SentinelOne-ThreatIntelligence/SolutionMetadata.json` — lastPublishDate 2026-05-28

Test plan

  • arm-ttk local: 49/49 pass on `Package/3.0.1.zip`
  • Redeployed standalone playbook against api.vaikora.com on a real Sentinel workspace. `Get_Vaikora_Actions` now returns 200 OK and the actual outbound URL is `https://api.vaikora.com/api/v1/actions?per_page=100\` (no `agent_id` segment).
  • CI `run-arm-ttk` green
  • Reviewer Content Hub install + standalone playbook test

cc v-maheshbh (@v-maheshbh) v-shukore

@mazamizo21
mazamizo21 requested review from a team as code owners May 28, 2026 16:18
@v-atulyadav v-atulyadav added the Solution Solution specialty review needed label May 29, 2026
@mazamizo21

Copy link
Copy Markdown
Contributor Author

The PlaybooksValidations failure on attempt #2 is a transient GitHub API rate-limit hit on the CI runner (unauthenticated Octokit, 60 req/hr cap), not a real validation issue. The job logs show:

Running in a forked repository. Creating unauthenticated Octokit client.
RequestError [HttpError]: API rate limit exceeded for 135.232.200.34.
status: 403, x-ratelimit-used: 60, x-ratelimit-remaining: 0

Cannot self-rerun (admin rights required for fork PRs). v-maheshbh (@v-maheshbh) v-shukore could you trigger a rerun once the rate-limit window has reset? Same pattern as the transient DataConnectorValidations failure on #13658.

…ntId is empty

Get_Vaikora_Actions built the URI by always concatenating 'agent_id=' to the query string. When VaikoraAgentId is empty (the documented use case for monitoring all agents), the request became /actions?agent_id=&per_page=100, which the Vaikora API rejects with HTTP 422 because Pydantic cannot parse '' as a UUID.

Fix wraps the agent_id segment with an if(empty(...)) check so it is omitted entirely when blank.

Verified end-to-end against api.vaikora.com on a real Sentinel workspace: Get_Vaikora_Actions now returns 200 OK and the rest of the playbook chain (Filter_High_Severity_Or_Anomaly, List_STAR_Rules, etc.) runs as designed.

arm-ttk local: 49/49 pass on Package/3.0.1.zip. 3.0.0.zip retained per repo policy.
@mazamizo21
mazamizo21 force-pushed the feature/vaikora-sentinelone-v3.0.1-agent-id-fix branch from a9a7c5f to 0033ea9 Compare May 29, 2026 12:35
@v-shukore

Copy link
Copy Markdown
Contributor

Hi mazamizo21, arm-ttk is failing for below line please check once. Thanks!
image

…fy arm-ttk URIs rule

Same fix as Vaikora-ASC: the agent_id-omit conditional used concat() inside the
HTTP poll uri, which arm-ttk 'URIs Should Be Properly Constructed' rejects
(concat/format disallowed in any uri/url property). Moved URL construction into
a Compose action and the poll now reads "uri": "@{outputs('Compose_Poll_Endpoint')}".
The action name avoids a uri/url suffix so arm-ttk's key match doesn't re-flag it.
Runtime behavior unchanged. Applied to package mainTemplate + standalone playbook;
repackaged 3.0.1.zip.
@mazamizo21

Copy link
Copy Markdown
Contributor Author

Hi v-shukore v-maheshbh (@v-maheshbh), pushed a proactive arm-ttk fix in commit 5c5682ac26.

While addressing the same issue on Vaikora-ASC (#14366), I found this PR has the identical latent problem: the agent_id-omit fix put a conditional concat() inside the HTTP poll uri, which upstream arm-ttk's URIs Should Be Properly Constructed rejects (concat/format aren't allowed in any uri/url property). The bundled Sentinel-CI arm-ttk subset doesn't run that rule, so CI was green, but it would fail a local arm-ttk run.

Fix: moved the URL construction into a Compose action; the poll now reads "uri": "@{outputs('Compose_Poll_Endpoint')}". Runtime behavior unchanged. Applied to package mainTemplate + standalone playbook, repackaged 3.0.1.zip. Verified locally: URIs Should Be Properly Constructed PASSES. Thanks!

@v-atulyadav
v-atulyadav merged commit 86d1bd5 into Azure:master Jun 18, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Solution Solution specialty review needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants