@@ -110,7 +110,7 @@ runs:
110110 # Defining functions
111111
112112 trivy_scan() {
113- ${workdir}/bin/trivy i --policy "${TRIVY_POLICY_URL}" --cache-dir "${workdir}/bin/trivy_cache" --skip-db-update --skip-java-db-update --exit-code 0 --severity "${SEVERITY}" --ignorefile "${module_workdir}/.trivyignore" --format ${1} ${2} --output ${3} --quiet ${4} --username "${trivy_registry_user}" --password "${trivy_registry_pass}" --image-src remote
113+ ${workdir}/bin/trivy i --policy "${TRIVY_POLICY_URL}" --cache-dir "${workdir}/bin/trivy_cache" --skip-db-update --skip-java-db-update --exit-code 0 --severity "${SEVERITY}" --ignorefile "${module_workdir}/.trivyignore" --format ${1} ${2} ${3} --quiet ${4} --username "${trivy_registry_user}" --password "${trivy_registry_pass}" --image-src remote
114114 }
115115
116116 send_report() {
@@ -252,25 +252,25 @@ runs:
252252 if [ "$additional_image_detected" == true ]; then
253253 if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
254254 # CVE Scan
255- trivy_scan "table" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json " "${module_image}:${module_tag}"
255+ trivy_scan "table" "--scanners vuln" "" "${module_image}:${module_tag}"
256256 # License scan
257- trivy_scan "table" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json " "${module_image}:${module_tag}"
257+ trivy_scan "table" "--scanners license --license-full" "" "${module_image}:${module_tag}"
258258 fi
259259 # CVE Scan
260- trivy_scan "json" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}:${module_tag}"
260+ trivy_scan "json" "--scanners vuln" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}:${module_tag}"
261261 # License scan
262- trivy_scan "json" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}:${module_tag}"
262+ trivy_scan "json" "--scanners license --license-full" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}:${module_tag}"
263263 else
264264 if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
265265 # CVE Scan
266- trivy_scan "table" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json " "${module_image}@${IMAGE_HASH}"
266+ trivy_scan "table" "--scanners vuln" "" "${module_image}@${IMAGE_HASH}"
267267 # License scan
268- trivy_scan "table" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json " "${module_image}@${IMAGE_HASH}"
268+ trivy_scan "table" "--scanners license --license-full" "" "${module_image}@${IMAGE_HASH}"
269269 fi
270270 # CVE Scan
271- trivy_scan "json" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}@${IMAGE_HASH}"
271+ trivy_scan "json" "--scanners vuln" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}@${IMAGE_HASH}"
272272 # License scan
273- trivy_scan "json" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}@${IMAGE_HASH}"
273+ trivy_scan "json" "--scanners license --license-full" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}@${IMAGE_HASH}"
274274 fi
275275 echo " Done"
276276
0 commit comments