adding dist
This commit is contained in:
18
dist/index.js
generated
vendored
18
dist/index.js
generated
vendored
@@ -217,7 +217,7 @@ function run() {
|
||||
});
|
||||
const minSeverity = config.fail_on_severity;
|
||||
const scopedChanges = (0, filter_1.filterChangesByScopes)(config.fail_on_scopes, changes);
|
||||
const filteredChanges = (0, filter_1.filterOutAllowedAdvisories)(config.allow_ghsas, scopedChanges);
|
||||
const filteredChanges = (0, filter_1.filterAllowedAdvisories)(config.allow_ghsas, scopedChanges);
|
||||
const addedChanges = (0, filter_1.filterChangesBySeverity)(minSeverity, filteredChanges).filter(change => change.change_type === 'added' &&
|
||||
change.vulnerabilities !== undefined &&
|
||||
change.vulnerabilities.length > 0);
|
||||
@@ -15118,7 +15118,7 @@ exports.readConfigFile = readConfigFile;
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.filterOutAllowedAdvisories = exports.filterChangesByScopes = exports.filterChangesBySeverity = void 0;
|
||||
exports.filterAllowedAdvisories = exports.filterChangesByScopes = exports.filterChangesBySeverity = void 0;
|
||||
const schemas_1 = __nccwpck_require__(1129);
|
||||
function filterChangesBySeverity(severity, changes) {
|
||||
const severityIdx = schemas_1.SEVERITIES.indexOf(severity);
|
||||
@@ -15154,9 +15154,17 @@ function filterChangesByScopes(scopes, changes) {
|
||||
return filteredChanges;
|
||||
}
|
||||
exports.filterChangesByScopes = filterChangesByScopes;
|
||||
function filterOutAllowedAdvisories(ghsas, changes) {
|
||||
/**
|
||||
* Filter out changes that are allowed by the allow_ghsas config
|
||||
* option. We want to remove these changes before we do any
|
||||
* processing.
|
||||
* @param ghsas - list of GHSA IDs to allow
|
||||
* @param changes - list of changes to filter
|
||||
* @returns a list of changes with the allowed GHSAs removed
|
||||
*/
|
||||
function filterAllowedAdvisories(ghsas, changes) {
|
||||
if (ghsas === undefined) {
|
||||
return [];
|
||||
return changes;
|
||||
}
|
||||
const filteredChanges = changes.filter(change => {
|
||||
const noAdvisories = change.vulnerabilities === undefined ||
|
||||
@@ -15177,7 +15185,7 @@ function filterOutAllowedAdvisories(ghsas, changes) {
|
||||
});
|
||||
return filteredChanges;
|
||||
}
|
||||
exports.filterOutAllowedAdvisories = filterOutAllowedAdvisories;
|
||||
exports.filterAllowedAdvisories = filterAllowedAdvisories;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user