Skip to content

Commit

Permalink
fix: Update node binary package name (anchore#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzantow authored Nov 30, 2022
1 parent 08b0c9a commit 5f1c25f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions syft/pkg/cataloger/binary/cataloger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ func TestClassifierCataloger_DefaultClassifiers_PositiveCases(t *testing.T) {
},
},
},
{
name: "positive-node",
fixtureDir: "test-fixtures/classifiers/positive",
expected: pkg.Package{
Name: "node",
Version: "19.2.1",
Locations: singleLocation("node"),
Metadata: pkg.BinaryMetadata{
Classifier: "nodejs-binary",
},
},
},
{
name: "positive-go-hint",
fixtureDir: "test-fixtures/classifiers/positive",
Expand Down
2 changes: 1 addition & 1 deletion syft/pkg/cataloger/binary/default_classifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var defaultClassifiers = []classifier{
FileGlob: "**/node",
EvidenceMatcher: fileContentsVersionMatcher(
`(?m)node\.js\/v(?P<version>[0-9]+\.[0-9]+\.[0-9]+)`),
Package: "node.js",
Package: "node",
Language: pkg.JavaScript,
PURL: mustPURL("pkg:generic/node@version"),
CPEs: singleCPE("cpe:2.3:a:nodejs:node.js:*:*:*:*:*:*:*:*"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# this should match node 19.2.1
node.js/v19.2.1

0 comments on commit 5f1c25f

Please sign in to comment.