-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.6] [Security Solution] POC reusing types and avoiding data-driven (#…
…143383) (#145512) # Backport This will backport the following commits from `main` to `8.6`: - [[Security Solution] POC reusing types and avoiding data-driven (#143383)](#143383) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gloria Hornero","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-11-17T09:04:38Z","message":"[Security Solution] POC reusing types and avoiding data-driven (#143383)\n\nCo-authored-by: Kibana Machine <[email protected]>","sha":"3d7f1fb1cf3e8adc1984fdb85456c8b92664de2b","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rules","Team:Detection Alerts","v8.6.0","v8.7.0"],"number":143383,"url":"https://github.com/elastic/kibana/pull/143383","mergeCommit":{"message":"[Security Solution] POC reusing types and avoiding data-driven (#143383)\n\nCo-authored-by: Kibana Machine <[email protected]>","sha":"3d7f1fb1cf3e8adc1984fdb85456c8b92664de2b"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/143383","number":143383,"mergeCommit":{"message":"[Security Solution] POC reusing types and avoiding data-driven (#143383)\n\nCo-authored-by: Kibana Machine <[email protected]>","sha":"3d7f1fb1cf3e8adc1984fdb85456c8b92664de2b"}}]}] BACKPORT-->
- Loading branch information
1 parent
095f596
commit 94d3d8d
Showing
5 changed files
with
279 additions
and
58 deletions.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
x-pack/plugins/security_solution/cypress/data/detection_engine.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { | ||
RiskScore, | ||
RuleInterval, | ||
RuleIntervalFrom, | ||
Severity, | ||
Threat, | ||
ThreatSubtechnique, | ||
ThreatTechnique, | ||
} from '@kbn/securitysolution-io-ts-alerting-types'; | ||
|
||
import type { | ||
IndexPatternArray, | ||
InvestigationGuide, | ||
RuleDescription, | ||
RuleFalsePositiveArray, | ||
RuleQuery, | ||
RuleName, | ||
RuleReferenceArray, | ||
RuleTagArray, | ||
} from '../../common/detection_engine/rule_schema'; | ||
|
||
interface RuleFields { | ||
defaultIndexPatterns: IndexPatternArray; | ||
falsePositives: RuleFalsePositiveArray; | ||
investigationGuide: InvestigationGuide; | ||
referenceUrls: RuleReferenceArray; | ||
riskScore: RiskScore; | ||
ruleDescription: RuleDescription; | ||
ruleInterval: RuleInterval; | ||
ruleIntervalFrom: RuleIntervalFrom; | ||
ruleQuery: RuleQuery; | ||
ruleName: RuleName; | ||
ruleTags: RuleTagArray; | ||
ruleSeverity: Severity; | ||
threat: Threat; | ||
threatSubtechnique: ThreatSubtechnique; | ||
threatTechnique: ThreatTechnique; | ||
} | ||
|
||
export const ruleFields: RuleFields = { | ||
defaultIndexPatterns: [ | ||
'apm-*-transaction*', | ||
'auditbeat-*', | ||
'endgame-*', | ||
'filebeat-*', | ||
'logs-*', | ||
'packetbeat-*', | ||
'traces-apm*', | ||
'winlogbeat-*', | ||
'-*elastic-cloud-logs-*', | ||
], | ||
falsePositives: ['False1', 'False2'], | ||
investigationGuide: '# test markdown', | ||
referenceUrls: ['http://example.com/', 'https://example.com/'], | ||
riskScore: 17, | ||
ruleDescription: 'The rule description', | ||
ruleInterval: '5m', | ||
ruleIntervalFrom: '50000h', | ||
ruleQuery: 'host.name: *', | ||
ruleName: 'Test Rule', | ||
ruleTags: ['test', 'newRule'], | ||
ruleSeverity: 'high', | ||
threat: { | ||
framework: 'MITRE ATT&CK', | ||
tactic: { | ||
name: 'Credential Access', | ||
id: 'TA0006', | ||
reference: 'https://attack.mitre.org/tactics/TA0006', | ||
}, | ||
}, | ||
threatSubtechnique: { | ||
name: '/etc/passwd and /etc/shadow', | ||
id: 'T1003.008', | ||
reference: 'https://attack.mitre.org/techniques/T1003/008', | ||
}, | ||
threatTechnique: { | ||
id: 'T1003', | ||
name: 'OS Credential Dumping', | ||
reference: 'https://attack.mitre.org/techniques/T1003', | ||
}, | ||
}; |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.