Skip to content

fix: respect Grype fail-on-severity configuration - #727

Open
ychampion wants to merge 1 commit into
anchore:mainfrom
ychampion:fix-respect-grype-fail-on-config
Open

fix: respect Grype fail-on-severity configuration#727
ychampion wants to merge 1 commit into
anchore:mainfrom
ychampion:fix-respect-grype-fail-on-config

Conversation

@ychampion

Copy link
Copy Markdown

Summary

  • use Grype's effective fail-on-severity when the action input is unset
  • preserve the existing medium fallback and compatibility with older Grype releases

Why

The action currently passes --fail-on medium even when severity-cutoff is omitted, overriding the value from .grype.yaml or another Grype config file. Fixes #674.

Validation

  • npx --yes node@24 --test --experimental-test-module-mocks --conditions=import --test-timeout=90000 --test-concurrency=1 tests/grype_command.test.js — 12 passed
  • npm run lint — passed
  • npx prettier --check '*.js' 'tests/*.js' — passed
  • npm run build — passed
  • npm run run-tests — 31 tests passed together; the two image-heavy SARIF fixtures then passed individually with the same pinned database

Constraint: Preserve the existing medium fallback when neither the action input nor Grype config sets a cutoff.
Confidence: high
Scope-risk: narrow
Tested: Node 24 command tests; repository test set; lint; format; build
Signed-off-by: ychampion <ychampion@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An unset severity-cutoff should default to the value of fail-on-severity if there is a configuration

1 participant