forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] POC reusing types and avoiding data-driven (elast…
…ic#143383) Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
7e7d557
commit 3d7f1fb
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.