Skip to content

Commit

Permalink
Defectdojo import fixes update
Browse files Browse the repository at this point in the history
  • Loading branch information
1modm committed Aug 30, 2022
1 parent 1e85fbf commit 04b160a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
Changelog
=========

## Version 1.1

### Enhancements and Bugfixes:
* [#51](https://github.com/1modm/petereport/issues/51) Error when importing from DefectDojo
* Minor changes

## Version 1.0

### Enhancements and Bugfixes:
* [#48](https://github.com/1modm/petereport/issues/48)'bleach' causing Internal Error 500
* [#48](https://github.com/1modm/petereport/issues/48) 'bleach' causing Internal Error 500
* Upgraded bleach and django-bleach versions

## Version 0.9
Expand Down
5 changes: 4 additions & 1 deletion app/preport/templates/findings/defectdojo_products.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{% extends 'home/template.html' %}

{% load martortags %}
{% load bleach_tags %}

{% block title %} DefectDojo Import {% endblock title %}

{% block stylesheets %}
Expand Down Expand Up @@ -59,7 +62,7 @@ <h3 class="card-title">{{DDproducts_count}} DefectDojo Products</h3>
{% for product in DDproducts %}
<tr>
<td>
{{ product.id | bleach }}
{{ product.id }}
</td>
<td>
{{ product.name | bleach }}
Expand Down
2 changes: 1 addition & 1 deletion app/preport/templates/home/footer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<footer class="main-footer">
<div class="float-right d-none d-sm-block">
<b>Version</b> 1.0
<b>Version</b> 1.1
</div>
<strong>Copyright &copy; 2022 <a href="https://github.com/1modm/petereport">PeTeReport</a>.</strong> All rights reserved.
</footer>
Expand Down
10 changes: 5 additions & 5 deletions app/preport/templates/home/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,23 @@ <h3 class="card-title">
<td class=" last" align="center"><a href="/report/view/{{finding.report.id}}">{{ finding.report.title }}</a></td>

{% if finding.cvss_score >= 9 %}
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#CC0000"><i class="fa fa-bug "></i> {{finding.title}}</a></b></td>
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#CC0000"><i class="fa fa-exclamation-circle"></i> {{finding.title}}</a></b></td>
<td align="center"><a href="https://cwe.mitre.org/data/definitions/{{finding.cwe.cwe_id}}.html" target=”_blank”>{{finding.cwe.cwe_id}}</a></td>
<td><span class="badge bg-danger" style="font-size:15px;margin-left: 5%;">Critical {{ finding.cvss_score }}</span></td>
{% elif finding.cvss_score >= 7 %}
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#F20000"><i class="fa fa-bug "></i> {{finding.title}}</a></b></td>
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#F20000"><i class="fa fa-exclamation-triangle"></i> {{finding.title}}</a></b></td>
<td align="center"><a href="https://cwe.mitre.org/data/definitions/{{finding.cwe.cwe_id}}.html" target=”_blank”>{{finding.cwe.cwe_id}}</a></td>
<td><span class="badge bg-danger" style="font-size:15px;margin-left: 5%;">High {{ finding.cvss_score }}</span></td>
{% elif finding.cvss_score >= 4 %}
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#FC7F03"><i class="fa fa-bug "></i> {{finding.title}}</a></b></td>
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#FC7F03"><i class="fa fa-exclamation-triangle"></i> {{finding.title}}</a></b></td>
<td align="center"><a href="https://cwe.mitre.org/data/definitions/{{finding.cwe.cwe_id}}.html" target=”_blank”>{{finding.cwe.cwe_id}}</a></td>
<td><span class="badge bg-warning" style="font-size:15px;margin-left: 5%;">Medium {{ finding.cvss_score }}</span></td>
{% elif finding.cvss_score >= 0.1 %}
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#05B04F"><i class="fa fa-bug "></i> {{finding.title}}</a></b></td>
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#05B04F"><i class="fa fa-bug"></i> {{finding.title}}</a></b></td>
<td align="center"><a href="https://cwe.mitre.org/data/definitions/{{finding.cwe.cwe_id}}.html" target=”_blank”>{{finding.cwe.cwe_id}}</a></td>
<td><span class="badge bg-success" style="font-size:15px;margin-left: 5%;">Low {{ finding.cvss_score }}</span></td>
{% else %}
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#45A7F7"><i class="fa fa-bug "></i> {{finding.title}}</a></b></td>
<td class=" last"><b><a href="/finding/view/{{finding.id}}" style="color:#45A7F7"><i class="fa fa-bug"></i> {{finding.title}}</a></b></td>
<td align="center"><a href="https://cwe.mitre.org/data/definitions/{{finding.cwe.cwe_id}}.html" target=”_blank”>{{finding.cwe.cwe_id}}</a></td>
<td><span class="badge bg-info" style="font-size:15px;margin-left: 5%;">Info {{ finding.cvss_score }}</span></td>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion app/preport/templates/reports/report_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h4>{{ DB_report_query.title }} Report</h4>
<div class="col-md-5">
<a href="/report/findings/{{ DB_report_query.pk }}"><button type="button" class="btn btn-danger"><i class="fa fa-bug"></i> Findings</button></a>
<a href="/report/appendix/{{ DB_report_query.pk }}"><button type="button" class="btn btn-success"><i class="fa fa-folder"></i> Appendix</button></a>
<a href="/report/attacktree/{{ DB_report_query.pk }}"><button type="button" class="btn btn-info"><i class="fa fa-tree"></i> Attack Trees</button></a>
<a href="/report/attacktree/{{ DB_report_query.pk }}"><button type="button" class="btn btn-info"><i class="fa fa-sitemap"></i> Attack Trees</button></a>
</div>

<div class="col-md-7 text-right">
Expand Down

0 comments on commit 04b160a

Please sign in to comment.