Skip to content

Comments

[Attack Discovery][Scheduling] Use triple braces by default for the URL and markdown fields#225794

Merged
e40pud merged 2 commits intoelastic:mainfrom
e40pud:security/genai/ad-schedule/triple-braces-for-URL
Jun 30, 2025
Merged

[Attack Discovery][Scheduling] Use triple braces by default for the URL and markdown fields#225794
e40pud merged 2 commits intoelastic:mainfrom
e40pud:security/genai/ad-schedule/triple-braces-for-URL

Conversation

@e40pud
Copy link
Contributor

@e40pud e40pud commented Jun 30, 2025

Summary

According to the mustache syntax, 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:

Screenshot 2025-06-30 at 11 55 08

Variables that use triple mustache

  • context.attack.detailsMarkdown
  • context.attack.summaryMarkdown
  • context.attack.entitySummaryMarkdown
  • context.attack.detailsUrl

Screenshots

Using double mustache:

Screenshot 2025-06-30 at 12 08 54

Using triple mustache:

Screenshot 2025-06-30 at 12 08 41

@e40pud e40pud requested a review from andrew-goldstein June 30, 2025 10:10
@e40pud e40pud self-assigned this Jun 30, 2025
@e40pud e40pud requested a review from a team as a code owner June 30, 2025 10:11
@e40pud e40pud added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.2.0 labels Jun 30, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #49 / ESQL execution logic API @ess @serverless ES|QL rule type shard failures should handle shard failures and include warning in logs for query that is not aggregating

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.8MB 9.8MB +136.0B

cc @e40pud

@e40pud e40pud merged commit 0ff0163 into elastic:main Jun 30, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

https://github.com/elastic/kibana/actions/runs/15973097806

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…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)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2025
…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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jun 30, 2025
… the URL and markdown fields (#225794) (#225837)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Attack Discovery][Scheduling] Use triple braces by default for the
URL and markdown fields
(#225794)](#225794)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2025-06-30T12:37:10Z","message":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown fields (#225794)\n\n## Summary\n\nAccording to the
[mustache\nsyntax](https://github.com/janl/mustache.js?tab=readme-ov-file#variables),\nall
variables are HTML-escaped by default. If we want to render\nunescaped
HTML, we should use the triple mustache: `{{{name}}}`.\n\nThere are a
few attack discovery variables in the action's context that\nwe would
like to render as unescaped HTML to preserve the URL and\nmarkdown
structure. Those variable should be added using triple mustache\nby
default from the action's \"Add variable\" menu:\n\n<img width=\"379\"
alt=\"Screenshot 2025-06-30 at 11 55
08\"\nsrc=\"https://github.com/user-attachments/assets/6ca19adb-2b17-4eaf-b4f7-c94d0674c7fc\"\n/>\n\n###
Variables that use triple mustache\n\n-
`context.attack.detailsMarkdown`\n- `context.attack.summaryMarkdown`\n-
`context.attack.entitySummaryMarkdown`\n-
`context.attack.detailsUrl`\n\n### Screenshots\n\n**Using double
mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at 12 08
54\"\nsrc=\"https://github.com/user-attachments/assets/f1e86d0f-14fb-4041-be8b-d96cd208a5a9\"\n/>\n\n**Using
triple mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at
12 08
41\"\nsrc=\"https://github.com/user-attachments/assets/627a1b74-8c2c-44c0-8d0f-8be17ca61482\"\n/>","sha":"0ff016363dada515fe8225c68b4a8947bb13b698","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown
fields","number":225794,"url":"https://github.com/elastic/kibana/pull/225794","mergeCommit":{"message":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown fields (#225794)\n\n## Summary\n\nAccording to the
[mustache\nsyntax](https://github.com/janl/mustache.js?tab=readme-ov-file#variables),\nall
variables are HTML-escaped by default. If we want to render\nunescaped
HTML, we should use the triple mustache: `{{{name}}}`.\n\nThere are a
few attack discovery variables in the action's context that\nwe would
like to render as unescaped HTML to preserve the URL and\nmarkdown
structure. Those variable should be added using triple mustache\nby
default from the action's \"Add variable\" menu:\n\n<img width=\"379\"
alt=\"Screenshot 2025-06-30 at 11 55
08\"\nsrc=\"https://github.com/user-attachments/assets/6ca19adb-2b17-4eaf-b4f7-c94d0674c7fc\"\n/>\n\n###
Variables that use triple mustache\n\n-
`context.attack.detailsMarkdown`\n- `context.attack.summaryMarkdown`\n-
`context.attack.entitySummaryMarkdown`\n-
`context.attack.detailsUrl`\n\n### Screenshots\n\n**Using double
mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at 12 08
54\"\nsrc=\"https://github.com/user-attachments/assets/f1e86d0f-14fb-4041-be8b-d96cd208a5a9\"\n/>\n\n**Using
triple mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at
12 08
41\"\nsrc=\"https://github.com/user-attachments/assets/627a1b74-8c2c-44c0-8d0f-8be17ca61482\"\n/>","sha":"0ff016363dada515fe8225c68b4a8947bb13b698"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225794","number":225794,"mergeCommit":{"message":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown fields (#225794)\n\n## Summary\n\nAccording to the
[mustache\nsyntax](https://github.com/janl/mustache.js?tab=readme-ov-file#variables),\nall
variables are HTML-escaped by default. If we want to render\nunescaped
HTML, we should use the triple mustache: `{{{name}}}`.\n\nThere are a
few attack discovery variables in the action's context that\nwe would
like to render as unescaped HTML to preserve the URL and\nmarkdown
structure. Those variable should be added using triple mustache\nby
default from the action's \"Add variable\" menu:\n\n<img width=\"379\"
alt=\"Screenshot 2025-06-30 at 11 55
08\"\nsrc=\"https://github.com/user-attachments/assets/6ca19adb-2b17-4eaf-b4f7-c94d0674c7fc\"\n/>\n\n###
Variables that use triple mustache\n\n-
`context.attack.detailsMarkdown`\n- `context.attack.summaryMarkdown`\n-
`context.attack.entitySummaryMarkdown`\n-
`context.attack.detailsUrl`\n\n### Screenshots\n\n**Using double
mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at 12 08
54\"\nsrc=\"https://github.com/user-attachments/assets/f1e86d0f-14fb-4041-be8b-d96cd208a5a9\"\n/>\n\n**Using
triple mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at
12 08
41\"\nsrc=\"https://github.com/user-attachments/assets/627a1b74-8c2c-44c0-8d0f-8be17ca61482\"\n/>","sha":"0ff016363dada515fe8225c68b4a8947bb13b698"}}]}]
BACKPORT-->

Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
kibanamachine added a commit that referenced this pull request Jun 30, 2025
…r the URL and markdown fields (#225794) (#225836)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Attack Discovery][Scheduling] Use triple braces by default for the
URL and markdown fields
(#225794)](#225794)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"ievgen.sorokopud@elastic.co"},"sourceCommit":{"committedDate":"2025-06-30T12:37:10Z","message":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown fields (#225794)\n\n## Summary\n\nAccording to the
[mustache\nsyntax](https://github.com/janl/mustache.js?tab=readme-ov-file#variables),\nall
variables are HTML-escaped by default. If we want to render\nunescaped
HTML, we should use the triple mustache: `{{{name}}}`.\n\nThere are a
few attack discovery variables in the action's context that\nwe would
like to render as unescaped HTML to preserve the URL and\nmarkdown
structure. Those variable should be added using triple mustache\nby
default from the action's \"Add variable\" menu:\n\n<img width=\"379\"
alt=\"Screenshot 2025-06-30 at 11 55
08\"\nsrc=\"https://github.com/user-attachments/assets/6ca19adb-2b17-4eaf-b4f7-c94d0674c7fc\"\n/>\n\n###
Variables that use triple mustache\n\n-
`context.attack.detailsMarkdown`\n- `context.attack.summaryMarkdown`\n-
`context.attack.entitySummaryMarkdown`\n-
`context.attack.detailsUrl`\n\n### Screenshots\n\n**Using double
mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at 12 08
54\"\nsrc=\"https://github.com/user-attachments/assets/f1e86d0f-14fb-4041-be8b-d96cd208a5a9\"\n/>\n\n**Using
triple mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at
12 08
41\"\nsrc=\"https://github.com/user-attachments/assets/627a1b74-8c2c-44c0-8d0f-8be17ca61482\"\n/>","sha":"0ff016363dada515fe8225c68b4a8947bb13b698","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown
fields","number":225794,"url":"https://github.com/elastic/kibana/pull/225794","mergeCommit":{"message":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown fields (#225794)\n\n## Summary\n\nAccording to the
[mustache\nsyntax](https://github.com/janl/mustache.js?tab=readme-ov-file#variables),\nall
variables are HTML-escaped by default. If we want to render\nunescaped
HTML, we should use the triple mustache: `{{{name}}}`.\n\nThere are a
few attack discovery variables in the action's context that\nwe would
like to render as unescaped HTML to preserve the URL and\nmarkdown
structure. Those variable should be added using triple mustache\nby
default from the action's \"Add variable\" menu:\n\n<img width=\"379\"
alt=\"Screenshot 2025-06-30 at 11 55
08\"\nsrc=\"https://github.com/user-attachments/assets/6ca19adb-2b17-4eaf-b4f7-c94d0674c7fc\"\n/>\n\n###
Variables that use triple mustache\n\n-
`context.attack.detailsMarkdown`\n- `context.attack.summaryMarkdown`\n-
`context.attack.entitySummaryMarkdown`\n-
`context.attack.detailsUrl`\n\n### Screenshots\n\n**Using double
mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at 12 08
54\"\nsrc=\"https://github.com/user-attachments/assets/f1e86d0f-14fb-4041-be8b-d96cd208a5a9\"\n/>\n\n**Using
triple mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at
12 08
41\"\nsrc=\"https://github.com/user-attachments/assets/627a1b74-8c2c-44c0-8d0f-8be17ca61482\"\n/>","sha":"0ff016363dada515fe8225c68b4a8947bb13b698"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225794","number":225794,"mergeCommit":{"message":"[Attack
Discovery][Scheduling] Use triple braces by default for the URL and
markdown fields (#225794)\n\n## Summary\n\nAccording to the
[mustache\nsyntax](https://github.com/janl/mustache.js?tab=readme-ov-file#variables),\nall
variables are HTML-escaped by default. If we want to render\nunescaped
HTML, we should use the triple mustache: `{{{name}}}`.\n\nThere are a
few attack discovery variables in the action's context that\nwe would
like to render as unescaped HTML to preserve the URL and\nmarkdown
structure. Those variable should be added using triple mustache\nby
default from the action's \"Add variable\" menu:\n\n<img width=\"379\"
alt=\"Screenshot 2025-06-30 at 11 55
08\"\nsrc=\"https://github.com/user-attachments/assets/6ca19adb-2b17-4eaf-b4f7-c94d0674c7fc\"\n/>\n\n###
Variables that use triple mustache\n\n-
`context.attack.detailsMarkdown`\n- `context.attack.summaryMarkdown`\n-
`context.attack.entitySummaryMarkdown`\n-
`context.attack.detailsUrl`\n\n### Screenshots\n\n**Using double
mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at 12 08
54\"\nsrc=\"https://github.com/user-attachments/assets/f1e86d0f-14fb-4041-be8b-d96cd208a5a9\"\n/>\n\n**Using
triple mustache**:\n\n<img width=\"1547\" alt=\"Screenshot 2025-06-30 at
12 08
41\"\nsrc=\"https://github.com/user-attachments/assets/627a1b74-8c2c-44c0-8d0f-8be17ca61482\"\n/>","sha":"0ff016363dada515fe8225c68b4a8947bb13b698"}}]}]
BACKPORT-->

Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants