Skip to content

Commit

Permalink
Make 21 the default risk score for a new rule
Browse files Browse the repository at this point in the history
Since the default severity is 'low,' these two defaults now coincide.
  • Loading branch information
rylnd committed Sep 4, 2020
1 parent 7d359ed commit e45c128
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const stepAboutDefaultValue: AboutStepRule = {
isAssociatedToEndpointList: false,
isBuildingBlock: false,
severity: { value: 'low', mapping: fillEmptySeverityMappings([]), isMappingChecked: false },
riskScore: { value: 50, mapping: [], isMappingChecked: false },
riskScore: { value: 21, mapping: [], isMappingChecked: false },
references: [''],
falsePositives: [''],
license: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('StepAboutRuleComponent', () => {
name: 'Test name text',
note: '',
references: [''],
riskScore: { value: 50, mapping: [], isMappingChecked: false },
riskScore: { value: 21, mapping: [], isMappingChecked: false },
severity: { value: 'low', mapping: fillEmptySeverityMappings([]), isMappingChecked: false },
tags: [],
threat: [
Expand Down Expand Up @@ -262,7 +262,7 @@ describe('StepAboutRuleComponent', () => {

const result = await formHook();
expect(result?.isValid).toEqual(true);
expect(result?.data?.riskScore.value).toEqual(50);
expect(result?.data?.riskScore.value).toEqual(21);

wrapper
.find('[data-test-subj="detectionEngineStepAboutRuleSeverity"] [data-test-subj="select"]')
Expand Down

0 comments on commit e45c128

Please sign in to comment.