Skip to content

Conversation

@efd6
Copy link
Contributor

@efd6 efd6 commented Oct 1, 2024

swp_all: use triple-brace templating 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. [1]http://mustache.github.io/mustache.5.html [git-generate] for f in $(	(	for p in $(	yq 'select(.owner.github == "elastic/sec-windows-platform")|.name' packages/**/manifest.yml \	| grep -v -- '---'	); do	rg -l -g '*.yml' ": ('\{\{[^{][ .a-zA-Z0-9_]*[^}]}}'|\"\{\{[^{][ .a-zA-Z0-9_]*[^}]}}\")" packages/$p	done	)|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 https://github.com/elastic/integrations/pull/11287	)>/dev/null 2>&1 done 

Proposed commit message

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added Integration:hid_bravura_monitor Bravura Monitor (Partner supported) bugfix Pull request that fixes a bug issue Integration:mysql_enterprise MySQL Enterprise labels Oct 1, 2024
@efd6 efd6 self-assigned this Oct 1, 2024
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@efd6 efd6 added the Team:Security-Windows Platform Security Windows Platform team [elastic/sec-windows-platform] label Oct 1, 2024
@efd6 efd6 marked this pull request as ready for review October 1, 2024 11:07
@efd6 efd6 requested a review from a team as a code owner October 1, 2024 11:07
@elasticmachine
Copy link

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

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. [1]http://mustache.github.io/mustache.5.html [git-generate] for f in $(	(	for p in $(	yq 'select(.owner.github == "elastic/sec-windows-platform")|.name' packages/**/manifest.yml \	| grep -v -- '---'	); do	rg -l -g '*.yml' ": ('\{\{[^{][ .a-zA-Z0-9_]*[^}]}}'|\"\{\{[^{][ .a-zA-Z0-9_]*[^}]}}\")" packages/$p	done	)|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#11287	)>/dev/null 2>&1 done
@elasticmachine
Copy link

💚 Build Succeeded

History

  • 💚 Build #16653 succeeded 27c93e80bb59c0590e6873c89c4502c50658b467

cc @efd6

@efd6 efd6 merged commit 4adf550 into elastic:main Oct 2, 2024
5 checks passed
@elastic-vault-github-plugin-prod

Package hid_bravura_monitor - 1.18.2 containing this change is available at https://epr.elastic.co/search?package=hid_bravura_monitor

@elastic-vault-github-plugin-prod

Package mysql_enterprise - 1.14.3 containing this change is available at https://epr.elastic.co/search?package=mysql_enterprise

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
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. [1]http://mustache.github.io/mustache.5.html [git-generate] for f in $(	(	for p in $(	yq 'select(.owner.github == "elastic/sec-windows-platform")|.name' packages/**/manifest.yml \	| grep -v -- '---'	); do	rg -l -g '*.yml' ": ('\{\{[^{][ .a-zA-Z0-9_]*[^}]}}'|\"\{\{[^{][ .a-zA-Z0-9_]*[^}]}}\")" packages/$p	done	)|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#11287	)>/dev/null 2>&1 done
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
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. [1]http://mustache.github.io/mustache.5.html [git-generate] for f in $(	(	for p in $(	yq 'select(.owner.github == "elastic/sec-windows-platform")|.name' packages/**/manifest.yml \	| grep -v -- '---'	); do	rg -l -g '*.yml' ": ('\{\{[^{][ .a-zA-Z0-9_]*[^}]}}'|\"\{\{[^{][ .a-zA-Z0-9_]*[^}]}}\")" packages/$p	done	)|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#11287	)>/dev/null 2>&1 done
@efd6 efd6 deleted the 7641-swp_all branch February 5, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Pull request that fixes a bug issue Integration:hid_bravura_monitor Bravura Monitor (Partner supported) Integration:mysql_enterprise MySQL Enterprise Team:Security-Windows Platform Security Windows Platform team [elastic/sec-windows-platform]

3 participants