mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-25 10:32:00 +01:00
improved suppression capability within the report
This commit is contained in:
@@ -122,8 +122,26 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
|||||||
function setCopyText(name, matchType, matchValue, suppressType, suppressVal) {
|
function setCopyText(name, matchType, matchValue, suppressType, suppressVal) {
|
||||||
xml = '<suppress>\n';
|
xml = '<suppress>\n';
|
||||||
xml += ' <notes><!'+'[CDATA[\n file name: ' + name + '\n ]]'+'></notes>\n';
|
xml += ' <notes><!'+'[CDATA[\n file name: ' + name + '\n ]]'+'></notes>\n';
|
||||||
|
if (matchType=='gav') {
|
||||||
|
v = matchValue.match(/^[^:]+:[^:]+:/);
|
||||||
|
if (v && v[0]) {
|
||||||
|
xml += ' <'+matchType+' regex="true">^' + v[0].replace(/\./g,'\\.') + '.*$</'+matchType+'>\n';
|
||||||
|
} else {
|
||||||
xml += ' <'+matchType+'>' + matchValue + '</'+matchType+'>\n';
|
xml += ' <'+matchType+'>' + matchValue + '</'+matchType+'>\n';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
xml += ' <'+matchType+'>' + matchValue + '</'+matchType+'>\n';
|
||||||
|
}
|
||||||
|
if (suppressType=='cpe') {
|
||||||
|
v = suppressVal.match(/^cpe:\/a:[^:]+:[^:]+/);
|
||||||
|
if (v && v[0]) {
|
||||||
|
xml += ' <'+suppressType+'>' + v[0] + '</'+suppressType+'>\n';
|
||||||
|
} else {
|
||||||
xml += ' <'+suppressType+'>' + suppressVal + '</'+suppressType+'>\n';
|
xml += ' <'+suppressType+'>' + suppressVal + '</'+suppressType+'>\n';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
xml += ' <'+suppressType+'>' + suppressVal + '</'+suppressType+'>\n';
|
||||||
|
}
|
||||||
xml += '</suppress>';
|
xml += '</suppress>';
|
||||||
$('#modal-text').text(xml);
|
$('#modal-text').text(xml);
|
||||||
$('#modal-content,#modal-background').addClass('active');
|
$('#modal-content,#modal-background').addClass('active');
|
||||||
|
|||||||
Reference in New Issue
Block a user