Skip to content

Commit 14a2e51

Browse files
committed
🧹 adjust impact values that are mapped to ratings
1 parent 3666ece commit 14a2e51

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

explorer/impact.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import (
1414
// Impact represents severity rating scale when impact is provided as human-readable string value
1515
var impactMapping = map[string]int32{
1616
"none": 0,
17-
"low": 10,
18-
"medium": 40,
19-
"high": 70,
20-
"critical": 100,
17+
"low": 20,
18+
"medium": 55,
19+
"high": 80,
20+
"critical": 95,
2121
}
2222

2323
func (v *Impact) HumanReadable() string {

explorer/impact_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ func TestImpactParsing(t *testing.T) {
3838
"critical rating",
3939
`"critical"`,
4040
&Impact{
41-
Value: &ImpactValue{Value: 100},
41+
Value: &ImpactValue{Value: 95},
4242
},
4343
},
4444
{
4545
"low rating",
4646
`"low"`,
4747
&Impact{
48-
Value: &ImpactValue{Value: 10},
48+
Value: &ImpactValue{Value: 20},
4949
},
5050
},
5151
}

0 commit comments

Comments
 (0)