8000 Added Timestamps to Findings JSON File by JohannesZahn · Pull Request #492 · secureCodeBox/secureCodeBox · GitHub
[go: up one dir, main page]

Skip to content
Merged
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
7 changes: 4 additions & 3 deletions parser-sdk/nodejs/parser-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,12 @@ async function main() {

console.log(`Transformed raw result file into ${findings.length} findings`);

console.log("Adding UUIDs to the findings");
const findingsWithIds = findings.map((finding) => {
console.log("Adding UUIDs and Dates to the findings");
const findingsWithIdsAndDates = findings.map((finding) => {
return {
...finding,
id: uuid(),
parsed_at: new Date().toISOString(),
};
});

Expand All @@ -117,7 +118,7 @@ async function main() {
console.log(`Uploading results to the file storage service`);

await axios
.put(resultUploadUrl, findingsWithIds, { headers: { "content-type": "" } })
.put(resultUploadUrl, findingsWithIdsAndDates, { headers: { "content-type": "" } })
.catch(function(error) {
if (error.response) {
// The request was made and the server responded with a status code
Expand Down
0