Skip to content

Commit 893183f

Browse files
committed
Correct help text and remove inconsistent typing.
Signed-off-by: ziad hany <[email protected]>
1 parent ec5b972 commit 893183f

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

vulnerabilities/migrations/0082_vulnerability_exploitability_and_more.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 4.2.16 on 2024-11-16 20:41
1+
# Generated by Django 4.2.16 on 2024-11-17 13:52
22

33
from django.db import migrations, models
44

@@ -15,7 +15,7 @@ class Migration(migrations.Migration):
1515
name="exploitability",
1616
field=models.DecimalField(
1717
decimal_places=1,
18-
help_text='"Exploitability indicates the likelihood that a vulnerability in a software package could be used \n by malicious actors to compromise systems, applications, or networks. \n This metric is determined automatically based on the discovery of known exploits.',
18+
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.",
1919
max_digits=2,
2020
null=True,
2121
),
@@ -25,7 +25,7 @@ class Migration(migrations.Migration):
2525
name="weighted_severity",
2626
field=models.DecimalField(
2727
decimal_places=1,
28-
help_text="Weighted severity is the highest value calculated by multiplying each severity by its corresponding weight, divided by 10",
28+
help_text="Weighted severity is the highest value calculated by multiplying each severity by its corresponding weight, divided by 10.",
2929
max_digits=3,
3030
null=True,
3131
),

vulnerabilities/models.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,15 @@ class Vulnerability(models.Model):
247247
null=True,
248248
max_digits=2,
249249
decimal_places=1,
250-
help_text=""""Exploitability indicates the likelihood that a vulnerability in a software package could be used
251-
by malicious actors to compromise systems, applications, or networks.
252-
This metric is determined automatically based on the discovery of known exploits.""",
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.",
253252
)
254253

255254
weighted_severity = models.DecimalField(
256255
null=True,
257256
max_digits=3,
258257
decimal_places=1,
259-
help_text="Weighted severity is the highest value calculated by multiplying each severity by its corresponding weight, divided by 10",
258+
help_text="Weighted severity is the highest value calculated by multiplying each severity by its corresponding weight, divided by 10.",
260259
)
261260

262261
@property

vulnerabilities/risk.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,20 @@
66
# See https://github.com/aboutcode-org/vulnerablecode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
9-
from typing import List
109
from urllib.parse import urlparse
1110

1211
from django.db.models import Prefetch
1312

1413
from vulnerabilities.models import AffectedByPackageRelatedVulnerability
1514
from vulnerabilities.models import Vulnerability
1615
from vulnerabilities.models import VulnerabilityReference
17-
from vulnerabilities.models import VulnerabilitySeverity
1816
from vulnerabilities.severity_systems import EPSS
1917
from vulnerabilities.weight_config import WEIGHT_CONFIG
2018

2119
DEFAULT_WEIGHT = 5
2220

2321

24-
def get_weighted_severity(severities: List[VulnerabilitySeverity]):
22+
def get_weighted_severity(severities):
2523
"""
2624
Weighted Severity is the maximum value obtained when each Severity is multiplied
2725
by its associated Weight/10.

vulnerabilities/templates/vulnerability_details.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@
124124

125125
<tr>
126126
<td class="two-col-left"
127-
data-tooltip="Exploitability indicates the likelihood that a vulnerability in a software package could be used
128-
by malicious actors to compromise systems, applications, or networks.
129-
This metric is determined automatically based on the discovery of known exploits.">
127+
data-tooltip="Exploitability indicates the likelihood that a vulnerability in a software package
128+
could be used by malicious actors to compromise systems,
129+
applications, or networks. This metric is determined automatically based on the discovery of known exploits.">
130130
Exploitability</td>
131131
<td class="two-col-right wrap-strings">
132132
{{ vulnerability.exploitability }}

0 commit comments

Comments
 (0)