diff --git a/syft/pkg/cataloger/binary/cataloger_test.go b/syft/pkg/cataloger/binary/cataloger_test.go index 3270f5d2f35d..9b63f9a5a3c8 100644 --- a/syft/pkg/cataloger/binary/cataloger_test.go +++ b/syft/pkg/cataloger/binary/cataloger_test.go @@ -239,6 +239,114 @@ func Test_Cataloger_DefaultClassifiers_PositiveCases(t *testing.T) { Metadata: metadata("redis-binary"), }, }, + { + name: "positive-argocd-2.5.11", + fixtureDir: "test-fixtures/classifiers/positive/argocd-2.5.11", + expected: pkg.Package{ + Name: "argocd", + Version: "2.5.11", + Type: "binary", + PURL: "pkg:golang/argocd@2.5.11", + Locations: locations("argocd"), + Metadata: metadata("argocd"), + }, + }, + { + name: "positive-argocd-2.6.4", + fixtureDir: "test-fixtures/classifiers/positive/argocd-2.6.4", + expected: pkg.Package{ + Name: "argocd", + Version: "2.6.4", + Type: "binary", + PURL: "pkg:golang/argocd@2.6.4", + Locations: locations("argocd"), + Metadata: metadata("argocd"), + }, + }, + { + name: "positive-helm-2.16.10", + fixtureDir: "test-fixtures/classifiers/positive/helm-2.16.10", + expected: pkg.Package{ + Name: "helm", + Version: "2.16.10", + Type: "binary", + PURL: "pkg:golang/helm@2.16.10", + Locations: locations("helm"), + Metadata: metadata("helm"), + }, + }, + { + name: "positive-helm-3.10.3", + fixtureDir: "test-fixtures/classifiers/positive/helm-3.10.3", + expected: pkg.Package{ + Name: "helm", + Version: "3.10.3", + Type: "binary", + PURL: "pkg:golang/helm@3.10.3", + Locations: locations("helm"), + Metadata: metadata("helm"), + }, + }, + { + name: "positive-kubectl-1.24.11", + fixtureDir: "test-fixtures/classifiers/positive/kubectl-1.24.11", + expected: pkg.Package{ + Name: "kubectl", + Version: "1.24.11", + Type: "binary", + PURL: "pkg:golang/kubectl@1.24.11", + Locations: locations("kubectl"), + Metadata: metadata("kubectl"), + }, + }, + { + name: "positive-kubectl-1.25.7", + fixtureDir: "test-fixtures/classifiers/positive/kubectl-1.25.7", + expected: pkg.Package{ + Name: "kubectl", + Version: "1.25.7", + Type: "binary", + PURL: "pkg:golang/kubectl@1.25.7", + Locations: locations("kubectl"), + Metadata: metadata("kubectl"), + }, + }, + { + name: "positive-kubectl-1.26.2", + fixtureDir: "test-fixtures/classifiers/positive/kubectl-1.26.2", + expected: pkg.Package{ + Name: "kubectl", + Version: "1.26.2", + Type: "binary", + PURL: "pkg:golang/kubectl@1.26.2", + Locations: locations("kubectl"), + Metadata: metadata("kubectl"), + }, + }, + { + name: "positive-kustomize-4.5.7", + fixtureDir: "test-fixtures/classifiers/positive/kustomize-4.5.7", + expected: pkg.Package{ + Name: "kustomize", + Version: "4.5.7", + Type: "binary", + PURL: "pkg:golang/kustomize@4.5.7", + Locations: locations("kustomize"), + Metadata: metadata("kustomize"), + }, + }, + { + name: "positive-kustomize-5.0.0", + fixtureDir: "test-fixtures/classifiers/positive/kustomize-5.0.0", + expected: pkg.Package{ + Name: "kustomize", + Version: "5.0.0", + Type: "binary", + PURL: "pkg:golang/kustomize@5.0.0", + Locations: locations("kustomize"), + Metadata: metadata("kustomize"), + }, + }, { name: "positive-redis-4.0.11", fixtureDir: "test-fixtures/classifiers/positive/redis-server-4.0.11", diff --git a/syft/pkg/cataloger/binary/default_classifiers.go b/syft/pkg/cataloger/binary/default_classifiers.go index 01c707eeb6fe..7d1851ae4702 100644 --- a/syft/pkg/cataloger/binary/default_classifiers.go +++ b/syft/pkg/cataloger/binary/default_classifiers.go @@ -46,6 +46,42 @@ var defaultClassifiers = []classifier{ PURL: mustPURL("pkg:generic/go@version"), CPEs: singleCPE("cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*"), }, + { + Class: "argocd", + FileGlob: "**/argocd", + EvidenceMatcher: fileContentsVersionMatcher( + `(?m)common\.version=(?P[0-9]+\.[0-9]+\.[0-9]+)`), + Package: "argocd", + PURL: mustPURL("pkg:golang/argocd@version"), + CPEs: singleCPE("cpe:2.3:a:argoproj:argocd:*:*:*:*:*:*:*"), + }, + { + Class: "helm", + FileGlob: "**/helm", + EvidenceMatcher: fileContentsVersionMatcher( + `(?m)\x00v(?P[0-9]+\.[0-9]+\.[0-9]+)\x00`), + Package: "helm", + PURL: mustPURL("pkg:golang/helm@version"), + CPEs: singleCPE("cpe:2.3:a:helm:helm:*:*:*:*:*:*:*"), + }, + { + Class: "kustomize", + FileGlob: "**/kustomize", + EvidenceMatcher: fileContentsVersionMatcher( + `(?m)version=kustomize/v(?P[0-9]+\.[0-9]+\.[0-9]+)`), + Package: "kustomize", + PURL: mustPURL("pkg:golang/kustomize@version"), + CPEs: singleCPE("cpe:2.3:a:kustomize:kustomize:*:*:*:*:*:*:*"), + }, + { + Class: "kubectl", + FileGlob: "**/kubectl", + EvidenceMatcher: fileContentsVersionMatcher( + `(?m)\x00v(?P[0-9]+\.[0-9]+\.[0-9]+)\x00`), + Package: "kubectl", + PURL: mustPURL("pkg:golang/kubectl@version"), + CPEs: singleCPE("cpe:2.3:a:kubectl:kubectl:*:*:*:*:*:*:*"), + }, { Class: "redis-binary", FileGlob: "**/redis-server", diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.5.11/README.md b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.5.11/README.md new file mode 100644 index 000000000000..b1843feab183 --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.5.11/README.md @@ -0,0 +1,39 @@ +test-fixtures for https://github.com/anchore/syft/issues/1606 + +```sh +DEV_IMG=devalpine:3.17 + +docker build -t ${DEV_IMG} - < /tmp/$1/$3 +} +strings_save argocd-2.5.11 '2\.5\.11' argocd +strings_save argocd-2.6.4 '2\.6\.4' argocd +strings_save helm-2.16.10 '2\.16\.10' helm +strings_save helm-3.10.3 '3\.10\.3' helm +strings_save kustomize-4.5.7 '4\.5\.7' kustomize +strings_save kustomize-5.0.0 '5\.0\.0' kustomize +strings_save kubectl-1.24.11 '1\.24\.11' kubectl +strings_save kubectl-1.25.7 '1\.25\.7' kubectl +strings_save kubectl-1.26.2 '1\.26\.2' kubectl +EOF + +echo tmp dir: $TEMP_DIR +ls -lah $TEMP_DIR +``` \ No newline at end of file diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.5.11/argocd b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.5.11/argocd new file mode 100644 index 000000000000..afbf80be1e3b --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.5.11/argocd @@ -0,0 +1,3 @@ +2.5.11 +build -ldflags="-X github.com/argoproj/argo-cd/v2/common.version=2.5.11 -X github.com/argoproj/argo-cd/v2/common.buildDate=2023-02-16T15:06:40Z -X github.com/argoproj/argo-cd/v2/common.gitCommit=6dd79895e248cc0980bcaf6c6bafdc9afbbf80cb -X github.com/argoproj/argo-cd/v2/common.gitTreeState=clean -X github.com/argoproj/argo-cd/v2/common.kubectlVersion=v0.24.2 -extldflags \"-static\"" +build -ldflags="-X github.com/argoproj/argo-cd/v2/common.version=2.5.11 -X github.com/argoproj/argo-cd/v2/common.buildDate=2023-02-16T15:06:40Z -X github.com/argoproj/argo-cd/v2/common.gitCommit=6dd79895e248cc0980bcaf6c6bafdc9afbbf80cb -X github.com/argoproj/argo-cd/v2/common.gitTreeState=clean -X github.com/argoproj/argo-cd/v2/common.kubectlVersion=v0.24.2 -extldflags \"-static\"" diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.6.4/argocd b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.6.4/argocd new file mode 100644 index 000000000000..330dab901a14 --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/argocd-2.6.4/argocd @@ -0,0 +1,3 @@ +2.6.4 +build -ldflags="-X github.com/argoproj/argo-cd/v2/common.version=2.6.4 -X github.com/argoproj/argo-cd/v2/common.buildDate=2023-03-07T22:48:16Z -X github.com/argoproj/argo-cd/v2/common.gitCommit=7be094f38d06859b594b98eb75c7c70d39b80b1e -X github.com/argoproj/argo-cd/v2/common.gitTreeState=clean -X github.com/argoproj/argo-cd/v2/common.kubectlVersion=v0.24.2 -extldflags \"-static\"" +build -ldflags="-X github.com/argoproj/argo-cd/v2/common.version=2.6.4 -X github.com/argoproj/argo-cd/v2/common.buildDate=2023-03-07T22:48:16Z -X github.com/argoproj/argo-cd/v2/common.gitCommit=7be094f38d06859b594b98eb75c7c70d39b80b1e -X github.com/argoproj/argo-cd/v2/common.gitTreeState=clean -X github.com/argoproj/argo-cd/v2/common.kubectlVersion=v0.24.2 -extldflags \"-static\"" diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/helm-2.16.10/helm b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/helm-2.16.10/helm new file mode 100644 index 000000000000..18f22918a9d4 --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/helm-2.16.10/helm @@ -0,0 +1 @@ +v2.16.10 diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/helm-3.10.3/helm b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/helm-3.10.3/helm new file mode 100644 index 000000000000..5515cfcc85fb --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/helm-3.10.3/helm @@ -0,0 +1 @@ +v3.10.3 diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.24.11/kubectl b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.24.11/kubectl new file mode 100644 index 000000000000..9a7a10c5015a --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.24.11/kubectl @@ -0,0 +1,4 @@ +v1.24.11 +v1.24.11 +build -ldflags="all=-X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/component-base/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/client-go/pkg/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/component-base/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=v1.24.11' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitVersion=v1.24.11' -X 'k8s.io/client-go/pkg/version.gitVersion=v1.24.11' -X 'k8s.io/component-base/version.gitVersion=v1.24.11' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMinor=24' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMinor=24' -X 'k8s.io/client-go/pkg/version.gitMinor=24' -X 'k8s.io/component-base/version.gitMinor=24' -s -w" +build -ldflags="all=-X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/component-base/version.buildDate=2023-02-22T13:39:33Z' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/client-go/pkg/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/component-base/version.gitCommit=0f75679e3346160939924550fd3591462a4afec6' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=v1.24.11' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitVersion=v1.24.11' -X 'k8s.io/client-go/pkg/version.gitVersion=v1.24.11' -X 'k8s.io/component-base/version.gitVersion=v1.24.11' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMinor=24' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMinor=24' -X 'k8s.io/client-go/pkg/version.gitMinor=24' -X 'k8s.io/component-base/version.gitMinor=24' -s -w" diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.25.7/kubectl b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.25.7/kubectl new file mode 100644 index 000000000000..18e5f65f6d78 --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.25.7/kubectl @@ -0,0 +1,4 @@ +v1.25.7 +v1.25.7 +build -ldflags="all=-X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/client-go/pkg/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/component-base/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/client-go/pkg/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/component-base/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=v1.25.7' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitVersion=v1.25.7' -X 'k8s.io/client-go/pkg/version.gitVersion=v1.25.7' -X 'k8s.io/component-base/version.gitVersion=v1.25.7' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMinor=25' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMinor=25' -X 'k8s.io/client-go/pkg/version.gitMinor=25' -X 'k8s.io/component-base/version.gitMinor=25' -s -w" +build -ldflags="all=-X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/client-go/pkg/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/component-base/version.buildDate=2023-02-22T14:05:25Z' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/client-go/pkg/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/component-base/version.gitCommit=723bcdb232300aaf5e147ff19b4df7ec8a20278d' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=v1.25.7' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitVersion=v1.25.7' -X 'k8s.io/client-go/pkg/version.gitVersion=v1.25.7' -X 'k8s.io/component-base/version.gitVersion=v1.25.7' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMinor=25' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMinor=25' -X 'k8s.io/client-go/pkg/version.gitMinor=25' -X 'k8s.io/component-base/version.gitMinor=25' -s -w" diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.26.2/kubectl b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.26.2/kubectl new file mode 100644 index 000000000000..269d7f46cfb9 --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kubectl-1.26.2/kubectl @@ -0,0 +1,4 @@ +v1.26.2 +v1.26.2 +build -ldflags="all=-X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/component-base/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/client-go/pkg/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/component-base/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=v1.26.2' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitVersion=v1.26.2' -X 'k8s.io/client-go/pkg/version.gitVersion=v1.26.2' -X 'k8s.io/component-base/version.gitVersion=v1.26.2' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMinor=26' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMinor=26' -X 'k8s.io/client-go/pkg/version.gitMinor=26' -X 'k8s.io/component-base/version.gitMinor=26' -s -w" +build -ldflags="all=-X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/client-go/pkg/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/component-base/version.buildDate=2023-02-22T13:39:03Z' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/client-go/pkg/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/component-base/version.gitCommit=fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/client-go/pkg/version.gitTreeState=clean' -X 'k8s.io/component-base/version.gitTreeState=clean' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitVersion=v1.26.2' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitVersion=v1.26.2' -X 'k8s.io/client-go/pkg/version.gitVersion=v1.26.2' -X 'k8s.io/component-base/version.gitVersion=v1.26.2' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/client-go/pkg/version.gitMajor=1' -X 'k8s.io/component-base/version.gitMajor=1' -X 'k8s.io/kubernetes/vendor/k8s.io/client-go/pkg/version.gitMinor=26' -X 'k8s.io/kubernetes/vendor/k8s.io/component-base/version.gitMinor=26' -X 'k8s.io/client-go/pkg/version.gitMinor=26' -X 'k8s.io/component-base/version.gitMinor=26' -s -w" diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kustomize-4.5.7/kustomize b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kustomize-4.5.7/kustomize new file mode 100644 index 000000000000..018a7f58904c --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kustomize-4.5.7/kustomize @@ -0,0 +1,3 @@ +kustomize/v4.5.7 +build -ldflags="-s -X sigs.k8s.io/kustomize/api/provenance.version=kustomize/v4.5.7 -X sigs.k8s.io/kustomize/api/provenance.gitCommit=56d82a8378dfc8dc3b3b1085e5a6e67b82966bd7 -X sigs.k8s.io/kustomize/api/provenance.buildDate=2022-08-02T16:35:54Z " +build -ldflags="-s -X sigs.k8s.io/kustomize/api/provenance.version=kustomize/v4.5.7 -X sigs.k8s.io/kustomize/api/provenance.gitCommit=56d82a8378dfc8dc3b3b1085e5a6e67b82966bd7 -X sigs.k8s.io/kustomize/api/provenance.buildDate=2022-08-02T16:35:54Z " diff --git a/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kustomize-5.0.0/kustomize b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kustomize-5.0.0/kustomize new file mode 100644 index 000000000000..ae7237d06a01 --- /dev/null +++ b/syft/pkg/cataloger/binary/test-fixtures/classifiers/positive/kustomize-5.0.0/kustomize @@ -0,0 +1,3 @@ +kustomize/v5.0.0 +build -ldflags="-s -X sigs.k8s.io/kustomize/api/provenance.version=kustomize/v5.0.0 -X sigs.k8s.io/kustomize/api/provenance.buildDate=2023-02-02T16:43:10Z " +build -ldflags="-s -X sigs.k8s.io/kustomize/api/provenance.version=kustomize/v5.0.0 -X sigs.k8s.io/kustomize/api/provenance.buildDate=2023-02-02T16:43:10Z "