Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit a409407

Browse files
committed
Do not fail check if no critical vulnerabilities were found when executed for a fork repository (closes #104)
1 parent 5a5aec1 commit a409407

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# Changelog
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

8+
## [1.2.0]
9+
10+
### Fixed
11+
12+
- Do not fail check if no critical vulnerabilities were found when executed for a fork repository (closes #104)
13+
714
## [1.1.0]
815

916
### Fixed

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ branding:
66
color: black
77
inputs:
88
token:
9+
description: GitHub Actions token
910
required: true
1011

1112
runs:

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async function getData(): Promise<interfaces.Report> {
2626
await cargo.call(['audit', '--json'], {
2727
ignoreReturnCode: true,
2828
listeners: {
29-
stdout: buffer => {
29+
stdout: (buffer) => {
3030
stdout += buffer.toString();
3131
},
3232
},

src/reporter.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ See https://github.com/actions-rs/clippy-check/issues/2 for details.`);
153153
throw new Error(
154154
'Critical vulnerabilities were found, marking check as failed',
155155
);
156+
} else {
157+
core.info(
158+
'No critical vulnerabilities were found, not marking check as failed',
159+
);
160+
return;
156161
}
157162
}
158163

@@ -177,6 +182,11 @@ See https://github.com/actions-rs/clippy-check/issues/2 for details.`);
177182
throw new Error(
178183
'Critical vulnerabilities were found, marking check as failed',
179184
);
185+
} else {
186+
core.info(
187+
'No critical vulnerabilities were found, not marking check as failed',
188+
);
189+
return;
180190
}
181191
}
182192

0 commit comments

Comments
 (0)