@@ -146,7 +146,7 @@ async function run(): Promise<void> {
146
146
if ( config . vulnerability_check ) {
147
147
core . setOutput ( 'vulnerable-changes' , JSON . stringify ( vulnerableChanges ) )
148
148
summary . addChangeVulnerabilitiesToSummary ( vulnerableChanges , minSeverity )
149
- issueFound ||= printVulnerabilitiesBlock (
149
+ issueFound ||= await printVulnerabilitiesBlock (
150
150
vulnerableChanges ,
151
151
minSeverity ,
152
152
warnOnly
@@ -158,12 +158,12 @@ async function run(): Promise<void> {
158
158
JSON . stringify ( invalidLicenseChanges )
159
159
)
160
160
summary . addLicensesToSummary ( invalidLicenseChanges , config )
161
- issueFound ||= printLicensesBlock ( invalidLicenseChanges , warnOnly )
161
+ issueFound ||= await printLicensesBlock ( invalidLicenseChanges , warnOnly )
162
162
}
163
163
if ( config . deny_packages || config . deny_groups ) {
164
164
core . setOutput ( 'denied-changes' , JSON . stringify ( deniedChanges ) )
165
165
summary . addDeniedToSummary ( deniedChanges )
166
- issueFound ||= printDeniedDependencies ( deniedChanges , config )
166
+ issueFound ||= await printDeniedDependencies ( deniedChanges , config )
167
167
}
168
168
if ( config . show_openssf_scorecard ) {
169
169
summary . addScorecardToSummary ( scorecard , config )
@@ -214,9 +214,10 @@ function printVulnerabilitiesBlock(
214
214
addedChanges : Changes ,
215
215
minSeverity : Severity ,
216
216
warnOnly : boolean
217
- ) : boolean {
218
- let vulFound = false
219
- core . group ( 'Vulnerabilities' , async ( ) => {
217
+ ) : Promise < boolean > {
218
+ return core . group ( 'Vulnerabilities' , async ( ) => {
219
+ let vulFound = false
220
+
220
221
for ( const change of addedChanges ) {
221
222
vulFound ||= printChangeVulnerabilities ( change )
222
223
}
@@ -233,8 +234,9 @@ function printVulnerabilitiesBlock(
233
234
`Dependency review did not detect any vulnerable packages with severity level "${ minSeverity } " or higher.`
234
235
)
235
236
}
237
+
238
+ return vulFound
236
239
} )
237
- return vulFound
238
240
}
239
241
240
242
function printChangeVulnerabilities ( change : Change ) : boolean {
@@ -254,9 +256,10 @@ function printChangeVulnerabilities(change: Change): boolean {
254
256
function printLicensesBlock (
255
257
invalidLicenseChanges : Record < string , Changes > ,
256
258
warnOnly : boolean
257
- ) : boolean {
258
- let issueFound = false
259
- core . group ( 'Licenses' , async ( ) => {
259
+ ) : Promise < boolean > {
260
+ return core . group ( 'Licenses' , async ( ) => {
261
+ let issueFound = false
262
+
260
263
if ( invalidLicenseChanges . forbidden . length > 0 ) {
261
264
issueFound = true
262
265
core . info ( '\nThe following dependencies have incompatible licenses:' )
@@ -279,8 +282,9 @@ function printLicensesBlock(
279
282
)
280
283
}
281
284
printNullLicenses ( invalidLicenseChanges . unlicensed )
285
+
286
+ return issueFound
282
287
} )
283
- return issueFound
284
288
}
285
289
286
290
function printLicensesError ( changes : Changes ) : void {
@@ -382,9 +386,10 @@ function printScannedDependencies(changes: Changes): void {
382
386
function printDeniedDependencies (
383
387
changes : Changes ,
384
388
config : ConfigurationOptions
385
- ) : boolean {
386
- let issueFound = false
387
- core . group ( 'Denied' , async ( ) => {
389
+ ) : Promise < boolean > {
390
+ return core . group ( 'Denied' , async ( ) => {
391
+ let issueFound = false
392
+
388
393
for ( const denied of config . deny_packages ) {
389
394
core . info ( `Config: ${ denied } ` )
390
395
}
@@ -400,8 +405,9 @@ function printDeniedDependencies(
400
405
} else {
401
406
core . info ( 'Dependency review did not detect any denied packages' )
402
407
}
408
+
409
+ return issueFound
403
410
} )
404
- return issueFound
405
411
}
406
412
407
413
function getScorecardChanges ( changes : Changes ) : Changes {
0 commit comments