GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add option to specify one or more grype config files by sam-super · Pull Request #589 · anchore/scan-action

Conversation

@sam-super

@sam-super sam-super commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Fixes: #217

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sam-super
feat: add option to specify one or more grype config files
373e863
Signed-off-by: Sam Adams <[email protected]>
@sam-super
sam-super force-pushed the feat/specify-configs branch from aa7bf45 to 373e863 Compare January 30, 2026 15:27
@sam-super

sam-super commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

Similar PR that didn't make it:
#427

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-super
chore: Add config-file entry to README.md
9f0f43c
Signed-off-by: Sam Adams <[email protected]>
@kzantow

kzantow commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Hi @sam-super, I should note there are currently 2 ways to use Grype configuration in scan action:

  • pass grype environment variables e.g. the env: key with GRYPE_ENV_VAR=... or even: GRYPE_CONFIG=<path-to-config>
  • place a config file in a standard location, e.g. <repo-root>/.grype.yaml

While I'm not necessarily opposed to specifying a grype configuration file, I think a small part of the issue is that there is a mismatch between some of the configuration for the scan action and grype itself. But sbom-action does support a config file, so if we accept this it would need to use the same options

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-super

sam-super commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @kzantow,

For context we have a global grype config file and a local one, and currently we can't use both at the same time (which is the desired state). I originally tried passing GRYPE_CONFIG=one.yaml,two.yaml but it didn't work.

The individual grype env vars are unmaintainable as we are largely using this for ignores (which are a bit too complex).

So our only real option left is to merge the two configs ourselves (and then replace .grype.yaml with the merged one), but this seems unnecessary and error prone, considering grype cli already has the logic to handle multiple files.

I confess i don't really understand why the sbom-action inputs needs to be aligned with scan-action, unless it's just for consistency?
Either way i'm happy to change the name of the input to config if that is the issue?

Thanks for responding!

Hi @sam-super, I should note there are currently 2 ways to use Grype configuration in scan action:

* pass grype environment variables e.g. the `env:` key with `GRYPE_ENV_VAR=...` or even: `GRYPE_CONFIG=<path-to-config>`

* place a config file in a standard location, e.g. `<repo-root>/.grype.yaml`

While I'm not necessarily opposed to specifying a grype configuration file, I think a small part of the issue is that there is a mismatch between some of the configuration for the scan action and grype itself. But sbom-action does support a config file, so if we accept this it would need to use the same options

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-super
feat: change name of config input
907382b
Signed-off-by: Sam Adams <[email protected]>
@sam-super
sam-super force-pushed the feat/specify-configs branch from d57b36e to 907382b Compare February 3, 2026 10:15
@sam-super

sam-super commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

FWIW have changed to config to match anyway: 907382b

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kzantow
kzantow approved these changes Feb 4, 2026
View reviewed changes

@kzantow kzantow left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @sam-super

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kzantow
kzantow merged commit e573fa1 into anchore:main Feb 4, 2026
31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@sam-super

sam-super commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @kzantow !

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

spiffcs added a commit to pen-pal/scan-action that referenced this pull request Feb 4, 2026
@spiffcs
Merge branch 'main' into patch-1
43467f6
* main: (21 commits)
  chore(deps): bump @actions/cache from 5.0.3 to 5.0.5 (anchore#592)
  chore(deps): bump @actions/tool-cache from 3.0.0 to 3.0.1 (anchore#593)
  chore(deps): update Grype to v0.107.1 (anchore#594)
  feat: add option to specify one or more grype config files (anchore#589)
  chore(deps): bump fast-xml-parser from 5.3.3 to 5.3.4 (anchore#590)
  chore(deps): bump release-drafter/release-drafter from 6.1.0 to 6.2.0 (anchore#587)
  chore(deps): update Grype to v0.107.0 (anchore#588)
  chore(deps-dev): bump prettier from 3.8.0 to 3.8.1 (anchore#584)
  chore(deps): bump peter-evans/create-pull-request from 8.0.0 to 8.1.0 (anchore#585)
  chore(deps-dev): bump tar from 7.5.6 to 7.5.7 (anchore#586)
  chore(deps): update Grype to v0.106.0 (anchore#583)
  chore(deps): bump zizmorcore/zizmor-action from 0.3.0 to 0.4.1 (anchore#582)
  chore(deps): bump actions/checkout from 6.0.1 to 6.0.2 (anchore#581)
  chore(deps): bump lodash from 4.17.21 to 4.17.23 (anchore#580)
  chore: tweak release drafter author and husky (anchore#579)
  chore: update release drafter permissions (anchore#578)
  chore: update release drafter to include appropriate dependencies (anchore#577)
  chore(deps): bump @actions/tool-cache from 2.0.2 to 3.0.0 (anchore#567)
  chore(deps): bump @actions/cache from 5.0.1 to 5.0.2 (anchore#568)
  chore(deps): bump @actions/core from 2.0.1 to 2.0.2 (anchore#569)
  ...

Signed-off-by: Christopher Phillips <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request Aug 2, 2026
The last 3 CVE alerts close, and a hidden click vulnerability stops hiding (WOR-852) oblangatas/worthless#473
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kzantow kzantow kzantow approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add config as an option

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@sam-super @kzantow
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.