Skip to content

Filter

Source: src/AWS/Inspector2/Filter.ts

An Amazon Inspector findings filter — matches findings against criteria and either keeps them visible (NONE, a saved view) or suppresses them (SUPPRESS, a suppression rule). Everything is updatable in place; the filter’s identity is its ARN.

Suppress informational findings

const filter = yield* AWS.Inspector2.Filter("SuppressInfo", {
action: "SUPPRESS",
reason: "Informational findings are tracked elsewhere",
filterCriteria: {
severity: [{ comparison: "EQUALS", value: "INFORMATIONAL" }],
},
});

Saved view of one repository’s findings

const filter = yield* AWS.Inspector2.Filter("RepoView", {
name: "payments-repository",
action: "NONE",
filterCriteria: {
ecrImageRepositoryName: [{ comparison: "EQUALS", value: "payments" }],
},
});