Skip to content

sentinel_one: expose max_executions and persist worklist in cursor - #18976

Merged
efd6 merged 1 commit into
elastic:mainfrom
efd6:18974-sentinel_one
May 13, 2026
Merged

sentinel_one: expose max_executions and persist worklist in cursor#18976
efd6 merged 1 commit into
elastic:mainfrom
efd6:18974-sentinel_one

Conversation

@efd6

@efd6 efd6 commented May 12, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

sentinel_one: expose max_executions and persist worklist in cursor

Expose max_executions as a configurable variable for the application
data stream so operators can raise the execution budget for large
estates where the two-level worklist traversal (inventory pages x
endpoint pages) exceeds the default of 1000.

Move the worklist, pagination tokens, and fetch_more flag into the
cursor instead of the state root. The CEL input persists the cursor
after each successful event publish, so an interrupted traversal
resumes where it left off on the next interval rather than starting
over from scratch.

Closes #18974

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 self-assigned this May 12, 2026
@efd6 efd6 added enhancement New feature or request Integration:sentinel_one SentinelOne Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels May 12, 2026
Expose max_executions as a configurable variable for the application
data stream so operators can raise the execution budget for large
estates where the two-level worklist traversal (inventory pages x
endpoint pages) exceeds the default of 1000.

Move the worklist, pagination tokens, and fetch_more flag into the
cursor instead of the state root. The CEL input persists the cursor
after each successful event publish, so an interrupted traversal
resumes where it left off on the next interval rather than starting
over from scratch.

Closes elastic#18974
@efd6
efd6 force-pushed the 18974-sentinel_one branch from 0659b06 to f9a53f3 Compare May 12, 2026 22:41
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

Package sentinel_one 👍(11) 💚(5) 💔(2)

Expand to view
Data stream Previous EPS New EPS Diff (%) Result
threat_event 9560.23 6289.31 -3270.92 (-34.21%) 💔
application_risk 12886.6 10604.45 -2282.15 (-17.71%) 💔

To see the full report comment with /test benchmark fullreport

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

cc @efd6

@efd6
efd6 marked this pull request as ready for review May 12, 2026 23:34
@efd6
efd6 requested a review from a team as a code owner May 12, 2026 23:34
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@andrewkroh andrewkroh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Checking our OTel tracing telemetry (labels.cel_periodic_max_execution_limited:true and labels.package_name:sentinel_one) I can see there are a few agents their max_execution limits.

@efd6
efd6 merged commit 9a6237b into elastic:main May 13, 2026
8 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package sentinel_one - 2.7.0 containing this change is available at https://epr.elastic.co/package/sentinel_one/2.7.0/

herrBez pushed a commit to herrBez/integrations that referenced this pull request Jun 1, 2026
…lastic#18976)

Expose max_executions as a configurable variable for the application
data stream so operators can raise the execution budget for large
estates where the two-level worklist traversal (inventory pages x
endpoint pages) exceeds the default of 1000.

Move the worklist, pagination tokens, and fetch_more flag into the
cursor instead of the state root. The CEL input persists the cursor
after each successful event publish, so an interrupted traversal
resumes where it left off on the next interval rather than starting
over from scratch.

Closes elastic#18974
efd6 added a commit to efd6/integrations that referenced this pull request Jul 7, 2026
…d application_risk data streams

The threat_event CEL program stores its two-level worklist
(threats list, page cursors, fetch_more flag) in plain state
keys that are discarded on agent restart. This causes the
program to re-walk the entire SentinelOne threats catalog from
scratch, producing ~390x event duplication on a customer system
running for 29 days after an upgrade restart.

Move worklist state under state.cursor.* so the CEL input
persists it to the registry. Also expose max_executions in the
threat_event manifest so large estates can raise the execution
budget beyond the default 1000.

Apply the same cursor persistence fix to application_risk,
which stores its pagination cursor in state.next.page instead
of state.cursor.*.

This mirrors the fix applied to the application data stream in
v2.7.0 (PR elastic#18976).
efd6 added a commit to efd6/integrations that referenced this pull request Jul 7, 2026
…d application_risk data streams

The threat_event CEL program stores its two-level worklist
(threats list, page cursors, fetch_more flag) in plain state
keys that are discarded on agent restart. This causes the
program to re-walk the entire SentinelOne threats catalog from
scratch, producing ~390x event duplication on a customer system
running for 29 days after an upgrade restart.

Move worklist state under state.cursor.* so the CEL input
persists it to the registry. Also expose max_executions in the
threat_event manifest so large estates can raise the execution
budget beyond the default 1000.

Apply the same cursor persistence fix to application_risk,
which stores its pagination cursor in state.next.page instead
of state.cursor.*.

This mirrors the fix applied to the application data stream in
v2.7.0 (PR elastic#18976).
efd6 added a commit to efd6/integrations that referenced this pull request Jul 7, 2026
…d application_risk data streams

The threat_event CEL program stores its two-level worklist
(threats list, page cursors, fetch_more flag) in plain state
keys that are discarded on agent restart. This causes the
program to re-walk the entire SentinelOne threats catalog from
scratch, producing ~390x event duplication on a customer system
running for 29 days after an upgrade restart.

Move worklist state under state.cursor.* so the CEL input
persists it to the registry. Also expose max_executions in the
threat_event manifest so large estates can raise the execution
budget beyond the default 1000.

Apply the same cursor persistence fix to application_risk,
which stores its pagination cursor in state.next.page instead
of state.cursor.*.

This mirrors the fix applied to the application data stream in
v2.7.0 (PR elastic#18976).
efd6 added a commit that referenced this pull request Jul 8, 2026
…d application_risk data streams (#20022)

The threat_event CEL program stores its two-level worklist
(threats list, page cursors, fetch_more flag) in plain state
keys that are discarded on agent restart. This causes the
program to re-walk the entire SentinelOne threats catalog from
scratch.

Move worklist state under state.cursor.* so the CEL input
persists it to the registry. Also expose max_executions in the
threat_event manifest so large estates can raise the execution
budget beyond the default 1000.

Apply the same cursor persistence fix to application_risk,
which stores its pagination cursor in state.next.page instead
of state.cursor.*.

This mirrors the fix applied to the application data stream in
v2.7.0 (PR #18976).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:sentinel_one SentinelOne Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

3 participants