fix(trivy): remove unsupported --no-progress flag from trivy config (#718)

The `trivy config` subcommand does not accept `--no-progress`; the flag
exists only on `trivy image`. Every stack configuration scan therefore
failed with `FATAL Fatal error unknown flag: --no-progress`, and the
"Scan configuration" action on the stack details page has been
non-functional since it shipped.

Removing the flag is the complete fix. `trivy config` is silent by
default, so the flag was redundant even if it had been accepted.

A new Vitest spec pins the exact argument vector
(`['config', '--format', 'json', '--quiet', <stackPath>]`) so a future
edit cannot reintroduce the bug, and exercises the success path end to
end: status transitions to `completed`, misconfig severities tally
correctly, and `highest_severity` rolls up to the worst finding.
This commit is contained in:
Anso
2026-04-20 23:14:23 -04:00
committed by GitHub
parent 3e1fb76bd0
commit aa10db1d09
2 changed files with 226 additions and 1 deletions
+1 -1
View File
@@ -806,7 +806,7 @@ class TrivyService {
try {
const { env, cleanup } = await this.buildEnv();
try {
const args = ['config', '--format', 'json', '--quiet', '--no-progress', resolved];
const args = ['config', '--format', 'json', '--quiet', resolved];
const { stdout } = await execFileAsync(binary, args, {
env,
timeout: SCAN_TIMEOUT_MS,