There was an error while loading. Please reload this page.
2 parents 5629003 + 5c15c52 commit 7687112Copy full SHA for 7687112
1 file changed
.github/workflows/nightvision.yml
@@ -78,7 +78,14 @@ jobs:
78
79
- name: (5) Scan the API
80
run: |
81
- nightvision scan ${NIGHTVISION_TARGET} --auth ${NIGHTVISION_AUTH} > scan-results.txt
+ # stdout is redirected to scan-results.txt (its first line feeds the export
82
+ # below), which also swallows any scan error. Print the captured output and
83
+ # fail explicitly so a scan failure is diagnosable instead of opaque. (NV-4462.)
84
+ if ! nightvision scan ${NIGHTVISION_TARGET} --auth ${NIGHTVISION_AUTH} > scan-results.txt; then
85
+ echo "nightvision scan failed; captured output:"
86
+ cat scan-results.txt
87
+ exit 1
88
+ fi
89
nightvision export sarif -s "$(head -n 1 scan-results.txt)" --swagger-file openapi-spec.yml
90
91
- name: (6) Upload SARIF file to GitHub Security Alerts if vulnerabilities are found
0 commit comments