fix integrations with failing parsing hbs templates#16230
fix integrations with failing parsing hbs templates#16230teresaromero merged 15 commits intoelastic:mainfrom
Conversation
🚀 Benchmarks reportTo see the full report comment with |
| processors: | ||
| {{processors}} | ||
| {{/if}} | ||
| {{/if}} |
There was a problem hiding this comment.
Should this closing "if" be moved between line 41 and 42 (after setting all tags)?
--- packages/netskope/data_stream/alerts_events_v2/agent/stream/gcs.yml.hbs
+++ packages/netskope/data_stream/alerts_events_v2/agent/stream/gcs.yml.hbs
@@ -39,6 +39,7 @@ tags:
{{#each tags as |tag|}}
- {{tag}}
{{/each}}
+{{/if}}
{{#contains "forwarded" tags}}
publisher_pipeline.disable_host: true
{{/contains}}
@@ -46,4 +47,3 @@ publisher_pipeline.disable_host: true
processors:
{{processors}}
{{/if}}
-{{/if}}There was a problem hiding this comment.
Or should it be after checking the forwarded tag ?
--- packages/netskope/data_stream/alerts_events_v2/agent/stream/gcs.yml.hbs
+++ packages/netskope/data_stream/alerts_events_v2/agent/stream/gcs.yml.hbs
@@ -42,8 +42,8 @@ tags:
{{#contains "forwarded" tags}}
publisher_pipeline.disable_host: true
{{/contains}}
+{{/if}}
{{#if processors}}
processors:
{{processors}}
{{/if}}
-{{/if}}There was a problem hiding this comment.
yes, you are right, i've changed into before forwarded, as this condition is based on tags but does not modify the tag list, it adds a bool variable to the policy.
I've checked this changed adding two policy test to the package 🧪
|
Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform) |
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
|
@elastic/sec-linux-platform hi! could you take a look to this change? thanks! |
💚 Build Succeeded
History
|
|
Package auditd_manager - 1.19.1 containing this change is available at https://epr.elastic.co/package/auditd_manager/1.19.1/ |
|
Package netskope - 3.1.2 containing this change is available at https://epr.elastic.co/package/netskope/3.1.2/ |
Proposed commit message
netskope and auditd_manager fixed on hbs syntaxChecklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
This PR fixes errors on the integrations that do not have valid handlebars format. This is a new validation rule that would be available at package-spec. Integrations affected are:
netskopeerror when using gcsnetskopeCollect logs from Netskope using Log Streaming via GCSso the data stream with the fault is usedWith this change this error does not appear.
auditd_managerdefault audit rules formatThe use of multiline string inside the helper is not compliant with handlebars. The file has been changed so the default values are a single line. The helper still formats the variable input from the user.
Related issues
Related elastic/package-spec#1030