adding dist
This commit is contained in:
+13
-5
@@ -217,7 +217,7 @@ function run() {
|
|||||||
});
|
});
|
||||||
const minSeverity = config.fail_on_severity;
|
const minSeverity = config.fail_on_severity;
|
||||||
const scopedChanges = (0, filter_1.filterChangesByScopes)(config.fail_on_scopes, changes);
|
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' &&
|
const addedChanges = (0, filter_1.filterChangesBySeverity)(minSeverity, filteredChanges).filter(change => change.change_type === 'added' &&
|
||||||
change.vulnerabilities !== undefined &&
|
change.vulnerabilities !== undefined &&
|
||||||
change.vulnerabilities.length > 0);
|
change.vulnerabilities.length > 0);
|
||||||
@@ -15118,7 +15118,7 @@ exports.readConfigFile = readConfigFile;
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
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);
|
const schemas_1 = __nccwpck_require__(1129);
|
||||||
function filterChangesBySeverity(severity, changes) {
|
function filterChangesBySeverity(severity, changes) {
|
||||||
const severityIdx = schemas_1.SEVERITIES.indexOf(severity);
|
const severityIdx = schemas_1.SEVERITIES.indexOf(severity);
|
||||||
@@ -15154,9 +15154,17 @@ function filterChangesByScopes(scopes, changes) {
|
|||||||
return filteredChanges;
|
return filteredChanges;
|
||||||
}
|
}
|
||||||
exports.filterChangesByScopes = filterChangesByScopes;
|
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) {
|
if (ghsas === undefined) {
|
||||||
return [];
|
return changes;
|
||||||
}
|
}
|
||||||
const filteredChanges = changes.filter(change => {
|
const filteredChanges = changes.filter(change => {
|
||||||
const noAdvisories = change.vulnerabilities === undefined ||
|
const noAdvisories = change.vulnerabilities === undefined ||
|
||||||
@@ -15177,7 +15185,7 @@ function filterOutAllowedAdvisories(ghsas, changes) {
|
|||||||
});
|
});
|
||||||
return filteredChanges;
|
return filteredChanges;
|
||||||
}
|
}
|
||||||
exports.filterOutAllowedAdvisories = filterOutAllowedAdvisories;
|
exports.filterAllowedAdvisories = filterAllowedAdvisories;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user