Skip to content

Commit c12d162

Browse files
Merge pull request #2 from pzi/master
Don't use undefined as variable name
2 parents 745c13f + 0083763 commit c12d162

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const main = async () => {
2626
failThreshold !== 'low' &&
2727
failThreshold !== 'informational'
2828
) {
29-
throw new Error('failThreshold input value is invalid')
29+
throw new Error('fail_threshold input value is invalid')
3030
}
3131
core.debug(`Repository:${repository}, Tag:${tag}`)
3232
const ECR = new AWS.ECR()
@@ -67,22 +67,22 @@ const main = async () => {
6767
const medium = counts.MEDIUM || 0
6868
const low = counts.LOW || 0
6969
const informational = counts.INFORMATIONAL || 0
70-
const undefined = counts.UNDEFINED || 0
71-
const total = critical + high + medium + low + informational + undefined
70+
const indeterminate = counts.UNDEFINED || 0
71+
const total = critical + high + medium + low + informational + indeterminate
7272
core.setOutput('critical', critical.toString())
7373
core.setOutput('high', high.toString())
7474
core.setOutput('medium', medium.toString())
7575
core.setOutput('low', low.toString())
7676
core.setOutput('informational', informational.toString())
77-
core.setOutput('undefined', undefined.toString())
77+
core.setOutput('undefined', indeterminate.toString())
7878
core.setOutput('total', total.toString())
7979
console.log('Vulnerabilities found:')
8080
console.log(`${critical.toString().padStart(3, ' ')} Critical`)
8181
console.log(`${high.toString().padStart(3, ' ')} High`)
8282
console.log(`${medium.toString().padStart(3, ' ')} Medium`)
8383
console.log(`${low.toString().padStart(3, ' ')} Low`)
8484
console.log(`${informational.toString().padStart(3, ' ')} Informational`)
85-
console.log(`${undefined.toString().padStart(3, ' ')} Undefined`)
85+
console.log(`${indeterminate.toString().padStart(3, ' ')} Undefined`)
8686
console.log('=================')
8787
console.log(`${total.toString().padStart(3, ' ')} Total`)
8888

0 commit comments

Comments
 (0)