Skip to content

Conversation

@navnit-elastic
Copy link
Contributor

@navnit-elastic navnit-elastic commented Sep 22, 2025

Proposed commit message

Prevent updating fleet health status to degraded for following packages
when HTTPJSON template value evaluation is empty.

  • 1password
  • google_scc
  • m365_defender
  • rapid7_insightvm

This change bumps minimum Kibana version to 8.19.4 and 9.1.4 and
adds do_not_log_filure: true in set processors to avoid updating
fleet health status to degraded.
This change also fixes the 1password package's system tests.

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

@navnit-elastic navnit-elastic self-assigned this Sep 22, 2025
@navnit-elastic navnit-elastic added enhancement New feature or request Integration:1password 1Password (Partner supported) Integration:m365_defender Microsoft Defender XDR Integration:google_scc Google Security Command Center Integration:rapid7_insightvm Rapid7 InsightVM Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Sep 22, 2025
@elastic-vault-github-plugin-prod
Copy link

elastic-vault-github-plugin-prod bot commented Sep 22, 2025

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@navnit-elastic navnit-elastic requested a review from efd6 September 22, 2025 08:03
@navnit-elastic navnit-elastic marked this pull request as ready for review September 22, 2025 08:03
@navnit-elastic navnit-elastic requested a review from a team as a code owner September 22, 2025 08:03
@elasticmachine
Copy link

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

- set:
target: body.cursor
value: '[[if not (eq (len .cursor) 0)]][[.cursor.last_cursor]][[end]]'
value: >-
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@efd6, If the terminate helper evaluates to an empty value, then we don't need to use terminate here, right? Also, I'm not sure about using "do_not_log_failure: true" without "fail_on_template_error: true". Does this scenario prevent changing health status to degraded?

Copy link
Contributor

@efd6 efd6 Sep 22, 2025

Choose a reason for hiding this comment

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

If the terminate helper evaluates to an empty value, then we don't need to use terminate here, right?

That's correct. Note that terminate is an error-free termination of the template expansion, not a termination of the surrounding environment. Using terminate to stop pagination is incorrect.

Also, I'm not sure about using "do_not_log_failure: true" without "fail_on_template_error: true". Does this scenario prevent changing health status to degraded?

It should.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@efd6, Thank you for your answer.

@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Sep 22, 2025
Comment on lines 31 to 35
[[if not (eq (len .cursor) 0)]]
[[.cursor.last_cursor]]
[[else]]
[[terminate "cursor is empty"]]
[[end]]
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need to do this, just fail_on_template_error: true with the do_not_log_failure: true.

(comment applies throughout)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in c9ccf9d. Not enabling fail_on_template_error because the error is expected here.

Copy link
Contributor

@kcreddy kcreddy Sep 24, 2025

Choose a reason for hiding this comment

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

@efd6 @navnit-elastic , just FYI we have an open SDH on this.

value_type: int
value: '[[if eq (len .cursor) 0]]{{limit}}[[end]]'
value: >-
[[if eq (len .cursor) 0]]{{limit}}[[else]][[terminate "cursor is not empty"]][[end]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

Conflicts:
	packages/google_scc/changelog.yml
	packages/m365_defender/changelog.yml
	packages/rapid7_insightvm/changelog.yml
Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

I've checked locally that this resolves the issue in 1password on 9.1.4 and that the current tip fails on that version of the stack.

I would like the change to be simplified though

diff --git a/packages/1password/data_stream/audit_events/agent/stream/httpjson.yml.hbs b/packages/1password/data_stream/audit_events/agent/stream/httpjson.yml.hbs
index 621af5d15d..1a6101567f 100644
--- a/packages/1password/data_stream/audit_events/agent/stream/httpjson.yml.hbs
+++ b/packages/1password/data_stream/audit_events/agent/stream/httpjson.yml.hbs
@@ -45,7 +45,7 @@ response.split:
 response.pagination:
   - set:
       target: body.cursor
-      value: '[[if eq .last_response.body.has_more true]][[.last_response.body.cursor]][[else]][[/*This is an empty value to stop pagination.*/]][[end]]'
+      value: '[[if eq .last_response.body.has_more true]][[.last_response.body.cursor]][[end]]'
       fail_on_template_error: true
       do_not_log_failure: true
   - delete:
diff --git a/packages/1password/data_stream/item_usages/agent/stream/httpjson.yml.hbs b/packages/1password/data_stream/item_usages/agent/stream/httpjson.yml.hbs
index 36b285bf19..06cb4c0889 100644
--- a/packages/1password/data_stream/item_usages/agent/stream/httpjson.yml.hbs
+++ b/packages/1password/data_stream/item_usages/agent/stream/httpjson.yml.hbs
@@ -46,7 +46,7 @@ response.split:
 response.pagination:
   - set:
       target: body.cursor
-      value: '[[if eq .last_response.body.has_more true]][[.last_response.body.cursor]][[else]][[/*This is an empty value to stop pagination.*/]][[end]]'
+      value: '[[if eq .last_response.body.has_more true]][[.last_response.body.cursor]][[end]]'
       fail_on_template_error: true
       do_not_log_failure: true
   - delete:
diff --git a/packages/1password/data_stream/signin_attempts/agent/stream/httpjson.yml.hbs b/packages/1password/data_stream/signin_attempts/agent/stream/httpjson.yml.hbs
index d12967a150..c5cd14d84d 100644
--- a/packages/1password/data_stream/signin_attempts/agent/stream/httpjson.yml.hbs
+++ b/packages/1password/data_stream/signin_attempts/agent/stream/httpjson.yml.hbs
@@ -46,7 +46,7 @@ response.split:
 response.pagination:
   - set:
       target: body.cursor
-      value: '[[if eq .last_response.body.has_more true]][[.last_response.body.cursor]][[else]][[/*This is an empty value to stop pagination.*/]][[end]]'
+      value: '[[if eq .last_response.body.has_more true]][[.last_response.body.cursor]][[end]]'
       fail_on_template_error: true
       do_not_log_failure: true
   - delete:

The else branch is not needed since in the absence of a true condition we already resolve to the empty string, and the use of the fail_on_template_error option indicates the rationale for the condition.

Similar changes should be applied to the other packages here.

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @navnit-elastic

@elastic-sonarqube
Copy link

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

Thanks

@efd6 efd6 merged commit e46f81d into elastic:main Sep 25, 2025
9 checks passed
@elastic-vault-github-plugin-prod

Package 1password - 1.34.0 containing this change is available at https://epr.elastic.co/package/1password/1.34.0/

@elastic-vault-github-plugin-prod

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

@elastic-vault-github-plugin-prod

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

@elastic-vault-github-plugin-prod

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

tehbooom pushed a commit to tehbooom/integrations that referenced this pull request Nov 19, 2025
…5415)

Prevent updating fleet health status to degraded for following packages
when HTTPJSON template value evaluation is empty:
* 1password
* google_scc
* m365_defender
* rapid7_insightvm

This change bumps minimum Kibana version to 8.19.4 and 9.1.4 and
adds do_not_log_filure: true in set processors to avoid updating
fleet health status to degraded.

This change also fixes the 1password package's system tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:google_scc Google Security Command Center Integration:m365_defender Microsoft Defender XDR Integration:rapid7_insightvm Rapid7 InsightVM Integration:1password 1Password (Partner supported) Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants