Commit 6e5aa1be authored by Clement Bois's avatar Clement Bois
Browse files

fix: support for npm v7+ audit format

parent b25390e9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -535,7 +535,11 @@ variables:
        for file in ${DEFECTDOJO_NPMAUDIT_REPORTS}
        do
          if [[ $(expr "$file" : '.*\*.*') == 0 ]] && [[ -f "$file" ]]; then
            import_scan "$file" "NPM Audit Scan" "$engagement_id" "to-be-continuous/node ${node_tpl_version}"
            npm_scan_type="NPM Audit Scan"
            if jq -e 'has("auditReportVersion")' "$file" > /dev/null; then
              npm_scan_type="NPM Audit v7+ Scan"
            fi
            import_scan "$file" "$npm_scan_type" "$engagement_id" "to-be-continuous/node ${node_tpl_version}"
          fi
        done
      fi