Skip to content

Commit

Permalink
feat: support sev.threshold for unm.-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dekelund committed Nov 28, 2022
1 parent e01c853 commit cc329fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/ecosystems/resolve-test-facts.ts
Expand Up @@ -31,6 +31,7 @@ import {
getSelf,
} from './unmanaged/utils';
import { sleep } from '../common';
import { SEVERITY } from '../snyk-test/common';

export async function resolveAndTestFacts(
ecosystem: Ecosystem,
Expand Down Expand Up @@ -91,13 +92,15 @@ async function fetchIssues(
start_time,
dep_graph_data,
component_details,
target_severity: SEVERITY,
orgId: string,
) {
const response: GetIssuesResponse = await getIssues(
{
dep_graph: dep_graph_data,
start_time,
component_details,
target_severity,
},
orgId,
);
Expand Down Expand Up @@ -148,6 +151,7 @@ export async function resolveAndTestFactsUnmanagedDeps(
const displayTargetFile = '';

let orgId = options.org || '';
const target_severity: SEVERITY = options.severityThreshold || SEVERITY.LOW;

if (orgId === '') {
const self = await getSelf();
Expand Down Expand Up @@ -181,6 +185,7 @@ export async function resolveAndTestFactsUnmanagedDeps(
start_time,
dep_graph_data,
component_details,
target_severity,
orgId,
);

Expand Down
1 change: 1 addition & 0 deletions src/lib/ecosystems/unmanaged/types.ts
Expand Up @@ -163,6 +163,7 @@ export interface IssuesRequestAttributes {
start_time: number;
dep_graph: IssuesRequestDepGraphDataOpenAPI;
component_details: IssuesRequestComponentDetails;
target_severity: SEVERITY;
}

export interface Data {
Expand Down

0 comments on commit cc329fd

Please sign in to comment.