Skip to content

Commit

Permalink
Create consul binary classifier
Browse files Browse the repository at this point in the history
Closes anchore#1590

Signed-off-by: Shane Dell <shanedell100@gmail.com>
  • Loading branch information
shanedell committed Apr 14, 2023
1 parent 5d156b8 commit 5466705
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions syft/pkg/cataloger/binary/default_classifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,15 @@ var defaultClassifiers = []classifier{
PURL: mustPURL("pkg:generic/ruby@version"),
CPEs: singleCPE("cpe:2.3:a:ruby-lang:ruby:*:*:*:*:*:*:*:*"),
},
{
Class: "consul-binary",
FileGlob: "**/consul",
EvidenceMatcher: fileContentsVersionMatcher(
`(?m)consul(?P<version>[0-9]+\.[0-9]+(\.[0-9]+|beta[0-9]+|alpha[0-9]+|rc[0-9]+)?)\x00`),
Package: "consul",
PURL: mustPURL("pkg:golang/github.com/hashicorp/consul@version"),
CPEs: singleCPE("cpe:2.3:a:hashicorp:consul:*:*:*:*:*:*:*:*"),
},
}

// in both binaries and shared libraries, the version pattern is [NUL]3.11.2[NUL]
Expand Down

0 comments on commit 5466705

Please sign in to comment.