Compare commits

..

7 Commits

4 changed files with 18 additions and 7 deletions

View File

@@ -27617,15 +27617,19 @@ async function runScoutCommand(commands, image, format, outputFile) {
core.setOutput('result-file', resultPath);
for (const cmd of commands) {
const args = ['scout', cmd, image];
if (cmd == 'cves') {
args.push('--format', format);
}
if (outputFile) {
const res = await exec.getExecOutput('docker', ['scout', cmd, image, '--format', format], { silent: true });
const res = await exec.getExecOutput('docker', args, { silent: true });
if (res.stderr && res.stderr.length > 0) {
throw new Error(res.stderr);
}
fs.appendFile(resultPath, res.stdout);
} else {
await exec.exec('docker', ['scout', cmd, image, '--format', format]);
await exec.exec('docker', args);
}
}
return resultPath;

View File

@@ -5,7 +5,7 @@
"main": "index.js",
"dependencies": {
"tunnel": "^0.0.6",
"undici": "^5.29.0"
"undici": "^8.0.0"
},
"devDependencies": {},
"scripts": {

View File

@@ -60,15 +60,19 @@ async function runScoutCommand(commands, image, format, outputFile) {
core.setOutput('result-file', resultPath);
for (const cmd of commands) {
const args = ['scout', cmd, image];
if (cmd == 'cves') {
args.push('--format', format);
}
if (outputFile) {
const res = await exec.getExecOutput('docker', ['scout', cmd, image, '--format', format], { silent: true });
const res = await exec.getExecOutput('docker', args, { silent: true });
if (res.stderr && res.stderr.length > 0) {
throw new Error(res.stderr);
}
fs.appendFile(resultPath, res.stdout);
} else {
await exec.exec('docker', ['scout', cmd, image, '--format', format]);
await exec.exec('docker', args);
}
}
return resultPath;

3
renovate.json Normal file
View File

@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}