Skip to content

fix:allow golang tip image detection regex pattern#3757

Merged
wagoodman merged 5 commits into
anchore:mainfrom
VictorHuu:golang-tip-detection
Apr 21, 2025
Merged

fix:allow golang tip image detection regex pattern#3757
wagoodman merged 5 commits into
anchore:mainfrom
VictorHuu:golang-tip-detection

Conversation

@VictorHuu
Copy link
Copy Markdown
Contributor

@VictorHuu VictorHuu commented Mar 24, 2025

Description

This PR fixes an issue with the binary classifier for go-binary-hint, which currently fails to detect development version like go1.25-d524e1e under bin/go not VERSION file.

The fix adds a new classifier go-binary-hint-dev to accommodate the unreleased golang images since the FileGlob only support one pattern and updates the regex to make it compatible with the tip images.

Now, it works :

$ syft -q golang:tip | grep ^go
go                         1.25-38d146d                    binary

Fixed #3681

Type of change

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

@VictorHuu VictorHuu changed the title fix: improve fluent-bit binary detection regex pattern fix:allow golang tip image detection regex pattern Mar 24, 2025
… to make it compatible with golang tip images

Signed-off-by: Victor Hu <victorhu493@gmail.com>
Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
…orresponding unit tests

Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
@VictorHuu VictorHuu force-pushed the golang-tip-detection branch from 926b516 to 0fb4cb6 Compare March 24, 2025 09:53
Comment thread syft/pkg/cataloger/binary/classifiers.go Outdated
Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
Signed-off-by: Yuntao Hu <victorhu493@gmail.com>
@VictorHuu VictorHuu requested a review from kzantow April 5, 2025 08:22
@wagoodman wagoodman merged commit ab57049 into anchore:main Apr 21, 2025
11 checks passed
@VictorHuu VictorHuu deleted the golang-tip-detection branch April 26, 2025 12:24
spiffcs added a commit that referenced this pull request Apr 29, 2025
* main: (150 commits)
  fix the fluent-bit regex detection pattern (#3817)
  chore(deps): bump anchore/sbom-action from 0.18.0 to 0.19.0 (#3832)
  chore(deps): update tools to latest versions (#3830)
  Resolve owned file paths when searching for overlaps (#3828)
  chore(deps): update anchore dependencies (#3827)
  fix: Make the fileresolver Support Prefix Match of Files (#3820)
  Add support for detecting javascript assets in .NET projects using libman (#3825)
  chore(deps): update tools to latest versions (#3823)
  (feat): support skipping archive extraction with file source (#3795)
  Consider DLL claims for dependencies of .NET packages from deps.json (#3822)
  PE cataloger should consider compile target paths from deps.json (#3821)
  Perf: skip license scanner injection (#3796)
  chore(deps): bump sigstore/cosign-installer from 3.8.1 to 3.8.2 (#3818)
  chore(deps): bump github/codeql-action from 3.28.15 to 3.28.16 (#3819)
  chore(deps): update tools to latest versions (#3815)
  docs: document test commands (#3816)
  Support detection of Chrome binaries (#3136)
  fix:allow golang tip image detection regex pattern (#3757)
  fix:Make the parse of the replace part in ```go.mod``` more compliant and traceable (#3812)
  (fix): delete collection name/type key entries when empty (#3797)
  ...

Signed-off-by: Christopher Phillips <32073428+spiffcs@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.

Support golang tip image

3 participants