diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index 5df3d7107..3b6bc009d 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -9,7 +9,7 @@ on: env: OPENSEARCH_DASHBOARDS_VERSION: '2.9.0' OPENSEARCH_VERSION: '2.9.0-SNAPSHOT' - SECURITY_ANALYTICS_BRANCH: '2.x' + SECURITY_ANALYTICS_BRANCH: '2.9' GRADLE_VERSION: '7.6.1' # If this variable is not empty, the package.json, opensearch_dashboards.json, and yarn.lock files will be replaced diff --git a/public/pages/Rules/components/RuleContentViewer/RuleContentViewer.tsx b/public/pages/Rules/components/RuleContentViewer/RuleContentViewer.tsx index 9c5c83afb..193ebfa39 100644 --- a/public/pages/Rules/components/RuleContentViewer/RuleContentViewer.tsx +++ b/public/pages/Rules/components/RuleContentViewer/RuleContentViewer.tsx @@ -129,11 +129,29 @@ export const RuleContentViewer: React.FC = ({ gutterSize="s" data-test-subj={'rule_flyout_rule_tags'} > - {ruleData.tags.map((tag: any, i: number) => ( - - {tag.value} - - ))} + {ruleData.tags.map((tag: { value: string }, i: number) => { + const isLinkable = !!tag.value.match(/attack\.t[0-9]+/); + let tagComponent: React.ReactNode = tag.value; + + if (isLinkable) { + const link = `https://attack.mitre.org/techniques/${tag.value + .split('.') + .slice(1) + .join('/') + .toUpperCase()}`; + tagComponent = ( + + {tag.value} + + ); + } + + return ( + + {tagComponent} + + ); + })} ) : (
{DEFAULT_EMPTY_DATA}