Skip to content

Commit

Permalink
fix: add double quote around curl args
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelgautier committed Oct 5, 2024
1 parent bfa1826 commit 8420c95
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ function getCommonArgs() {

const rateLimit = getInput('rateLimit')
if (rateLimit) {
commonArgs.push(`--rate-limit=${rateLimit}`)
commonArgs.push(`--rate-limit="${rateLimit}"`)
}

const scans = getInput('scans')
if (scans) {
commonArgs.push(`--scans=${scans}`)
commonArgs.push(`--scans="${scans}"`)
}

const excludeScans = getInput('excludeScans')
if (excludeScans) {
commonArgs.push(`--exclude-scans=${excludeScans}`)
commonArgs.push(`--exclude-scans="${excludeScans}"`)
}

const proxy = getInput('proxy')
if (proxy) {
commonArgs.push(`--proxy=${proxy}`)
commonArgs.push(`--proxy="${proxy}"`)
}

const severityThreshold = getInput('severityThreshold')
Expand Down Expand Up @@ -70,10 +70,10 @@ async function run() {
const args = getArgsFromInput(curl.replace('curl ', ''))

debug(`Running vulnapi scan with curl: ${JSON.stringify(args)}`)
await exec('vulnapi scan curl', [...args, ...commonArgs])
await exec('vulnapi', ['scan', 'curl', ...args, ...commonArgs])
} else if (openapi) {
debug(`Running vulnapi scan with openapi: ${openapi}`)
await exec('vulnapi scan openapi', [openapi, ...commonArgs])
await exec('vulnapi', ['scan', 'openapi', openapi, ...commonArgs])
} else {
setFailed('You must provide curl or openapi input')
}
Expand Down

0 comments on commit 8420c95

Please sign in to comment.