Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions WebContent/WEB-INF/jsp/assessment/vulnDetailPanel.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<s:if test="detailVuln.devClosed != null">
<tr><th>Dev Closed</th><td><s:date name="detailVuln.devClosed" format="MM/dd/yyyy"/></td></tr>
</s:if>
<s:if test="detailVuln.stagingClosed != null">
<tr><th>Staging Closed</th><td><s:date name="detailVuln.stagingClosed" format="MM/dd/yyyy"/></td></tr>
</s:if>
<s:if test="detailAssessment != null">
<tr><th>Assessment</th><td>[<s:property value="detailAssessment.appId"/>] <s:property value="detailAssessment.name"/></td></tr>
<s:if test="detailAssessment.finalReport != null">
Expand Down
1 change: 1 addition & 0 deletions WebContent/WEB-INF/jsp/remediation/AssessmentVulns.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
data-end="<s:property value="controls['verEnd|'+id]"/>"
data-vulnname="<s:property value="name"/>"
data-devclosed="<s:property value="devClosed"/>"
data-stagingclosed="<s:property value="stagingClosed"/>"
data-prodclosed="<s:property value="closed"/>"
class="<s:if test="vuln.id == id">selected</s:if>">
<td class="sev${overallStr}"><input type="checkbox"
Expand Down
1 change: 1 addition & 0 deletions WebContent/WEB-INF/jsp/remediation/OpenVulns.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<th>Severity</th>
<th>Opened</th>
<th>Closed (Dev)</th>
<th>Closed (Staging)</th>
<th>Closed (Prod)</th>
</tr>
</thead>
Expand Down
25 changes: 25 additions & 0 deletions WebContent/WEB-INF/jsp/remediation/RemediationSchedule.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,31 @@ td:first-child {
</bs:modal>


<bs:modal modalId="stagingModal" saveId="saveStaging"
title="Close in Staging" color="red" closeText="Cancel"
saveText="Close in Staging">
<bs:row>
<bs:mco colsize="12">
<h3>
Are you sure you want to close this finding in the <b
style="color: #605ca8">Staging Environment</b>?
</h3>
<br>
<i>This will <b>not</b> fully mark the item as remediated until
it is closed in the production environment.
</i>
<br>
</bs:mco>
</bs:row>
<bs:row>
<bs:mco colsize="12">
<b>Add Notes:</b>
<div id="stagingNotes" name="stagingNotes"></div>
</bs:mco>
</bs:row>
</bs:modal>


<bs:modal modalId="prodModal" saveId="saveProd" title="Close in Prod"
color="red">
<bs:row>
Expand Down
25 changes: 25 additions & 0 deletions WebContent/WEB-INF/jsp/remediation/VerificationEdit.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,31 @@ margin-top: 20px;
</bs:modal>


<bs:modal modalId="stagingModal" saveId="saveStaging"
title="Close in Staging" color="red" closeText="Cancel"
saveText="Close in Staging">
<bs:row>
<bs:mco colsize="12">
<h3>
Are you sure you want to close this finding in the <b
style="color: #605ca8">Staging Environment</b>?
</h3>
<br>
<i>This will <b>not</b> fully mark the item as remediated until
it is closed in the production environment.
</i>
<br>
</bs:mco>
</bs:row>
<bs:row>
<bs:mco colsize="12">
<b>Add Notes:</b>
<div id="stagingNotes" name="stagingNotes"></div>
</bs:mco>
</bs:row>
</bs:modal>


<bs:modal modalId="prodModal" saveId="saveProd" title="Close in Prod"
color="red">
<bs:row>
Expand Down
1 change: 1 addition & 0 deletions WebContent/WEB-INF/jsp/remediation/actionsForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<!--</s:if>-->
<bs:button color="warning" size="md" colsize="3" text="Change Severity" id="chSev"></bs:button>
<bs:button color="primary" size="md" colsize="3" text="Close in Dev" id="closeDev"></bs:button>
<bs:button color="info" size="md" colsize="3" text="Close in Staging" id="closeStaging"></bs:button>
<bs:button color="success" size="md" colsize="3" text="Close in Prod" id="closeProd"></bs:button>
</bs:row>
<div style="height:500px"></div>
Expand Down
1 change: 1 addition & 0 deletions WebContent/WEB-INF/jsp/remediation/notesForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
</s:if>
<s:if test="(verForm && pass != null) || !verForm">
<tr><td> <a id="closeDev"><i class="fa fa-code"></i> Close in Development</a></td></tr>
<tr><td> <a id="closeStaging"><i class="fa fa-cubes"></i> Close in Staging</a></td></tr>
<tr><td> <a id="closeProd"><i class="fa fa-server"></i> Close in Production</a></td></tr>
</s:if>
<tr id="closeVerControl"><td> <a id="closeVer"><i class="fa fa-circle-xmark"></i> Cancel or Close Retest</a></td></tr>
Expand Down
1 change: 1 addition & 0 deletions WebContent/WEB-INF/jsp/remediation/vulnsJson.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"<s:date name="vuln.opened" format="MM/dd/yyyy"/>",
</s:else>
"<s:date name="vuln.devClosed" format="MM/dd/yyyy"/>",
"<s:date name="vuln.stagingClosed" format="MM/dd/yyyy"/>",
"<s:date name="vuln.closed" format="MM/dd/yyyy"/>",
{},
{
Expand Down
6 changes: 3 additions & 3 deletions WebContent/WEB-INF/jsp/retests/Verification.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@
<bs:row>
<bs:mco colsize="6">
<div class="form-group"
style="font-size: xx-large; padding-left: 30px">
style="font-size: x-large; padding-left: 30px">
<label> <input type="radio" name="r3"
class="flat-green" value="1"> Pass <br /> <input
class="flat-green" value="1"> Mitigated <br /> <input
type="radio" name="r3" class="flat-red" checked value="0">
Fail
Not Mitigated
</label>
</div>
</bs:mco>
Expand Down
3 changes: 3 additions & 0 deletions WebContent/dist/css/Fuse.css
Original file line number Diff line number Diff line change
Expand Up @@ -5185,6 +5185,9 @@ code {
.badge-yellow {
background-color: #f39c12;
}
.badge-purple {
background-color: #605ca8;
}
#noteHistory{
background-color: #12101073;
padding: 10px;
Expand Down
2 changes: 1 addition & 1 deletion WebContent/dist/js/remediation.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WebContent/dist/js/remediation_schedule.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WebContent/dist/js/verification.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WebContent/dist/js/verification_edit.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions WebContent/src/remediation/remediation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function updateSelects() {
if (rows.length > 0) {
$("#vuln_note_select").html("");
$("#vuln_history_select").html("");
window.location.href="RemediationSchedule?vulnId=" + rows[0][11].vid;
window.location.href="RemediationSchedule?vulnId=" + rows[0][12].vid;
}
}

Expand Down Expand Up @@ -64,16 +64,16 @@ $(function() {

},
{
targets: [8,9],
targets: [8,9,10],
width: "100px",
orderable: true

},
{
targets: [0],
width: "10px",
orderable: false

},
{
targets: [5],
Expand All @@ -91,7 +91,7 @@ $(function() {
$('#vulntable').DataTable().on('draw', function() {
clearLoading(".content");
$($("#vulntable").DataTable().rows().data()).each(function(a, b) {
if (searchId != -1 && b[11].vid == searchId) {
if (searchId != -1 && b[12].vid == searchId) {
$($("#vulntable").find("tbody").find("tr")[a]).trigger("click");

}
Expand Down Expand Up @@ -158,10 +158,10 @@ $(function() {

},
{
targets: [8,9],
targets: [8,9,10],
width: "100px",
orderable: true

},
{
targets: [6,7],
Expand Down Expand Up @@ -196,7 +196,7 @@ $(function() {
$('#vulntable tbody').on('click', 'tr', function(event) {

let data = $('#vulntable').DataTable().row(this).data();
let isver = data[11].isVer
let isver = data[12].isVer
if (isver) {
if (!$(this).hasClass('selected')) {
$.alert({
Expand All @@ -208,9 +208,9 @@ $(function() {
}
if ($('#vulntable').DataTable().rows('.selected').data().length > 0) {

let prevAID = $('#vulntable').DataTable().rows('.selected').data()[0][11].aid;
let prevAID = $('#vulntable').DataTable().rows('.selected').data()[0][12].aid;

let curAID = data[11].aid;
let curAID = data[12].aid;
if (prevAID != curAID) {
$.alert({ title: "Error", content: "You cannot select a vulnerability from a different application assessment." });
return;
Expand Down
18 changes: 17 additions & 1 deletion WebContent/src/remediation/remediation_schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ let editors = {
remNotes: createEditor("RemNotes"),
chSevNotes: createEditor("chSevNotes"),
nprodNotes:createEditor("nprodNotes"),
stagingNotes: createEditor("stagingNotes"),
prodNotes: createEditor("prodNotes"),
cancelVerNotes: createEditor("cancelVerNotes")
}
Expand Down Expand Up @@ -112,8 +113,9 @@ function updateForms(){

}
const devclosed = selected.data("devclosed");
const stagingclosed = selected.data("stagingclosed");
const prodclosed = selected.data("prodclosed");
if(devclosed != "" || prodclosed != ""){
if(devclosed != "" || stagingclosed != "" || prodclosed != ""){
$("#reopenVulnControl").show();
}else{
$("#reopenVulnControl").hide();
Expand Down Expand Up @@ -458,6 +460,9 @@ $(function() {
$("#closeDev").click(function() {
$("#nprodModal").modal('show');
});
$("#closeStaging").click(function() {
$("#stagingModal").modal('show');
});
$("#closeProd").click(function() {
$("#prodModal").modal('show');
});
Expand Down Expand Up @@ -499,6 +504,17 @@ $(function() {

});
});
$("#saveStaging").click(function() {
let newNote = encodeURIComponent(editors['stagingNotes'].getHTML());
let data = "action=closeInStaging";
data += "&note=" + newNote;
data += "&vulnId=" + vulnId;
$.post("RemVulnData", data).done(function() {
refreshNotes(vulnId);
$("#stagingModal").modal('hide');

});
});
$("#saveProd").click(function() {
let newNote = encodeURIComponent(editors['prodNotes'].getHTML());
let data = "action=closeInProd";
Expand Down
17 changes: 17 additions & 0 deletions WebContent/src/remediation/verification_edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ $(function() {
let remNotes= createEditor("RemNotes");
let chSevNotes= createEditor("chSevNotes");
let nprodNotes = createEditor("nprodNotes");
let stagingNotes = createEditor("stagingNotes");
let prodNotes = createEditor("prodNotes");
let cancelVerNotes= createEditor("cancelVerNotes");

Expand Down Expand Up @@ -443,6 +444,9 @@ $(function() {
$("#closeDev").click(function() {
$("#nprodModal").modal('show');
});
$("#closeStaging").click(function() {
$("#stagingModal").modal('show');
});
$("#closeProd").click(function() {
$("#prodModal").modal('show');
});
Expand Down Expand Up @@ -496,6 +500,19 @@ $(function() {

});
});
//save in staging
$("#saveStaging").click(function() {
let newNote = stagingNotes.getHTML();
let data = "action=closeInStaging";
data += `&note=${encodeURIComponent(newNote)}`;
data += `&vulnId=${defaultVulnId}`;
data += `&verId=${defaultSearchId}`;
$.post("RemVulnData", data).done(function() {
refreshNotes();
$("#stagingModal").modal('hide');

});
});
//save in prod
$("#saveProd").click(function() {
let newNote = prodNotes.getHTML();
Expand Down
12 changes: 11 additions & 1 deletion WebContent/src/retests/verification.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,17 @@ function downloadFile(id) {
$(function() {
getFiles()


$("#open").click(function() {
if (reportName && reportName.trim() != "") {
window.open(`DownloadReport?guid=${reportName}`, "_blank");
} else {
$.alert({
title: "No Report",
content: "No final report has been generated for this assessment yet."
});
}
});

$("#save").click(function() {
let pass = $('input:radio[name=r3]:checked').val();
let msgText = pass == '1'? "<span style='color:green'>PASS</span>": "<span style='color:red' >FAIL</span>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public String exportCSV() {
}

header.append(",Team,Assessor,Severity,CVSS Score,Category,");
header.append("Opened Date,Closed Date,Status,Tracking ID");
header.append("Opened Date,Closed Date,Closed Dev Date,Closed Staging Date,");
header.append("Closed In Dev,Closed In Staging,Closed In Prod,Status,Tracking ID");

// Add vulnerability custom field columns to header
for (CustomType customType : vulnerabilityCustomTypes) {
Expand Down Expand Up @@ -158,7 +159,14 @@ public String exportCSV() {
// Dates
csvContent.append(vuln.getOpened() != null ? dateFormat.format(vuln.getOpened()) : "").append(",");
csvContent.append(vuln.getClosed() != null ? dateFormat.format(vuln.getClosed()) : "").append(",");

csvContent.append(vuln.getDevClosed() != null ? dateFormat.format(vuln.getDevClosed()) : "").append(",");
csvContent.append(vuln.getStagingClosed() != null ? dateFormat.format(vuln.getStagingClosed()) : "").append(",");

// Closed-per-environment booleans
csvContent.append(vuln.getDevClosed() != null ? "true" : "false").append(",");
csvContent.append(vuln.getStagingClosed() != null ? "true" : "false").append(",");
csvContent.append(vuln.getClosed() != null ? "true" : "false").append(",");

// Status
String vulnStatus = vuln.getClosed() != null ? "Closed" : "Open";
csvContent.append(escapeCSV(vulnStatus)).append(",");
Expand Down
3 changes: 2 additions & 1 deletion src/com/fuse/actions/remediation/OpenVulns.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ private String sortRule(String colNum, String dir) {
case "6" : param = "vuln.overall";break;
case "7" : param = "vuln.opened";break;
case "8" : param = "vuln.devClosed";break;
case "9" : param = "vuln.closed";break;
case "9" : param = "vuln.stagingClosed";break;
case "10" : param = "vuln.closed";break;
default: param ="vuln.opened";
}
return String.format("{ '$sort': { '%s': %s} },",param, direction);
Expand Down
7 changes: 6 additions & 1 deletion src/com/fuse/actions/remediation/RemVulnData.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ public String execute() {

return "successJson";

} else if ((action.equals("closeInProd") || action.equals("closeInDev")) && vulnId != -1l) {
} else if ((action.equals("closeInProd") || action.equals("closeInDev") || action.equals("closeInStaging"))
&& vulnId != -1l) {

HibHelper.getInstance().preJoin();
em.joinTransaction();
Expand All @@ -131,6 +132,9 @@ public String execute() {
String env = "Production";
if (action.equals("closeInProd")) {
v.setClosed(new Date());
} else if (action.equals("closeInStaging")) {
v.setStagingClosed(new Date());
env = "Staging";
} else {
v.setDevClosed(new Date());
env = "Development";
Expand Down Expand Up @@ -264,6 +268,7 @@ public String reopen() {
if(vuln!=null) {
vuln.setClosed(null);
vuln.setDevClosed(null);
vuln.setStagingClosed(null);
HibHelper.getInstance().preJoin();
em.joinTransaction();
em.persist(vuln);
Expand Down
Loading
Loading