Skip to content

Commit cc329fd

Browse files
author
Daniel Ekelund
committed
feat: support sev.threshold for unm.-deps
1 parent e01c853 commit cc329fd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/lib/ecosystems/resolve-test-facts.ts

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
getSelf,
3232
} from './unmanaged/utils';
3333
import { sleep } from '../common';
34+
import { SEVERITY } from '../snyk-test/common';
3435

3536
export async function resolveAndTestFacts(
3637
ecosystem: Ecosystem,
@@ -91,13 +92,15 @@ async function fetchIssues(
9192
start_time,
9293
dep_graph_data,
9394
component_details,
95+
target_severity: SEVERITY,
9496
orgId: string,
9597
) {
9698
const response: GetIssuesResponse = await getIssues(
9799
{
98100
dep_graph: dep_graph_data,
99101
start_time,
100102
component_details,
103+
target_severity,
101104
},
102105
orgId,
103106
);
@@ -148,6 +151,7 @@ export async function resolveAndTestFactsUnmanagedDeps(
148151
const displayTargetFile = '';
149152

150153
let orgId = options.org || '';
154+
const target_severity: SEVERITY = options.severityThreshold || SEVERITY.LOW;
151155

152156
if (orgId === '') {
153157
const self = await getSelf();
@@ -181,6 +185,7 @@ export async function resolveAndTestFactsUnmanagedDeps(
181185
start_time,
182186
dep_graph_data,
183187
component_details,
188+
target_severity,
184189
orgId,
185190
);
186191

src/lib/ecosystems/unmanaged/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export interface IssuesRequestAttributes {
163163
start_time: number;
164164
dep_graph: IssuesRequestDepGraphDataOpenAPI;
165165
component_details: IssuesRequestComponentDetails;
166+
target_severity: SEVERITY;
166167
}
167168

168169
export interface Data {

0 commit comments

Comments
 (0)