You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help_text="Exploitability indicates the likelihood that a vulnerability in a software package could be used by malicious actors to compromise systems, applications, or networks. This metric is determined automatically based on the discovery of known exploits.",
19
+
max_digits=2,
20
+
null=True,
21
+
),
22
+
),
23
+
migrations.AddField(
24
+
model_name="vulnerability",
25
+
name="weighted_severity",
26
+
field=models.DecimalField(
27
+
decimal_places=1,
28
+
help_text="Weighted severity is the highest value calculated by multiplying each severity by its corresponding weight, divided by 10.",
29
+
max_digits=3,
30
+
null=True,
31
+
),
32
+
),
33
+
migrations.AlterField(
34
+
model_name="package",
35
+
name="risk_score",
36
+
field=models.DecimalField(
37
+
decimal_places=1,
38
+
help_text="Risk score between 0.00 and 10.00, where higher values indicate greater vulnerability risk for the package.",
Copy file name to clipboardExpand all lines: vulnerabilities/models.py
+29-2Lines changed: 29 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,33 @@ class Vulnerability(models.Model):
243
243
related_name="vulnerabilities",
244
244
)
245
245
246
+
exploitability=models.DecimalField(
247
+
null=True,
248
+
max_digits=2,
249
+
decimal_places=1,
250
+
help_text="Exploitability indicates the likelihood that a vulnerability in a software package could be used by malicious actors to compromise systems, "
251
+
"applications, or networks. This metric is determined automatically based on the discovery of known exploits.",
252
+
)
253
+
254
+
weighted_severity=models.DecimalField(
255
+
null=True,
256
+
max_digits=3,
257
+
decimal_places=1,
258
+
help_text="Weighted severity is the highest value calculated by multiplying each severity by its corresponding weight, divided by 10.",
259
+
)
260
+
261
+
@property
262
+
defrisk_score(self):
263
+
"""
264
+
Risk expressed as a number ranging from 0 to 10.
265
+
Risk is calculated from weighted severity and exploitability values.
266
+
It is the maximum value of (the weighted severity multiplied by its exploitability) or 10
0 commit comments