Document the behavior of the GHSA filtering function.
This commit is contained in:
@@ -51,7 +51,12 @@ export function filterChangesByScopes(
|
||||
return filteredChanges
|
||||
}
|
||||
|
||||
export function filterOutAllowedAdvisories(
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
export function removeAllowedAdvisories(
|
||||
ghsas: string[] | undefined,
|
||||
changes: Changes
|
||||
): Changes {
|
||||
|
||||
@@ -8,7 +8,7 @@ import {readConfig} from '../src/config'
|
||||
import {
|
||||
filterChangesBySeverity,
|
||||
filterChangesByScopes,
|
||||
filterOutAllowedAdvisories
|
||||
removeAllowedAdvisories
|
||||
} from '../src/filter'
|
||||
import {getDeniedLicenseChanges} from './licenses'
|
||||
import * as summary from './summary'
|
||||
@@ -30,7 +30,7 @@ async function run(): Promise<void> {
|
||||
|
||||
const minSeverity = config.fail_on_severity as Severity
|
||||
const scopedChanges = filterChangesByScopes(config.fail_on_scopes, changes)
|
||||
const filteredChanges = filterOutAllowedAdvisories(
|
||||
const filteredChanges = removeAllowedAdvisories(
|
||||
config.allow_ghsas,
|
||||
scopedChanges
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user