Skip to content

Commit

Permalink
Merge remote-tracking branch 'opensearch/main' into support-cidr-modi…
Browse files Browse the repository at this point in the history
…fier-in-detection
  • Loading branch information
amsiglan committed Sep 5, 2023
2 parents 3bf9518 + c26b693 commit 69322f1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"tough-cookie": "^4.1.3",
"semver": "^7.5.2",
"@babel/core": "^7.20.12",
"@babel/traverse": "^7.20.12"
"@babel/traverse": "^7.20.12",
"word-wrap": "^1.2.4"
},
"devDependencies": {
"@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,29 @@ export const RuleContentViewer: React.FC<RuleContentViewerProps> = ({
gutterSize="s"
data-test-subj={'rule_flyout_rule_tags'}
>
{ruleData.tags.map((tag: any, i: number) => (
<EuiFlexItem grow={false} key={i}>
<EuiBadge color={'#DDD'}>{tag.value}</EuiBadge>
</EuiFlexItem>
))}
{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 = (
<EuiLink href={link} target="_blank">
{tag.value}
</EuiLink>
);
}

return (
<EuiFlexItem grow={false} key={i}>
<EuiBadge color={'#DDD'}>{tagComponent}</EuiBadge>
</EuiFlexItem>
);
})}
</EuiFlexGroup>
) : (
<div>{DEFAULT_EMPTY_DATA}</div>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6933,10 +6933,10 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"

word-wrap@~1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
word-wrap@^1.2.4, word-wrap@~1.2.3:
version "1.2.5"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==

worker-farm@^1.7.0:
version "1.7.0"
Expand Down

0 comments on commit 69322f1

Please sign in to comment.