@@ -110,7 +110,7 @@ runs:
110
110
# Defining functions
111
111
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
116
116
send_report() {
@@ -252,25 +252,25 @@ runs:
252
252
if [ "$additional_image_detected" == true ]; then
253
253
if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
254
254
# 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}"
256
256
# 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}"
258
258
fi
259
259
# 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}"
261
261
# 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}"
263
263
else
264
264
if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
265
265
# 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}"
267
267
# 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}"
269
269
fi
270
270
# 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}"
272
272
# 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}"
274
274
fi
275
275
echo " Done"
276
276
0 commit comments