Skip to content

Commit 15e5338

Browse files
committed
SCAN-5649 : Handle error better.
1 parent d3f3dc3 commit 15e5338

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
FROM alpine:3.21.3
22

33
RUN apk upgrade && \
4-
apk add nodejs npm openjdk11-jre-headless tar zstd
4+
apk add nodejs npm openjdk21-jre-headless tar zstd
55

66
COPY package.json /contrast-local-scanner/package.json
77
RUN cd /contrast-local-scanner && npm i --production
88

9-
ENV ACTIONS_CACHE_SERVICE_V2 true
9+
ENV ACTIONS_CACHE_SERVICE_V2=true
1010

1111
COPY src /contrast-local-scanner/src
1212

src/checks.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ async function startCheck() {
3636
}
3737

3838
function getOutputModel(details) {
39+
40+
if (!details) {
41+
return {
42+
conclusion: "action_required",
43+
report: "Local scan completed with error, please see logs for details"
44+
};
45+
}
46+
3947
return {
4048
conclusion: details.thresholdResults > 0 ? "action_required" : "success",
4149
report: buildReport(details),

0 commit comments

Comments
 (0)