@@ -110,7 +110,7 @@ runs:
110
110
111
111
# Defining functions
112
112
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
114
114
}
115
115
send_report() {
116
116
echo ""
@@ -251,25 +251,25 @@ runs:
251
251
if [ "$additional_image_detected" == true ]; then
252
252
if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
253
253
# CVE Scan
254
- trivy_scan "table" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json " "${module_image}:${module_tag}"
254
+ trivy_scan "table" "--scanners vuln" "" "${module_image}:${module_tag}"
255
255
# License scan
256
- trivy_scan "table" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json " "${module_image}:${module_tag}"
256
+ trivy_scan "table" "--scanners license --license-full" "" "${module_image}:${module_tag}"
257
257
fi
258
258
# CVE Scan
259
- trivy_scan "json" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}:${module_tag}"
259
+ trivy_scan "json" "--scanners vuln" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}:${module_tag}"
260
260
# License scan
261
- trivy_scan "json" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}:${module_tag}"
261
+ trivy_scan "json" "--scanners license --license-full" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}:${module_tag}"
262
262
else
263
263
if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
264
264
# CVE Scan
265
- trivy_scan "table" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json " "${module_image}@${IMAGE_HASH}"
265
+ trivy_scan "table" "--scanners vuln" "" "${module_image}@${IMAGE_HASH}"
266
266
# License scan
267
- trivy_scan "table" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json " "${module_image}@${IMAGE_HASH}"
267
+ trivy_scan "table" "--scanners license --license-full" "" "${module_image}@${IMAGE_HASH}"
268
268
fi
269
269
# CVE Scan
270
- trivy_scan "json" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}@${IMAGE_HASH}"
270
+ trivy_scan "json" "--scanners vuln" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}@${IMAGE_HASH}"
271
271
# License scan
272
- trivy_scan "json" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}@${IMAGE_HASH}"
272
+ trivy_scan "json" "--scanners license --license-full" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}@${IMAGE_HASH}"
273
273
fi
274
274
echo " Done"
275
275
send_report "CVE" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json"
0 commit comments