Skip to content

Commit 1737e6a

Browse files
authored
Merge pull request #19 from cadonuno/main
Fixing issue with mitigated findings still failing the build
2 parents 6429a56 + a65fc9c commit 1737e6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

policy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ async function processPolicyFlaws(options, flawData) {
141141
// walk through the list of flaws in the input file
142142
console.log(`Processing input file: \"${options.resultsFile}\" with ${flawData._embedded.findings.length} flaws to process.`)
143143
var index;
144+
var mitigatedCount=0;
144145
for( index=0; index < flawData._embedded.findings.length; index++) {
145146
let flaw = flawData._embedded.findings[index];
146147
let vid = createVeracodeFlawID(flaw);
@@ -151,6 +152,7 @@ async function processPolicyFlaws(options, flawData) {
151152
// check for mitigation
152153
if(flaw.finding_status.resolution_status == 'APPROVED') {
153154
console.log('Flaw mitigated, skipping import');
155+
mitigatedCount++;
154156
continue;
155157
}
156158

@@ -372,7 +374,7 @@ old rewrite path */
372374
await util.sleep(waitTime * 1000);
373375
}
374376

375-
return index;
377+
return index - mitigatedCount;
376378
}
377379

378380
module.exports = { processPolicyFlaws }

0 commit comments

Comments
 (0)