Skip to content

Commit

Permalink
Added redact for bulkdownload in the cve-id controller
Browse files Browse the repository at this point in the history
  • Loading branch information
david-rocca committed Jan 29, 2025
1 parent 4cd2b35 commit 4dc6b91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/controller/cve-id.controller/cve-id.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,14 @@ async function getFilteredCveId (req, res, next) {
// No redaction, original requested_by.user is in requested_by.cna and owning_cna
i.requested_by.user = orgMap[cnaid].users[i.requested_by.user]
}

i.owning_cna = orgMap[i.owning_cna].shortname
// Finally, if the user is bulk download, redact the entire requested by object and owning cna
if (isBulkDownload) {
i.owning_cna = 'REDACTED'
i.requested_by.user = 'REDACTED'
i.requested_by.cna = 'REDACTED'
}

return i
})
}
Expand Down

0 comments on commit 4dc6b91

Please sign in to comment.