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

Commit

Permalink
Do not fail check if no critical vulnerabilities were found when exec…
Browse files Browse the repository at this point in the history
…uted for a fork repository (closes #104)
  • Loading branch information
svartalf committed May 6, 2020
1 parent 5a5aec1 commit a409407
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Changelog

All notable changes to this project will be documented in this file.

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

## [1.2.0]

### Fixed

- Do not fail check if no critical vulnerabilities were found when executed for a fork repository (closes #104)

## [1.1.0]

### Fixed
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ branding:
color: black
inputs:
token:
description: GitHub Actions token
required: true

runs:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function getData(): Promise<interfaces.Report> {
await cargo.call(['audit', '--json'], {
ignoreReturnCode: true,
listeners: {
stdout: buffer => {
stdout: (buffer) => {
stdout += buffer.toString();
},
},
Expand Down
10 changes: 10 additions & 0 deletions src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ See https://github.com/actions-rs/clippy-check/issues/2 for details.`);
throw new Error(
'Critical vulnerabilities were found, marking check as failed',
);
} else {
core.info(
'No critical vulnerabilities were found, not marking check as failed',
);
return;
}
}

Expand All @@ -177,6 +182,11 @@ See https://github.com/actions-rs/clippy-check/issues/2 for details.`);
throw new Error(
'Critical vulnerabilities were found, marking check as failed',
);
} else {
core.info(
'No critical vulnerabilities were found, not marking check as failed',
);
return;
}
}

Expand Down

0 comments on commit a409407

Please sign in to comment.