From 3aac2b932216d87ee135ef1584ea02b95f5eb8a6 Mon Sep 17 00:00:00 2001 From: Yogesh Ojha Date: Sat, 8 Jan 2022 23:08:41 +0530 Subject: [PATCH] fixed references section --- .../templates/startScan/detail_scan.html | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/web/startScan/templates/startScan/detail_scan.html b/web/startScan/templates/startScan/detail_scan.html index 68cc3ab7..7b10e62f 100644 --- a/web/startScan/templates/startScan/detail_scan.html +++ b/web/startScan/templates/startScan/detail_scan.html @@ -960,6 +960,7 @@ Detailed Scan CVSS Metrics Tags Discovered Date + Hackerone ID Severity CVSS Score @@ -2075,10 +2076,13 @@ $(document).ready(function(){ "columns": [ {'data': 'id'}, {'data': 'type'}, + {'data': 'name'}, {'data': 'cvss_metrics'}, {'data': 'tags'}, {'data': 'discovered_date'}, + {'data': 'hackerone_report_id'}, + {'data': 'severity'}, {'data': 'cvss_score'}, {'data': 'cve_ids'}, @@ -2087,12 +2091,12 @@ $(document).ready(function(){ {'data': 'description'}, {'data': 'open_status'}, {'data': 'references'}, - {'data': 'hackerone_report_id'}, + {'data': 'id'}, ], "columnDefs": [ // { "orderable": false, "targets": [4, 9, 10, 11]}, { - "targets": [3, 4, 5 ], + "targets": [3, 4, 5, 6, 10, 14], "visible": false, "searchable": true, }, @@ -2122,8 +2126,8 @@ $(document).ready(function(){ var cvss_metrics_badge = ''; switch (row['severity']) { case 'Info': - color = 'info' - badge_color = 'soft-info' + color = 'primary' + badge_color = 'soft-primary' break; case 'Low': color = 'low' @@ -2162,7 +2166,7 @@ $(document).ready(function(){ "render": function ( data, type, row ) { switch (data) { case 'Info': - return "  INFO  "; + return "  INFO  "; break; case 'Low': return "  LOW  "; @@ -2180,7 +2184,7 @@ $(document).ready(function(){ return ""; } }, - "targets": 6, + "targets": 7, }, { "render": function ( data, type, row ) { @@ -2201,7 +2205,7 @@ $(document).ready(function(){ } return ''; }, - "targets": 7, + "targets": 8, }, { "render": function ( data, type, row ) { @@ -2219,23 +2223,31 @@ $(document).ready(function(){ } return cve_cwe_badge + ''; }, - "targets": 8, + "targets": 9, }, { "render": function ( data, type, row ) { - return ""+htmlEncode(data)+""; + if (data.includes('http')) { + return ""+htmlEncode(data)+""; + } + return data; }, - "targets": 5, + "targets": 11, }, { "render": function ( data, type, row ) { - extracted_results = row['extracted_results'] ? row['extracted_results'] + `
` : ""; - matcher_name = row['matcher_name'] ? row['matcher_name'] + `
` : ""; - description = row['description'] ? row['description'] + `
` : ""; - reference = row['reference'] ? `Read More...` : ""; - return extracted_results + matcher_name + description + reference; + description = row['description'] ? `
${row['description']}
` : ''; + if (row['references'] && row['references'].length > 0) { + description += `
`; + description += `
'; + } + return description; }, - "targets": 6, + "targets": 12, }, { "render": function ( data, type, row ) {