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
* cvss4: model + parsers
* cvss4: UI + rest tests + fixes
* add cvssv4 to forms, fix test
* add cvssv4 to forms, fix test
* simplify test_metrics_queries
* add cvssv4 to forms, fix test
* update how to write a parser guide
* fix one more test
* cvss4: add links to extnernal calculators
* cvss4: add links to extnernal calculators
* fix one more test
* fix one more test
* fix one more test
* fix and add tests
* show CVSS vector together in tooltip
* cleanup maxDiff
* fix tests
* update model help_text and verbose_name
* fix tests
* fix migration
* fix tests
* allow toggling of CVSS fields
* revert back to overriding the score field always
* fix tests
* fix tests
* Update docs/content/en/open_source/contributing/how-to-write-a-parser.md
* Update dojo/forms.py
Co-authored-by: Sean Reid <dogboat@users.noreply.github.com>
* Update dojo/forms.py
* Update dojo/models.py
Co-authored-by: Sean Reid <dogboat@users.noreply.github.com>
---------
Co-authored-by: Cody Maffucci <46459665+Maffooch@users.noreply.github.com>
Co-authored-by: Sean Reid <dogboat@users.noreply.github.com>
print(vectors[0].severities()) # this is the 3 severities
194
-
195
-
cvssv3 = vectors[0].clean_vector()
196
-
severity = vectors[0].severities()[0]
197
-
vectors[0].compute_base_score()
198
-
cvssv3_score = vectors[0].scores()[0]
199
-
finding.severity = severity
200
-
finding.cvssv3_score = cvssv3_score
196
+
import cvss.parser
197
+
from cvss importCVSS2, CVSS3, CVSS4
198
+
199
+
# TEMPORARY: Use Defect Dojo implementation of `parse_cvss_from_text` white waiting for https://github.com/RedHatProductSecurity/cvss/pull/75 to be released
field=models.TextField(help_text='Common Vulnerability Scoring System version 3 (CVSS3) score associated with this finding.', max_length=117, null=True, validators=[dojo.validators.cvss3_validator], verbose_name='CVSS3 Vector'),
19
+
),
20
+
migrations.AlterField(
21
+
model_name='finding',
22
+
name='cvssv3_score',
23
+
field=models.FloatField(blank=True, help_text='Numerical CVSSv3 score for the vulnerability. If the vector is given, the score is updated while saving the finding. The value must be between 0-10.', null=True, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(10.0)], verbose_name='CVSS3 Score'),
24
+
),
25
+
migrations.AddField(
26
+
model_name='finding',
27
+
name='cvssv4',
28
+
field=models.TextField(help_text='Common Vulnerability Scoring System version 4 (CVSS4) score associated with this finding.', max_length=255, null=True, validators=[dojo.validators.cvss4_validator], verbose_name='CVSS4 vector'),
29
+
),
30
+
migrations.AddField(
31
+
model_name='finding',
32
+
name='cvssv4_score',
33
+
field=models.FloatField(blank=True, help_text='Numerical CVSSv4 score for the vulnerability. If the vector is given, the score is updated while saving the finding. The value must be between 0-10.', null=True, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(10.0)], verbose_name='CVSSv4 Score'),
34
+
),
35
+
migrations.AddField(
36
+
model_name='system_settings',
37
+
name='enable_cvss3_display',
38
+
field=models.BooleanField(blank=False, default=True, help_text='With this setting turned off, CVSS3 fields will be hidden in the user interface.', verbose_name='Enable CVSS3 Display'),
39
+
),
40
+
migrations.AddField(
41
+
model_name='system_settings',
42
+
name='enable_cvss4_display',
43
+
field=models.BooleanField(blank=False, default=True, help_text='With this setting turned off, CVSS4 fields will be hidden in the user interface.', verbose_name='Enable CVSS4 Display'),
0 commit comments