@@ -105,7 +105,7 @@ runs:
105
105
echo
106
106
# Defining functions
107
107
trivy_scan() {
108
- ${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
108
+ ${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
109
109
}
110
110
send_report() {
111
111
echo ""
@@ -234,25 +234,25 @@ runs:
234
234
if [ "$additional_image_detected" == true ]; then
235
235
if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
236
236
# CVE Scan
237
- trivy_scan "table" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json " "${module_image}:${module_tag}"
237
+ trivy_scan "table" "--scanners vuln" "" "${module_image}:${module_tag}"
238
238
# License scan
239
- trivy_scan "table" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json " "${module_image}:${module_tag}"
239
+ trivy_scan "table" "--scanners license --license-full" "" "${module_image}:${module_tag}"
240
240
fi
241
241
# CVE Scan
242
- trivy_scan "json" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}:${module_tag}"
242
+ trivy_scan "json" "--scanners vuln" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}:${module_tag}"
243
243
# License scan
244
- trivy_scan "json" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}:${module_tag}"
244
+ trivy_scan "json" "--scanners license --license-full" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}:${module_tag}"
245
245
else
246
246
if [ "${TRIVY_REPORTS_LOG_OUTPUT}" != "false" ]; then
247
247
# CVE Scan
248
- trivy_scan "table" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json " "${module_image}@${IMAGE_HASH}"
248
+ trivy_scan "table" "--scanners vuln" "" "${module_image}@${IMAGE_HASH}"
249
249
# License scan
250
- trivy_scan "table" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json " "${module_image}@${IMAGE_HASH}"
250
+ trivy_scan "table" "--scanners license --license-full" "" "${module_image}@${IMAGE_HASH}"
251
251
fi
252
252
# CVE Scan
253
- trivy_scan "json" "--scanners vuln" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}@${IMAGE_HASH}"
253
+ trivy_scan "json" "--scanners vuln" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json" "${module_image}@${IMAGE_HASH}"
254
254
# License scan
255
- trivy_scan "json" "--scanners license --license-full" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}@${IMAGE_HASH}"
255
+ trivy_scan "json" "--scanners license --license-full" "--output ${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report_license.json" "${module_image}@${IMAGE_HASH}"
256
256
fi
257
257
echo " Done"
258
258
send_report "CVE" "${module_reports}/ext_${MODULE_NAME}_${IMAGE_NAME}_report.json"
0 commit comments