[9.1] [Attack Discovery][Scheduling] Use triple braces by default for the URL and markdown fields (#225794)#225837
Merged
kibanamachine merged 2 commits intoelastic:9.1from Jun 30, 2025
Conversation
…RL and markdown fields (elastic#225794) ## Summary According to the [mustache syntax](https://github.com/janl/mustache.js?tab=readme-ov-file#variables), all variables are HTML-escaped by default. If we want to render unescaped HTML, we should use the triple mustache: `{{{name}}}`. There are a few attack discovery variables in the action's context that we would like to render as unescaped HTML to preserve the URL and markdown structure. Those variable should be added using triple mustache by default from the action's "Add variable" menu: <img width="379" alt="Screenshot 2025-06-30 at 11 55 08" src="https://github.com/user-attachments/assets/6ca19adb-2b17-4eaf-b4f7-c94d0674c7fc" /> ### Variables that use triple mustache - `context.attack.detailsMarkdown` - `context.attack.summaryMarkdown` - `context.attack.entitySummaryMarkdown` - `context.attack.detailsUrl` ### Screenshots **Using double mustache**: <img width="1547" alt="Screenshot 2025-06-30 at 12 08 54" src="https://github.com/user-attachments/assets/f1e86d0f-14fb-4041-be8b-d96cd208a5a9" /> **Using triple mustache**: <img width="1547" alt="Screenshot 2025-06-30 at 12 08 41" src="https://github.com/user-attachments/assets/627a1b74-8c2c-44c0-8d0f-8be17ca61482" /> (cherry picked from commit 0ff0163)
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @e40pud |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.1:Questions ?
Please refer to the Backport tool documentation