-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #509 from ColonelThirtyTwo/cvssv4-2
Add CVSS v4 Support
- Loading branch information
Showing
19 changed files
with
4,646 additions
and
1,396 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
ghostwriter/reporting/migrations/0055_auto_20240924_2108.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 3.2.19 on 2024-09-24 21:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('reporting', '0054_set_text_defaults'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='finding', | ||
name='cvss_score', | ||
field=models.FloatField(blank=True, help_text='Set the CVSS score for this finding', null=True, verbose_name='CVSS Score'), | ||
), | ||
migrations.AlterField( | ||
model_name='finding', | ||
name='cvss_vector', | ||
field=models.CharField(blank=True, default='', help_text='Set the CVSS vector for this finding', max_length=255, verbose_name='CVSS Vector'), | ||
), | ||
migrations.AlterField( | ||
model_name='reportfindinglink', | ||
name='cvss_score', | ||
field=models.FloatField(blank=True, help_text='Set the CVSS score for this finding', null=True, verbose_name='CVSS Score'), | ||
), | ||
migrations.AlterField( | ||
model_name='reportfindinglink', | ||
name='cvss_vector', | ||
field=models.CharField(blank=True, default='', help_text='Set the CVSS vector for this finding', max_length=255, verbose_name='CVSS Vector'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
ghostwriter/reporting/templates/snippets/cvss_scripts.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{% load static %} | ||
|
||
<!-- CVSS V3 Calculator --> | ||
<!-- | ||
Copyright (c) 2019, FIRST.ORG, INC. | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the | ||
following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following | ||
disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the | ||
following disclaimer in the documentation and/or other materials provided with the distribution. | ||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote | ||
products derived from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
--> | ||
<!-- CVSS V4 Calculator --> | ||
<!-- | ||
Copyright (c) 2023 FIRST.ORG, Inc., Red Hat, and contributors | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
--> | ||
|
||
<link rel="stylesheet" href="{% static 'css/cvss_styles.css' %}"> | ||
<script src="{% static 'js/cvss/v3_calc.js' %}"></script> | ||
<script src="{% static 'js/cvss/v4_score.js' %}"></script> | ||
<script src="{% static 'js/cvss/v4_vector.js' %}"></script> | ||
<script src="{% static 'js/cvss/ui.js' %}"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!-- CVSS --> | ||
<!-- | ||
Copyright (c) 2015, FIRST.ORG, INC. | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the | ||
following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following | ||
disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the | ||
following disclaimer in the documentation and/or other materials provided with the distribution. | ||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote | ||
products derived from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
--> | ||
|
||
<div id="cvss-v3-calculator" class="form-row cvss-calculator"> | ||
<h2>CVSS v3.1</h2> | ||
<button class="mt-2 mb-2 btn btn-outline-secondary cvss-switch">Switch to v4</button> | ||
|
||
<div class="cvss-buttons"> | ||
{% include "snippets/cvss_ui_v3.html" %} | ||
</div> | ||
|
||
<div class="scoreRating"> | ||
<span class="baseMetricScore"></span> | ||
<span class="baseSeverity">Select values for all base metrics</span> | ||
</div> | ||
</div> | ||
|
||
<div id="cvss-v4-calculator" class="form-row cvss-calculator" style="display: none"> | ||
<h2>CVSS v4</h2> | ||
<button class="mt-2 mb-2 btn btn-outline-secondary cvss-switch">Switch to v3</button> | ||
|
||
<div class="cvss-buttons"> | ||
{% include "snippets/cvss_ui_v4.html" %} | ||
</div> | ||
|
||
<div class="scoreRating"> | ||
<span class="baseMetricScore"></span> | ||
<span class="baseSeverity">Select values for all base metrics</span> | ||
</div> | ||
</div> |
Oops, something went wrong.