Skip to content

Commit be59434

Browse files
authored
ssi_all: use triple-brace templating (elastic#11284)
The mustache templating system used by ingest pipelines has two levels of escaping available, not escaped (triple stache) and HTML escaped (double stache) — see man mustache[1] under "tag types: variables". This can lead to data corruption, particularly in cases where an operating system has chosen to use a character requiring escaping in its path syntax. The cloudflare package is omitted from this set of changes due to ci difficulties with its system tests. [1]http://mustache.github.io/mustache.5.html [git-generate] for f in $( ( for p in $( yq 'select(.owner.github == "elastic/security-service-integrations")|.name' packages/**/manifest.yml \ | grep -v -- '---' ); do rg -l -g '*.yml' ": ('\{\{[^{][ .a-zA-Z0-9_]*[^}]}}'|\"\{\{[^{][ .a-zA-Z0-9_]*[^}]}}\")" packages/$p done )|grep -v "cloudflare"|grep "elasticsearch/ingest_pipeline"|sort|uniq ); do sed -i -r "s/: (['\"])\{\{([^{][ .a-zA-Z0-9_]*[^}])}}['\"]/: \1{{{\2}}}\1/g" $f done for p in $(git diff --name-only HEAD~1|cut -d/ -f1,2|sort|uniq); do ( cd $p elastic-package test pipeline -g elastic-package changelog add \ --description "Use triple-brace Mustache templating when referencing variables in ingest pipelines." \ --type bugfix \ --next patch \ --link elastic#11284 )>/dev/null 2>&1 done
1 parent 022bc30 commit be59434

File tree

222 files changed

+696
-435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+696
-435
lines changed

packages/1password/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.30.1"
3+
changes:
4+
- description: Use triple-brace Mustache templating when referencing variables in ingest pipelines.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/11284
27
- version: "1.30.0"
38
changes:
49
- description: "Allow @custom pipeline access to event.original without setting preserve_original_event."

packages/1password/data_stream/item_usages/elasticsearch/ingest_pipeline/default.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ processors:
4040
#########################
4141
- append:
4242
field: related.user
43-
value: "{{onepassword.user.uuid}}"
43+
value: "{{{onepassword.user.uuid}}}"
4444
allow_duplicates: false
4545
if: ctx?.onepassword?.user?.uuid != null
4646
- append:
4747
field: related.user
48-
value: "{{onepassword.user.email}}"
48+
value: "{{{onepassword.user.email}}}"
4949
allow_duplicates: false
5050
if: ctx?.onepassword?.user?.email != null
5151
- append:
5252
field: related.user
53-
value: "{{onepassword.user.name}}"
53+
value: "{{{onepassword.user.name}}}"
5454
allow_duplicates: false
5555
if: ctx?.onepassword?.user?.name != null
5656
- append:
5757
field: related.ip
58-
value: "{{onepassword.client.ip_address}}"
58+
value: "{{{onepassword.client.ip_address}}}"
5959
allow_duplicates: false
6060
if: ctx?.onepassword?.client?.ip_address != null
6161
######################

packages/1password/data_stream/signin_attempts/elasticsearch/ingest_pipeline/default.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,22 @@ processors:
5050
#########################
5151
- append:
5252
field: related.user
53-
value: "{{onepassword.target_user.uuid}}"
53+
value: "{{{onepassword.target_user.uuid}}}"
5454
allow_duplicates: false
5555
if: ctx?.onepassword?.target_user?.uuid != null
5656
- append:
5757
field: related.user
58-
value: "{{onepassword.target_user.email}}"
58+
value: "{{{onepassword.target_user.email}}}"
5959
allow_duplicates: false
6060
if: ctx?.onepassword?.target_user?.email != null
6161
- append:
6262
field: related.user
63-
value: "{{onepassword.target_user.name}}"
63+
value: "{{{onepassword.target_user.name}}}"
6464
allow_duplicates: false
6565
if: ctx?.onepassword?.target_user?.name != null
6666
- append:
6767
field: related.ip
68-
value: "{{onepassword.client.ip_address}}"
68+
value: "{{{onepassword.client.ip_address}}}"
6969
allow_duplicates: false
7070
if: ctx?.onepassword?.client?.ip_address != null
7171
######################

packages/1password/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.2"
22
name: 1password
33
title: "1Password"
4-
version: "1.30.0"
4+
version: "1.30.1"
55
description: Collect logs from 1Password with Elastic Agent.
66
type: integration
77
categories:

packages/akamai/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.25.2"
3+
changes:
4+
- description: Use triple-brace Mustache templating when referencing variables in ingest pipelines.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/11284
27
- version: "2.25.1"
38
changes:
49
- description: Fix definition of subfields of nested objects

packages/akamai/data_stream/siem/elasticsearch/ingest_pipeline/default.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ processors:
426426
##
427427
- append:
428428
field: related.ip
429-
value: "{{source.ip}}"
429+
value: "{{{source.ip}}}"
430430
allow_duplicates: false
431431
- set:
432432
field: client

packages/akamai/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: akamai
22
title: Akamai
3-
version: "2.25.1"
3+
version: "2.25.2"
44
description: Collect logs from Akamai with Elastic Agent.
55
type: integration
66
format_version: "3.0.2"

packages/atlassian_bitbucket/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.2.1"
3+
changes:
4+
- description: Use triple-brace Mustache templating when referencing variables in ingest pipelines.
5+
type: bugfix
6+
link: https://github.com/elastic/integrations/pull/11284
27
- version: "2.2.0"
38
changes:
49
- description: "Allow @custom pipeline access to event.original without setting preserve_original_event."

packages/atlassian_bitbucket/data_stream/audit/elasticsearch/ingest_pipeline/default.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,27 +386,27 @@ processors:
386386
}
387387
- append:
388388
field: related.user
389-
value: '{{user.name}}'
389+
value: '{{{user.name}}}'
390390
allow_duplicates: false
391391
if: ctx.user?.name != null
392392
- append:
393393
field: related.user
394-
value: '{{user.target.name}}'
394+
value: '{{{user.target.name}}}'
395395
allow_duplicates: false
396396
if: ctx.user?.target?.name != null
397397
- append:
398398
field: related.user
399-
value: '{{user.changes.name}}'
399+
value: '{{{user.changes.name}}}'
400400
allow_duplicates: false
401401
if: ctx.user?.changes?.name != null
402402
- append:
403403
field: related.ip
404-
value: '{{source.ip}}'
404+
value: '{{{source.ip}}}'
405405
allow_duplicates: false
406406
if: ctx.source?.ip != null
407407
- append:
408408
field: related.hosts
409-
value: '{{_tmp.service.domain}}'
409+
value: '{{{_tmp.service.domain}}}'
410410
allow_duplicates: false
411411
if: ctx._tmp?.service?.domain != null
412412
- remove:

packages/atlassian_bitbucket/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.2"
22
name: atlassian_bitbucket
33
title: Atlassian Bitbucket
4-
version: "2.2.0"
4+
version: "2.2.1"
55
description: Collect logs from Atlassian Bitbucket with Elastic Agent.
66
type: integration
77
categories:

0 commit comments

Comments
 (0)