Skip to content

Commit

Permalink
chore: add missing VulnRule type
Browse files Browse the repository at this point in the history
  • Loading branch information
agatakrajewska committed Sep 3, 2024
1 parent e8d256d commit 6685a34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/display-policy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import chalk from 'chalk';
import { demunge, Policy } from 'snyk-policy';
import { demunge, Policy, VulnRules } from 'snyk-policy';
import config from './config';

export async function display(policy: Policy): Promise<string> {
Expand Down Expand Up @@ -27,8 +27,8 @@ export async function display(policy: Policy): Promise<string> {

return Promise.resolve(res);
}

function displayRule(title: string): (rule: any, i: number) => string {
// id url paths, path reason expires
function displayRule(title: string): (rule: VulnRules, i: number) => string {
return (rule, i) => {
i += 1;

Expand All @@ -49,7 +49,7 @@ function displayRule(title: string): (rule: any, i: number) => string {
? '\nReason: ' +
p.reason +
'\nExpires: ' +
p.expires.toUTCString() +
p.expires?.toUTCString() +
'\n'
: '') +
'\n'
Expand Down

0 comments on commit 6685a34

Please sign in to comment.