Public Access
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9159ac5f7 | ||
|
|
49cdbfff23 | ||
|
|
27d7cd3d63 | ||
|
|
bc91a32ed8 | ||
|
|
139ab94e83 | ||
|
|
71526086eb | ||
|
|
6ef0fcd2dd |
@@ -5,18 +5,6 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [1.4.1] - 2023-04-04
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Corrected reporting on `unsound` and `notice` informationals
|
|
||||||
|
|
||||||
## [1.4.0] - 2023-04-04
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
|
|
||||||
- Reflect change to enable warning on `unsound` and `notice` informationals
|
|
||||||
|
|
||||||
## [1.3.2] - 2023-03-13
|
## [1.3.2] - 2023-03-13
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# Rust `audit-check` Action
|
# Rust `audit-check` Action
|
||||||
|
|
||||||

|

|
||||||
|
[](https://gitter.im/actions-rs/community)
|
||||||
|
|
||||||
> Security vulnerabilities audit
|
> Security vulnerabilities audit
|
||||||
|
|
||||||
@@ -43,27 +44,6 @@ Note that informational advisories are not affecting the check status.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### Granular Permissions
|
|
||||||
|
|
||||||
These are the typically used permissions:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: 'rust-audit-check'
|
|
||||||
github-token:
|
|
||||||
action-input:
|
|
||||||
input: token
|
|
||||||
is-default: false
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
issues-reason: to create issues
|
|
||||||
checks: write
|
|
||||||
checks-reason: to create check
|
|
||||||
```
|
|
||||||
|
|
||||||
The action does not raise issues when it is not triggered from a "cron" scheduled workflow.
|
|
||||||
|
|
||||||
When running the action as scheduled it will crate issues but e.g. in PR / push fails the action.
|
|
||||||
|
|
||||||
#### Limitations
|
#### Limitations
|
||||||
|
|
||||||
Due to [token permissions](https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions),
|
Due to [token permissions](https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions),
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rust-audit-check",
|
"name": "rust-audit-check",
|
||||||
"version": "1.4.1",
|
"version": "1.3.2",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Security audit for security vulnerabilities",
|
"description": "Security audit for security vulnerabilities",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
|
|||||||
+2
-30
@@ -15,7 +15,6 @@ interface Stats {
|
|||||||
critical: number;
|
critical: number;
|
||||||
notices: number;
|
notices: number;
|
||||||
unmaintained: number;
|
unmaintained: number;
|
||||||
unsound: number;
|
|
||||||
other: number;
|
other: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,20 +37,6 @@ function makeReport(
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'unsound':
|
|
||||||
preparedWarnings.push({
|
|
||||||
advisory: warning.advisory,
|
|
||||||
package: warning.package,
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'notice':
|
|
||||||
preparedWarnings.push({
|
|
||||||
advisory: warning.advisory,
|
|
||||||
package: warning.package,
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'informational':
|
case 'informational':
|
||||||
preparedWarnings.push({
|
preparedWarnings.push({
|
||||||
advisory: warning.advisory,
|
advisory: warning.advisory,
|
||||||
@@ -90,7 +75,6 @@ function getStats(
|
|||||||
let critical = 0;
|
let critical = 0;
|
||||||
let notices = 0;
|
let notices = 0;
|
||||||
let unmaintained = 0;
|
let unmaintained = 0;
|
||||||
let unsound = 0;
|
|
||||||
let other = 0;
|
let other = 0;
|
||||||
for (const vulnerability of vulnerabilities) {
|
for (const vulnerability of vulnerabilities) {
|
||||||
switch (vulnerability.advisory.informational) {
|
switch (vulnerability.advisory.informational) {
|
||||||
@@ -100,9 +84,6 @@ function getStats(
|
|||||||
case 'unmaintained':
|
case 'unmaintained':
|
||||||
unmaintained += 1;
|
unmaintained += 1;
|
||||||
break;
|
break;
|
||||||
case 'unsound':
|
|
||||||
unsound += 1;
|
|
||||||
break;
|
|
||||||
case null:
|
case null:
|
||||||
critical += 1;
|
critical += 1;
|
||||||
break;
|
break;
|
||||||
@@ -118,10 +99,6 @@ function getStats(
|
|||||||
unmaintained += 1;
|
unmaintained += 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'unsound':
|
|
||||||
unsound += 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Both yanked and informational types of kind
|
// Both yanked and informational types of kind
|
||||||
other += 1;
|
other += 1;
|
||||||
@@ -133,7 +110,6 @@ function getStats(
|
|||||||
critical: critical,
|
critical: critical,
|
||||||
notices: notices,
|
notices: notices,
|
||||||
unmaintained: unmaintained,
|
unmaintained: unmaintained,
|
||||||
unsound: unsound,
|
|
||||||
other: other,
|
other: other,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -142,7 +118,8 @@ function getSummary(stats: Stats): string {
|
|||||||
const blocks: string[] = [];
|
const blocks: string[] = [];
|
||||||
|
|
||||||
if (stats.critical > 0) {
|
if (stats.critical > 0) {
|
||||||
blocks.push(`${stats.critical} advisories`);
|
// TODO: Plural
|
||||||
|
blocks.push(`${stats.critical} advisory(ies)`);
|
||||||
}
|
}
|
||||||
if (stats.notices > 0) {
|
if (stats.notices > 0) {
|
||||||
blocks.push(`${stats.notices} notice${plural(stats.notices)}`);
|
blocks.push(`${stats.notices} notice${plural(stats.notices)}`);
|
||||||
@@ -150,9 +127,6 @@ function getSummary(stats: Stats): string {
|
|||||||
if (stats.unmaintained > 0) {
|
if (stats.unmaintained > 0) {
|
||||||
blocks.push(`${stats.unmaintained} unmaintained`);
|
blocks.push(`${stats.unmaintained} unmaintained`);
|
||||||
}
|
}
|
||||||
if (stats.unsound > 0) {
|
|
||||||
blocks.push(`${stats.unsound} unsound`);
|
|
||||||
}
|
|
||||||
if (stats.other > 0) {
|
if (stats.other > 0) {
|
||||||
blocks.push(`${stats.other} other`);
|
blocks.push(`${stats.other} other`);
|
||||||
}
|
}
|
||||||
@@ -287,8 +261,6 @@ export async function reportIssues(
|
|||||||
for (const warning of warnings) {
|
for (const warning of warnings) {
|
||||||
let advisory: interfaces.Advisory;
|
let advisory: interfaces.Advisory;
|
||||||
switch (warning.kind) {
|
switch (warning.kind) {
|
||||||
case 'unsound':
|
|
||||||
case 'notice':
|
|
||||||
case 'unmaintained':
|
case 'unmaintained':
|
||||||
case 'informational':
|
case 'informational':
|
||||||
advisory = warning.advisory;
|
advisory = warning.advisory;
|
||||||
|
|||||||
Reference in New Issue
Block a user