From db4e6b370fd9f9cefe7d83ab890a5515642b0722 Mon Sep 17 00:00:00 2001 From: DJ Schleen Date: Thu, 13 Apr 2023 11:29:11 -0600 Subject: [PATCH] fix: Fixes issue where invalid configuration yaml silently failed (#113) * Fixes issue where invalid coniguration yaml silently failed * Dependency updates --- .hookz.yaml | 10 +- README.md | 8 +- cmd/common.go | 8 + cmd/root.go | 2 +- go.mod | 14 +- go.sum | 36 +- lib/configreader.go | 1 + lib/configreader_test.go | 34 +- lib/hookwriter.go | 2 +- sbom/hookz.cyclonedx.json | 1362 +++++++++---------------------------- 10 files changed, 408 insertions(+), 1069 deletions(-) diff --git a/.hookz.yaml b/.hookz.yaml index 2159287..0809cec 100644 --- a/.hookz.yaml +++ b/.hookz.yaml @@ -1,4 +1,4 @@ - version: 2.4.2 + version: 2.4.3 sources: - source: github.com/anchore/syft/cmd/syft@latest - source: github.com/devops-kung-fu/hinge@latest @@ -28,7 +28,7 @@ args: ["-ignoretests", "./..."] - name: "gocyclo: Check cyclomatic complexities" exec: gocyclo - args: ["-over", "7", "."] + args: ["-over", "14", "."] - name: Hinge exec: hinge args: ["."] @@ -42,8 +42,10 @@ exec: go args: ["tool", "cover", "-func=coverage.out"] - name: "syft: Generate a Software Bill of Materials (SBoM)" - exec: syft - args: [".", "-o", "cyclonedx-json=sbom/hookz.cyclonedx.json"] + script: " + #!/bin/bash \n + syft . -o cyclonedx-json=sbom/hookz.cyclonedx.json &> /dev/null \n + " - name: "git: Add all changed files during the pre-commit stage" exec: git args: ["add", "."] diff --git a/README.md b/README.md index 27c56d1..e8ee5ac 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Hookz uses a configuration file to generate hooks in your local git repository. ### Example Configuration ``` yaml - version: 2.4.2 + version: 2.4.3 tools: - tool: github.com/devops-kung-fu/lucha@latest - tool: github.com/devops-kung-fu/hinge@latest @@ -113,7 +113,7 @@ Quite often, downloadable binaries exist for multiple platforms when downloading You can use the following to retrieve the right architecture for [hinge](https://github.com/devops-kung-fu/hinge): ``` yaml -version: 2.4.2 +version: 2.4.3 hooks: - type: pre-commit actions: @@ -253,7 +253,7 @@ Check out the collection [here](tackle/README.md). Assumes `terraform` is in your `PATH` for `fmt`. ```yaml -version: 2.4.2 +version: 2.4.3 hooks: - type: pre-commit actions: @@ -276,7 +276,7 @@ hooks: ### NPM ```yaml -version: 2.4.2 +version: 2.4.3 hooks: - type: pre-commit actions: diff --git a/cmd/common.go b/cmd/common.go index 720fc60..e3bef64 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -1,6 +1,7 @@ package cmd import ( + "errors" "fmt" "log" "os" @@ -19,11 +20,18 @@ func noConfig() { os.Exit(1) } +func badYaml() { + util.PrintErr(errors.New("configuration in .hookz.yaml is not valid YAML syntax")) + os.Exit(1) +} + // CheckConfig ensures that there is a .hookz.yaml file locally and the version is supported by the current version of hookz func CheckConfig() (config lib.Configuration) { config, err := lib.ReadConfig(Afs, version) if err != nil && err.Error() == "NO_CONFIG" { noConfig() + } else if err != nil && err.Error() == "BAD_YAML" { + badYaml() } return } diff --git a/cmd/root.go b/cmd/root.go index 7d7ae3d..e5644b4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -15,7 +15,7 @@ import ( ) var ( - version = "2.4.2" + version = "2.4.3" //Afs stores a global OS Filesystem that is used throughout hookz Afs = &afero.Afero{Fs: afero.NewOsFs()} debug bool diff --git a/go.mod b/go.mod index 988c4d6..b85e142 100644 --- a/go.mod +++ b/go.mod @@ -3,12 +3,12 @@ module github.com/devops-kung-fu/hookz go 1.18 require ( - github.com/dustin/go-humanize v1.0.0 - github.com/gookit/color v1.5.2 + github.com/dustin/go-humanize v1.0.1 + github.com/gookit/color v1.5.3 github.com/jarcoal/httpmock v1.2.0 github.com/segmentio/ksuid v1.0.4 - github.com/spf13/afero v1.9.2 - github.com/spf13/cobra v1.6.1 + github.com/spf13/afero v1.9.5 + github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -16,11 +16,11 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/devops-kung-fu/common v0.2.5 - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/text v0.4.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8ef73e4..487f54a 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/devops-kung-fu/common v0.2.5 h1:Ktyp1vsE2iyQPbazSxkQ1CiUq29FblQk/fYPHa09AzA= github.com/devops-kung-fu/common v0.2.5/go.mod h1:QV51eFibgEaYodlGnZgWd3IcZd+l44VQtULu6EheMV4= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -117,14 +117,14 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI= -github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg= +github.com/gookit/color v1.5.3 h1:twfIhZs4QLCtimkP7MOxlF3A0U/5cDPseRT9M/+2SCE= +github.com/gookit/color v1.5.3/go.mod h1:NUzwzeehUfl7GIb36pqId+UGmRfQcU/WiiyTTeNjHtE= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc= github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -146,10 +146,10 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c= github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= +github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -160,7 +160,6 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -179,7 +178,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -245,6 +244,7 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -296,11 +296,11 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -308,8 +308,10 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/lib/configreader.go b/lib/configreader.go index c23e6d2..a5670ee 100644 --- a/lib/configreader.go +++ b/lib/configreader.go @@ -28,6 +28,7 @@ func ReadConfig(afs *afero.Afero, version string) (config Configuration, err err err = yaml.Unmarshal(yamlFile, &config) if err != nil { + err = errors.New("BAD_YAML") return } diff --git a/lib/configreader_test.go b/lib/configreader_test.go index 2e7afa3..da3ece1 100644 --- a/lib/configreader_test.go +++ b/lib/configreader_test.go @@ -2,6 +2,7 @@ package lib import ( + "path/filepath" "testing" "github.com/spf13/afero" @@ -12,12 +13,14 @@ var ( version string = "1.0.0" ) -func TestDeps_ReadConfig(t *testing.T) { +func Test_ReadConfig(t *testing.T) { afs := &afero.Afero{Fs: afero.NewMemMapFs()} _, err := ReadConfig(afs, version) assert.Error(t, err, "There should be no config created so an error should be thrown.") + assert.Equal(t, "NO_CONFIG", err.Error()) + CreateConfig(afs, "1.0.0") readConfig, err := ReadConfig(afs, version) @@ -30,3 +33,32 @@ func TestDeps_ReadConfig(t *testing.T) { _, err = ReadConfig(afs, "") assert.Error(t, err, "Passing an empty string should cause an error") } + +func Test_badConfig(t *testing.T) { + afs := &afero.Afero{Fs: afero.NewMemMapFs()} + filename, _ := filepath.Abs(".hookz.yaml") + afs.WriteFile(filename, badConfig(), 0644) + + _, err := ReadConfig(afs, version) + assert.Error(t, err) + assert.Equal(t, "BAD_YAML", err.Error()) +} + +func badConfig() []byte { + config := ` + version: 2.4.2 + + hooks: + - type: pre-commit + actions: + - name: "Git Pull (Ensure there are no upstream changes)" + exec: git + args: ["pull"] + - type: post-commit + actions: + - name: "Mark all done" + exec: echo + args: ["-e" "[x] Successfully committed upstream"] + ` + return []byte(config) +} diff --git a/lib/hookwriter.go b/lib/hookwriter.go index 344be06..1f1c616 100644 --- a/lib/hookwriter.go +++ b/lib/hookwriter.go @@ -205,7 +205,7 @@ func genTemplate(hookType string) (t *template.Template) { echo -e "\n$(tput bold)Hookz$(tput sgr0)" echo -e "DKFM - DevOps Kung Fu Mafia" echo -e "https://github.com/devops-kung-fu/hookz" -echo -e "Version: 2.4.2" +echo -e "Version: 2.4.3" echo shasum=$(cat .git/hooks/hookz.shasum) diff --git a/sbom/hookz.cyclonedx.json b/sbom/hookz.cyclonedx.json index aa27030..343e3ea 100644 --- a/sbom/hookz.cyclonedx.json +++ b/sbom/hookz.cyclonedx.json @@ -1,10 +1,10 @@ { "bomFormat": "CycloneDX", "specVersion": "1.4", - "serialNumber": "urn:uuid:5519e132-41dc-4fd7-8ac3-94e738b8c3b1", + "serialNumber": "urn:uuid:ab78db8e-3142-4414-aade-443af257527d", "version": 1, "metadata": { - "timestamp": "2022-10-24T19:12:29-06:00", + "timestamp": "2023-04-13T11:26:15-06:00", "tools": [ { "vendor": "anchore", @@ -20,7 +20,7 @@ }, "components": [ { - "bom-ref": "pkg:golang/github.com/davecgh/go-spew@v1.1.1?package-id=82cf8b15f7c32de3", + "bom-ref": "pkg:golang/github.com/davecgh/go-spew@v1.1.1?package-id=e69c0beffd356805", "type": "library", "name": "github.com/davecgh/go-spew", "version": "v1.1.1", @@ -35,6 +35,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -46,11 +50,15 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=" } ] }, { - "bom-ref": "pkg:golang/github.com/devops-kung-fu/common@v0.2.5?package-id=f95acdc3523b68eb", + "bom-ref": "pkg:golang/github.com/devops-kung-fu/common@v0.2.5?package-id=f57dfa880b70947e", "type": "library", "name": "github.com/devops-kung-fu/common", "version": "v0.2.5", @@ -65,6 +73,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -88,11 +100,15 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:Ktyp1vsE2iyQPbazSxkQ1CiUq29FblQk/fYPHa09AzA=" } ] }, { - "bom-ref": "pkg:golang/github.com/devops-kung-fu/common@v0.2.5?package-id=a4cb9d7d8eccadc9", + "bom-ref": "pkg:golang/github.com/devops-kung-fu/common@v0.2.5?package-id=1c683af1d600ac55", "type": "library", "name": "github.com/devops-kung-fu/common", "version": "v0.2.5", @@ -141,7 +157,7 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", @@ -154,12 +170,12 @@ ] }, { - "bom-ref": "pkg:golang/github.com/devops-kung-fu/heybo@v0.0.5?package-id=b653b2ae57dc9008", + "bom-ref": "pkg:golang/github.com/devops-kung-fu/hookz@v0.0.0-20230105210542-32229fa1fedf?package-id=6f836ad3597fc3d", "type": "library", - "name": "github.com/devops-kung-fu/heybo", - "version": "v0.0.5", - "cpe": "cpe:2.3:a:devops-kung-fu:heybo:v0.0.5:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/devops-kung-fu/heybo@v0.0.5", + "name": "github.com/devops-kung-fu/hookz", + "version": "v0.0.0-20230105210542-32229fa1fedf", + "cpe": "cpe:2.3:a:devops-kung-fu:hookz:v0.0.0-20230105210542-32229fa1fedf:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/devops-kung-fu/hookz@v0.0.0-20230105210542-32229fa1fedf", "properties": [ { "name": "syft:package:foundBy", @@ -179,231 +195,89 @@ }, { "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung_fu:heybo:v0.0.5:*:*:*:*:*:*:*" + "value": "cpe:2.3:a:devops_kung_fu:hookz:v0.0.0-20230105210542-32229fa1fedf:*:*:*:*:*:*:*" }, { "name": "syft:cpe23", - "value": "cpe:2.3:a:devops-kung:heybo:v0.0.5:*:*:*:*:*:*:*" + "value": "cpe:2.3:a:devops-kung:hookz:v0.0.0-20230105210542-32229fa1fedf:*:*:*:*:*:*:*" }, { "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung:heybo:v0.0.5:*:*:*:*:*:*:*" + "value": "cpe:2.3:a:devops_kung:hookz:v0.0.0-20230105210542-32229fa1fedf:*:*:*:*:*:*:*" }, { "name": "syft:cpe23", - "value": "cpe:2.3:a:devops:heybo:v0.0.5:*:*:*:*:*:*:*" + "value": "cpe:2.3:a:devops:hookz:v0.0.0-20230105210542-32229fa1fedf:*:*:*:*:*:*:*" }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" + "value": "hookz" }, { "name": "syft:metadata:architecture", "value": "amd64" }, { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:Io7Aqclac4LK/muBJL5c/yqR4PQ0kGTXBXKkk3bvGjs=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/devops-kung-fu/heybo@v0.0.5?package-id=51cef8ea0eecc9a0", - "type": "library", - "name": "github.com/devops-kung-fu/heybo", - "version": "v0.0.5", - "cpe": "cpe:2.3:a:devops-kung-fu:heybo:v0.0.5:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/devops-kung-fu/heybo@v0.0.5", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung_fu:heybo:v0.0.5:*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops-kung:heybo:v0.0.5:*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung:heybo:v0.0.5:*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops:heybo:v0.0.5:*:*:*:*:*:*:*" - }, - { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "x86_64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:Io7Aqclac4LK/muBJL5c/yqR4PQ0kGTXBXKkk3bvGjs=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/devops-kung-fu/hinge@(devel)?package-id=5f89334f96d16a19", - "type": "library", - "name": "github.com/devops-kung-fu/hinge", - "version": "(devel)", - "cpe": "cpe:2.3:a:devops-kung-fu:hinge:\\(devel\\):*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/devops-kung-fu/hinge@(devel)", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung_fu:hinge:\\(devel\\):*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops-kung:hinge:\\(devel\\):*:*:*:*:*:*:*" + "name": "syft:metadata:goBuildSettings:-buildmode", + "value": "exe" }, { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung:hinge:\\(devel\\):*:*:*:*:*:*:*" + "name": "syft:metadata:goBuildSettings:-compiler", + "value": "gc" }, { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops:hinge:\\(devel\\):*:*:*:*:*:*:*" + "name": "syft:metadata:goBuildSettings:CGO_ENABLED", + "value": "1" }, { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" + "name": "syft:metadata:goBuildSettings:GOAMD64", + "value": "v1" }, { - "name": "syft:metadata:architecture", + "name": "syft:metadata:goBuildSettings:GOARCH", "value": "amd64" }, { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/devops-kung-fu/hinge@(devel)?package-id=9be01f75e3874e50", - "type": "library", - "name": "github.com/devops-kung-fu/hinge", - "version": "(devel)", - "cpe": "cpe:2.3:a:devops-kung-fu:hinge:\\(devel\\):*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/devops-kung-fu/hinge@(devel)", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung_fu:hinge:\\(devel\\):*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops-kung:hinge:\\(devel\\):*:*:*:*:*:*:*" + "name": "syft:metadata:goBuildSettings:GOOS", + "value": "linux" }, { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung:hinge:\\(devel\\):*:*:*:*:*:*:*" + "name": "syft:metadata:goBuildSettings:vcs", + "value": "git" }, { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops:hinge:\\(devel\\):*:*:*:*:*:*:*" + "name": "syft:metadata:goBuildSettings:vcs.modified", + "value": "true" }, { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" + "name": "syft:metadata:goBuildSettings:vcs.revision", + "value": "32229fa1fedfa92d5b9d0d13aa1de8a73768f089" }, { - "name": "syft:metadata:architecture", - "value": "x86_64" + "name": "syft:metadata:goBuildSettings:vcs.time", + "value": "2023-01-05T21:05:42Z" }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go1.20.2" }, { "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "github.com/devops-kung-fu/hookz" } ] }, { - "bom-ref": "pkg:golang/github.com/devops-kung-fu/hookz@v0.0.0-20221025011036-af19aa9b28eb?package-id=29e24eb0e949028b", + "bom-ref": "pkg:golang/github.com/dustin/go-humanize@v1.0.1?package-id=b40944867301975c", "type": "library", - "name": "github.com/devops-kung-fu/hookz", - "version": "v0.0.0-20221025011036-af19aa9b28eb", - "cpe": "cpe:2.3:a:devops-kung-fu:hookz:v0.0.0-20221025011036-af19aa9b28eb:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/devops-kung-fu/hookz@v0.0.0-20221025011036-af19aa9b28eb", + "name": "github.com/dustin/go-humanize", + "version": "v1.0.1", + "cpe": "cpe:2.3:a:dustin:go-humanize:v1.0.1:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/dustin/go-humanize@v1.0.1", "properties": [ { "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" + "value": "go-mod-file-cataloger" }, { "name": "syft:package:language", @@ -411,7 +285,7 @@ }, { "name": "syft:package:metadataType", - "value": "GolangBinMetadata" + "value": "GolangModMetadata" }, { "name": "syft:package:type", @@ -419,75 +293,25 @@ }, { "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung_fu:hookz:v0.0.0-20221025011036-af19aa9b28eb:*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops-kung:hookz:v0.0.0-20221025011036-af19aa9b28eb:*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops_kung:hookz:v0.0.0-20221025011036-af19aa9b28eb:*:*:*:*:*:*:*" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:devops:hookz:v0.0.0-20221025011036-af19aa9b28eb:*:*:*:*:*:*:*" + "value": "cpe:2.3:a:dustin:go_humanize:v1.0.1:*:*:*:*:*:*:*" }, { "name": "syft:location:0:path", - "value": "hookz" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hookz" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/dustin/go-humanize@v1.0.0?package-id=ab8fb6cb90d73e16", - "type": "library", - "name": "github.com/dustin/go-humanize", - "version": "v1.0.0", - "cpe": "cpe:2.3:a:dustin:go-humanize:v1.0.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/dustin/go-humanize@v1.0.0", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:dustin:go_humanize:v1.0.0:*:*:*:*:*:*:*" + "value": "go.mod" }, { - "name": "syft:location:0:path", - "value": "go.mod" + "name": "syft:metadata:h1Digest", + "value": "h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=" } ] }, { - "bom-ref": "pkg:golang/github.com/dustin/go-humanize@v1.0.0?package-id=3d10b938fe8be837", + "bom-ref": "pkg:golang/github.com/dustin/go-humanize@v1.0.1?package-id=7ce9a7c269b368b", "type": "library", "name": "github.com/dustin/go-humanize", - "version": "v1.0.0", - "cpe": "cpe:2.3:a:dustin:go-humanize:v1.0.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/dustin/go-humanize@v1.0.0", + "version": "v1.0.1", + "cpe": "cpe:2.3:a:dustin:go-humanize:v1.0.1:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/dustin/go-humanize@v1.0.1", "properties": [ { "name": "syft:package:foundBy", @@ -507,7 +331,7 @@ }, { "name": "syft:cpe23", - "value": "cpe:2.3:a:dustin:go_humanize:v1.0.0:*:*:*:*:*:*:*" + "value": "cpe:2.3:a:dustin:go_humanize:v1.0.1:*:*:*:*:*:*:*" }, { "name": "syft:location:0:path", @@ -519,11 +343,11 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=" + "value": "h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=" }, { "name": "syft:metadata:mainModule", @@ -532,62 +356,16 @@ ] }, { - "bom-ref": "pkg:golang/github.com/gookit/color@v1.4.2?package-id=4e1e7e7a5e93821e", + "bom-ref": "pkg:golang/github.com/gookit/color@v1.5.3?package-id=cfa1335605ae0b3b", "type": "library", "name": "github.com/gookit/color", - "version": "v1.4.2", - "cpe": "cpe:2.3:a:gookit:color:v1.4.2:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/gookit/color@v1.4.2", + "version": "v1.5.3", + "cpe": "cpe:2.3:a:gookit:color:v1.5.3:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/gookit/color@v1.5.3", "properties": [ { "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:tXy44JFSFkKnELV6WaMo/lLfu/meqITX3iAV52do7lk=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/gookit/color@v1.4.2?package-id=7bc44a79afd64507", - "type": "library", - "name": "github.com/gookit/color", - "version": "v1.4.2", - "cpe": "cpe:2.3:a:gookit:color:v1.4.2:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/gookit/color@v1.4.2", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" + "value": "go-mod-file-cataloger" }, { "name": "syft:package:language", @@ -595,7 +373,7 @@ }, { "name": "syft:package:metadataType", - "value": "GolangBinMetadata" + "value": "GolangModMetadata" }, { "name": "syft:package:type", @@ -603,587 +381,21 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "x86_64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:tXy44JFSFkKnELV6WaMo/lLfu/meqITX3iAV52do7lk=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/gookit/color@v1.5.2?package-id=44050d118a02707c", - "type": "library", - "name": "github.com/gookit/color", - "version": "v1.5.2", - "cpe": "cpe:2.3:a:gookit:color:v1.5.2:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/gookit/color@v1.5.2", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" + "value": "go.mod" }, { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "go.mod" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/gookit/color@v1.5.2?package-id=5a6f1a798f387bbd", - "type": "library", - "name": "github.com/gookit/color", - "version": "v1.5.2", - "cpe": "cpe:2.3:a:gookit:color:v1.5.2:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/gookit/color@v1.5.2", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "hookz" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hookz" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/inconshreveable/mousetrap@v1.0.1?package-id=85cf4669a7b55c3", - "type": "library", - "name": "github.com/inconshreveable/mousetrap", - "version": "v1.0.1", - "cpe": "cpe:2.3:a:inconshreveable:mousetrap:v1.0.1:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/inconshreveable/mousetrap@v1.0.1", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "go.mod" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/jarcoal/httpmock@v1.2.0?package-id=f469f5e014abf07c", - "type": "library", - "name": "github.com/jarcoal/httpmock", - "version": "v1.2.0", - "cpe": "cpe:2.3:a:jarcoal:httpmock:v1.2.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/jarcoal/httpmock@v1.2.0", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "go.mod" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/pmezard/go-difflib@v1.0.0?package-id=fc0265ef2c7b8e50", - "type": "library", - "name": "github.com/pmezard/go-difflib", - "version": "v1.0.0", - "cpe": "cpe:2.3:a:pmezard:go-difflib:v1.0.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/pmezard/go-difflib@v1.0.0", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:cpe23", - "value": "cpe:2.3:a:pmezard:go_difflib:v1.0.0:*:*:*:*:*:*:*" - }, - { - "name": "syft:location:0:path", - "value": "go.mod" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/segmentio/ksuid@v1.0.4?package-id=53ac2adbd0a87ac", - "type": "library", - "name": "github.com/segmentio/ksuid", - "version": "v1.0.4", - "cpe": "cpe:2.3:a:segmentio:ksuid:v1.0.4:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/segmentio/ksuid@v1.0.4", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "go.mod" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/segmentio/ksuid@v1.0.4?package-id=90d3285f7dad408c", - "type": "library", - "name": "github.com/segmentio/ksuid", - "version": "v1.0.4", - "cpe": "cpe:2.3:a:segmentio:ksuid:v1.0.4:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/segmentio/ksuid@v1.0.4", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "hookz" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hookz" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/afero@v1.6.0?package-id=8e802022102fe88f", - "type": "library", - "name": "github.com/spf13/afero", - "version": "v1.6.0", - "cpe": "cpe:2.3:a:spf13:afero:v1.6.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/afero@v1.6.0", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/afero@v1.6.0?package-id=f3ee87e65f0de9d9", - "type": "library", - "name": "github.com/spf13/afero", - "version": "v1.6.0", - "cpe": "cpe:2.3:a:spf13:afero:v1.6.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/afero@v1.6.0", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "x86_64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/afero@v1.9.2?package-id=1ab8d71708e8ef0a", - "type": "library", - "name": "github.com/spf13/afero", - "version": "v1.9.2", - "cpe": "cpe:2.3:a:spf13:afero:v1.9.2:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/afero@v1.9.2", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "go.mod" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/afero@v1.9.2?package-id=70fd888974265b55", - "type": "library", - "name": "github.com/spf13/afero", - "version": "v1.9.2", - "cpe": "cpe:2.3:a:spf13:afero:v1.9.2:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/afero@v1.9.2", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "hookz" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hookz" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/cobra@v1.1.3?package-id=9202bd767a85753d", - "type": "library", - "name": "github.com/spf13/cobra", - "version": "v1.1.3", - "cpe": "cpe:2.3:a:spf13:cobra:v1.1.3:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/cobra@v1.1.3", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/cobra@v1.1.3?package-id=9fd5908825daed79", - "type": "library", - "name": "github.com/spf13/cobra", - "version": "v1.1.3", - "cpe": "cpe:2.3:a:spf13:cobra:v1.1.3:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/cobra@v1.1.3", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "x86_64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/cobra@v1.6.1?package-id=86964f5f4c273c89", - "type": "library", - "name": "github.com/spf13/cobra", - "version": "v1.6.1", - "cpe": "cpe:2.3:a:spf13:cobra:v1.6.1:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/cobra@v1.6.1", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-mod-file-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "go.mod" - } - ] - }, - { - "bom-ref": "pkg:golang/github.com/spf13/cobra@v1.6.1?package-id=c00986f63de5ee31", - "type": "library", - "name": "github.com/spf13/cobra", - "version": "v1.6.1", - "cpe": "cpe:2.3:a:spf13:cobra:v1.6.1:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/cobra@v1.6.1", - "properties": [ - { - "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" - }, - { - "name": "syft:package:language", - "value": "go" - }, - { - "name": "syft:package:metadataType", - "value": "GolangBinMetadata" - }, - { - "name": "syft:package:type", - "value": "go-module" - }, - { - "name": "syft:location:0:path", - "value": "hookz" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" - }, - { - "name": "syft:metadata:h1Digest", - "value": "h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hookz" + "name": "syft:metadata:h1Digest", + "value": "h1:twfIhZs4QLCtimkP7MOxlF3A0U/5cDPseRT9M/+2SCE=" } ] }, { - "bom-ref": "pkg:golang/github.com/spf13/pflag@v1.0.5?package-id=9342d0a93ecf0753", + "bom-ref": "pkg:golang/github.com/gookit/color@v1.5.3?package-id=62beb3c6e151de03", "type": "library", - "name": "github.com/spf13/pflag", - "version": "v1.0.5", - "cpe": "cpe:2.3:a:spf13:pflag:v1.0.5:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/pflag@v1.0.5", + "name": "github.com/gookit/color", + "version": "v1.5.3", + "cpe": "cpe:2.3:a:gookit:color:v1.5.3:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/gookit/color@v1.5.3", "properties": [ { "name": "syft:package:foundBy", @@ -1203,7 +415,7 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" + "value": "hookz" }, { "name": "syft:metadata:architecture", @@ -1211,29 +423,29 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=" + "value": "h1:twfIhZs4QLCtimkP7MOxlF3A0U/5cDPseRT9M/+2SCE=" }, { "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "github.com/devops-kung-fu/hookz" } ] }, { - "bom-ref": "pkg:golang/github.com/spf13/pflag@v1.0.5?package-id=1b8ecbd6e07b3741", + "bom-ref": "pkg:golang/github.com/inconshreveable/mousetrap@v1.1.0?package-id=37c82ad2116f18d1", "type": "library", - "name": "github.com/spf13/pflag", - "version": "v1.0.5", - "cpe": "cpe:2.3:a:spf13:pflag:v1.0.5:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/pflag@v1.0.5", + "name": "github.com/inconshreveable/mousetrap", + "version": "v1.1.0", + "cpe": "cpe:2.3:a:inconshreveable:mousetrap:v1.1.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/inconshreveable/mousetrap@v1.1.0", "properties": [ { "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" + "value": "go-mod-file-cataloger" }, { "name": "syft:package:language", @@ -1241,7 +453,7 @@ }, { "name": "syft:package:metadataType", - "value": "GolangBinMetadata" + "value": "GolangModMetadata" }, { "name": "syft:package:type", @@ -1249,33 +461,21 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "x86_64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go.mod" }, { "name": "syft:metadata:h1Digest", - "value": "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=" } ] }, { - "bom-ref": "pkg:golang/github.com/spf13/pflag@v1.0.5?package-id=b5f60d334205548", + "bom-ref": "pkg:golang/github.com/jarcoal/httpmock@v1.2.0?package-id=68d78015643b8ffe", "type": "library", - "name": "github.com/spf13/pflag", - "version": "v1.0.5", - "cpe": "cpe:2.3:a:spf13:pflag:v1.0.5:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/pflag@v1.0.5", + "name": "github.com/jarcoal/httpmock", + "version": "v1.2.0", + "cpe": "cpe:2.3:a:jarcoal:httpmock:v1.2.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/jarcoal/httpmock@v1.2.0", "properties": [ { "name": "syft:package:foundBy", @@ -1285,6 +485,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -1292,20 +496,24 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc=" } ] }, { - "bom-ref": "pkg:golang/github.com/spf13/pflag@v1.0.5?package-id=10db70b0c8996044", + "bom-ref": "pkg:golang/github.com/pmezard/go-difflib@v1.0.0?package-id=1503003a9cee31be", "type": "library", - "name": "github.com/spf13/pflag", - "version": "v1.0.5", - "cpe": "cpe:2.3:a:spf13:pflag:v1.0.5:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/spf13/pflag@v1.0.5", + "name": "github.com/pmezard/go-difflib", + "version": "v1.0.0", + "cpe": "cpe:2.3:a:pmezard:go-difflib:v1.0.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/pmezard/go-difflib@v1.0.0", "properties": [ { "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" + "value": "go-mod-file-cataloger" }, { "name": "syft:package:language", @@ -1313,41 +521,33 @@ }, { "name": "syft:package:metadataType", - "value": "GolangBinMetadata" + "value": "GolangModMetadata" }, { "name": "syft:package:type", "value": "go-module" }, { - "name": "syft:location:0:path", - "value": "hookz" - }, - { - "name": "syft:metadata:architecture", - "value": "amd64" + "name": "syft:cpe23", + "value": "cpe:2.3:a:pmezard:go_difflib:v1.0.0:*:*:*:*:*:*:*" }, { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" + "name": "syft:location:0:path", + "value": "go.mod" }, { "name": "syft:metadata:h1Digest", - "value": "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hookz" + "value": "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=" } ] }, { - "bom-ref": "pkg:golang/github.com/stretchr/testify@v1.8.0?package-id=384b2b91069c12ca", + "bom-ref": "pkg:golang/github.com/segmentio/ksuid@v1.0.4?package-id=15e10b9ca234272c", "type": "library", - "name": "github.com/stretchr/testify", - "version": "v1.8.0", - "cpe": "cpe:2.3:a:stretchr:testify:v1.8.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/stretchr/testify@v1.8.0", + "name": "github.com/segmentio/ksuid", + "version": "v1.0.4", + "cpe": "cpe:2.3:a:segmentio:ksuid:v1.0.4:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/segmentio/ksuid@v1.0.4", "properties": [ { "name": "syft:package:foundBy", @@ -1357,6 +557,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -1364,16 +568,20 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=" } ] }, { - "bom-ref": "pkg:golang/github.com/xo/terminfo@v0.0.0-20210125001918-ca9a967f8778?package-id=bd5011ae3a61281c", + "bom-ref": "pkg:golang/github.com/segmentio/ksuid@v1.0.4?package-id=e0b32445b6d22836", "type": "library", - "name": "github.com/xo/terminfo", - "version": "v0.0.0-20210125001918-ca9a967f8778", - "cpe": "cpe:2.3:a:xo:terminfo:v0.0.0-20210125001918-ca9a967f8778:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/xo/terminfo@v0.0.0-20210125001918-ca9a967f8778", + "name": "github.com/segmentio/ksuid", + "version": "v1.0.4", + "cpe": "cpe:2.3:a:segmentio:ksuid:v1.0.4:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/segmentio/ksuid@v1.0.4", "properties": [ { "name": "syft:package:foundBy", @@ -1393,7 +601,7 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" + "value": "hookz" }, { "name": "syft:metadata:architecture", @@ -1401,25 +609,59 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=" + "value": "h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=" }, { "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "github.com/devops-kung-fu/hookz" } ] }, { - "bom-ref": "pkg:golang/github.com/xo/terminfo@v0.0.0-20210125001918-ca9a967f8778?package-id=63f3b12ca1d1a1d8", + "bom-ref": "pkg:golang/github.com/spf13/afero@v1.9.5?package-id=afef4efae4a6c52e", "type": "library", - "name": "github.com/xo/terminfo", - "version": "v0.0.0-20210125001918-ca9a967f8778", - "cpe": "cpe:2.3:a:xo:terminfo:v0.0.0-20210125001918-ca9a967f8778:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/xo/terminfo@v0.0.0-20210125001918-ca9a967f8778", + "name": "github.com/spf13/afero", + "version": "v1.9.5", + "cpe": "cpe:2.3:a:spf13:afero:v1.9.5:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/afero@v1.9.5", + "properties": [ + { + "name": "syft:package:foundBy", + "value": "go-mod-file-cataloger" + }, + { + "name": "syft:package:language", + "value": "go" + }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, + { + "name": "syft:package:type", + "value": "go-module" + }, + { + "name": "syft:location:0:path", + "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/spf13/afero@v1.9.5?package-id=220147941213fef", + "type": "library", + "name": "github.com/spf13/afero", + "version": "v1.9.5", + "cpe": "cpe:2.3:a:spf13:afero:v1.9.5:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/afero@v1.9.5", "properties": [ { "name": "syft:package:foundBy", @@ -1439,33 +681,33 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" + "value": "hookz" }, { "name": "syft:metadata:architecture", - "value": "x86_64" + "value": "amd64" }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=" + "value": "h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=" }, { "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "github.com/devops-kung-fu/hookz" } ] }, { - "bom-ref": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e?package-id=b516433ce4c71aa5", + "bom-ref": "pkg:golang/github.com/spf13/cobra@v1.7.0?package-id=2304181945444e71", "type": "library", - "name": "github.com/xo/terminfo", - "version": "v0.0.0-20220910002029-abceb7e1c41e", - "cpe": "cpe:2.3:a:xo:terminfo:v0.0.0-20220910002029-abceb7e1c41e:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e", + "name": "github.com/spf13/cobra", + "version": "v1.7.0", + "cpe": "cpe:2.3:a:spf13:cobra:v1.7.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/cobra@v1.7.0", "properties": [ { "name": "syft:package:foundBy", @@ -1475,6 +717,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -1482,16 +728,20 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=" } ] }, { - "bom-ref": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e?package-id=1e4ed4b65d3b088b", + "bom-ref": "pkg:golang/github.com/spf13/cobra@v1.7.0?package-id=ea502180bab47d63", "type": "library", - "name": "github.com/xo/terminfo", - "version": "v0.0.0-20220910002029-abceb7e1c41e", - "cpe": "cpe:2.3:a:xo:terminfo:v0.0.0-20220910002029-abceb7e1c41e:*:*:*:*:*:*:*", - "purl": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e", + "name": "github.com/spf13/cobra", + "version": "v1.7.0", + "cpe": "cpe:2.3:a:spf13:cobra:v1.7.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/cobra@v1.7.0", "properties": [ { "name": "syft:package:foundBy", @@ -1519,11 +769,11 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=" + "value": "h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=" }, { "name": "syft:metadata:mainModule", @@ -1532,12 +782,12 @@ ] }, { - "bom-ref": "pkg:golang/golang.org/x/sys@v0.1.0?package-id=f0dbacc78b47bc77", + "bom-ref": "pkg:golang/github.com/spf13/pflag@v1.0.5?package-id=54d28db4ae4c8937", "type": "library", - "name": "golang.org/x/sys", - "version": "v0.1.0", - "cpe": "cpe:2.3:a:golang:x\\/sys:v0.1.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/golang.org/x/sys@v0.1.0", + "name": "github.com/spf13/pflag", + "version": "v1.0.5", + "cpe": "cpe:2.3:a:spf13:pflag:v1.0.5:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/pflag@v1.0.5", "properties": [ { "name": "syft:package:foundBy", @@ -1547,6 +797,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -1554,16 +808,20 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=" } ] }, { - "bom-ref": "pkg:golang/golang.org/x/text@v0.3.6?package-id=ef1f6802c206dd2a", + "bom-ref": "pkg:golang/github.com/spf13/pflag@v1.0.5?package-id=3ef36d3dd8dc69d3", "type": "library", - "name": "golang.org/x/text", - "version": "v0.3.6", - "cpe": "cpe:2.3:a:golang:x\\/text:v0.3.6:*:*:*:*:*:*:*", - "purl": "pkg:golang/golang.org/x/text@v0.3.6", + "name": "github.com/spf13/pflag", + "version": "v1.0.5", + "cpe": "cpe:2.3:a:spf13:pflag:v1.0.5:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/pflag@v1.0.5", "properties": [ { "name": "syft:package:foundBy", @@ -1583,7 +841,7 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" + "value": "hookz" }, { "name": "syft:metadata:architecture", @@ -1591,29 +849,29 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=" + "value": "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=" }, { "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "github.com/devops-kung-fu/hookz" } ] }, { - "bom-ref": "pkg:golang/golang.org/x/text@v0.3.6?package-id=6059b7cc93473396", + "bom-ref": "pkg:golang/github.com/stretchr/testify@v1.8.0?package-id=40e3f1e5064cda76", "type": "library", - "name": "golang.org/x/text", - "version": "v0.3.6", - "cpe": "cpe:2.3:a:golang:x\\/text:v0.3.6:*:*:*:*:*:*:*", - "purl": "pkg:golang/golang.org/x/text@v0.3.6", + "name": "github.com/stretchr/testify", + "version": "v1.8.0", + "cpe": "cpe:2.3:a:stretchr:testify:v1.8.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/stretchr/testify@v1.8.0", "properties": [ { "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" + "value": "go-mod-file-cataloger" }, { "name": "syft:package:language", @@ -1621,7 +879,7 @@ }, { "name": "syft:package:metadataType", - "value": "GolangBinMetadata" + "value": "GolangModMetadata" }, { "name": "syft:package:type", @@ -1629,33 +887,21 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" - }, - { - "name": "syft:metadata:architecture", - "value": "x86_64" - }, - { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go.mod" }, { "name": "syft:metadata:h1Digest", - "value": "h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=" - }, - { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=" } ] }, { - "bom-ref": "pkg:golang/golang.org/x/text@v0.4.0?package-id=4ce8c6d02da0599a", + "bom-ref": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e?package-id=d3f5ed2384e5d7e5", "type": "library", - "name": "golang.org/x/text", - "version": "v0.4.0", - "cpe": "cpe:2.3:a:golang:x\\/text:v0.4.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/golang.org/x/text@v0.4.0", + "name": "github.com/xo/terminfo", + "version": "v0.0.0-20220910002029-abceb7e1c41e", + "cpe": "cpe:2.3:a:xo:terminfo:v0.0.0-20220910002029-abceb7e1c41e:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e", "properties": [ { "name": "syft:package:foundBy", @@ -1665,6 +911,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -1672,16 +922,20 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=" } ] }, { - "bom-ref": "pkg:golang/golang.org/x/text@v0.4.0?package-id=99b80ed91079586", + "bom-ref": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e?package-id=8b3eed1f16aca468", "type": "library", - "name": "golang.org/x/text", - "version": "v0.4.0", - "cpe": "cpe:2.3:a:golang:x\\/text:v0.4.0:*:*:*:*:*:*:*", - "purl": "pkg:golang/golang.org/x/text@v0.4.0", + "name": "github.com/xo/terminfo", + "version": "v0.0.0-20220910002029-abceb7e1c41e", + "cpe": "cpe:2.3:a:xo:terminfo:v0.0.0-20220910002029-abceb7e1c41e:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e", "properties": [ { "name": "syft:package:foundBy", @@ -1709,11 +963,11 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=" + "value": "h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=" }, { "name": "syft:metadata:mainModule", @@ -1722,15 +976,16 @@ ] }, { - "bom-ref": "pkg:golang/gopkg.in/yaml.v2@v2.4.0?package-id=6861e978714952d1", + "bom-ref": "pkg:golang/golang.org/x/sys@v0.7.0?package-id=23392771bed0fd11", "type": "library", - "name": "gopkg.in/yaml.v2", - "version": "v2.4.0", - "purl": "pkg:golang/gopkg.in/yaml.v2@v2.4.0", + "name": "golang.org/x/sys", + "version": "v0.7.0", + "cpe": "cpe:2.3:a:golang:x\\/sys:v0.7.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/golang.org/x/sys@v0.7.0", "properties": [ { "name": "syft:package:foundBy", - "value": "go-module-binary-cataloger" + "value": "go-mod-file-cataloger" }, { "name": "syft:package:language", @@ -1738,7 +993,7 @@ }, { "name": "syft:package:metadataType", - "value": "GolangBinMetadata" + "value": "GolangModMetadata" }, { "name": "syft:package:type", @@ -1746,32 +1001,55 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-darwin-amd64" + "value": "go.mod" }, { - "name": "syft:metadata:architecture", - "value": "amd64" + "name": "syft:metadata:h1Digest", + "value": "h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=" + } + ] + }, + { + "bom-ref": "pkg:golang/golang.org/x/text@v0.9.0?package-id=1f1345074dcf5536", + "type": "library", + "name": "golang.org/x/text", + "version": "v0.9.0", + "cpe": "cpe:2.3:a:golang:x\\/text:v0.9.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/golang.org/x/text@v0.9.0", + "properties": [ + { + "name": "syft:package:foundBy", + "value": "go-mod-file-cataloger" }, { - "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "name": "syft:package:language", + "value": "go" }, { - "name": "syft:metadata:h1Digest", - "value": "h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=" + "name": "syft:package:metadataType", + "value": "GolangModMetadata" }, { - "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "name": "syft:package:type", + "value": "go-module" + }, + { + "name": "syft:location:0:path", + "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=" } ] }, { - "bom-ref": "pkg:golang/gopkg.in/yaml.v2@v2.4.0?package-id=b96108f78f063232", + "bom-ref": "pkg:golang/golang.org/x/text@v0.9.0?package-id=6feb1b850f03ea26", "type": "library", - "name": "gopkg.in/yaml.v2", - "version": "v2.4.0", - "purl": "pkg:golang/gopkg.in/yaml.v2@v2.4.0", + "name": "golang.org/x/text", + "version": "v0.9.0", + "cpe": "cpe:2.3:a:golang:x\\/text:v0.9.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/golang.org/x/text@v0.9.0", "properties": [ { "name": "syft:package:foundBy", @@ -1791,28 +1069,28 @@ }, { "name": "syft:location:0:path", - "value": ".git/hooks/hinge-0.1.0-linux-amd64" + "value": "hookz" }, { "name": "syft:metadata:architecture", - "value": "x86_64" + "value": "amd64" }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.16.4" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", - "value": "h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=" + "value": "h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=" }, { "name": "syft:metadata:mainModule", - "value": "github.com/devops-kung-fu/hinge" + "value": "github.com/devops-kung-fu/hookz" } ] }, { - "bom-ref": "pkg:golang/gopkg.in/yaml.v2@v2.4.0?package-id=8f2bb9bdbe3059d6", + "bom-ref": "pkg:golang/gopkg.in/yaml.v2@v2.4.0?package-id=bd73a1dddee3e578", "type": "library", "name": "gopkg.in/yaml.v2", "version": "v2.4.0", @@ -1826,6 +1104,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -1833,11 +1115,15 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=" } ] }, { - "bom-ref": "pkg:golang/gopkg.in/yaml.v2@v2.4.0?package-id=8ccae190bf131ca1", + "bom-ref": "pkg:golang/gopkg.in/yaml.v2@v2.4.0?package-id=6239bd5dfe00f44b", "type": "library", "name": "gopkg.in/yaml.v2", "version": "v2.4.0", @@ -1869,7 +1155,7 @@ }, { "name": "syft:metadata:goCompiledVersion", - "value": "go1.19.2" + "value": "go1.20.2" }, { "name": "syft:metadata:h1Digest", @@ -1882,7 +1168,7 @@ ] }, { - "bom-ref": "pkg:golang/gopkg.in/yaml.v3@v3.0.1?package-id=7d36a1c0c358a2f8", + "bom-ref": "pkg:golang/gopkg.in/yaml.v3@v3.0.1?package-id=c6e1240d23bf190f", "type": "library", "name": "gopkg.in/yaml.v3", "version": "v3.0.1", @@ -1896,6 +1182,10 @@ "name": "syft:package:language", "value": "go" }, + { + "name": "syft:package:metadataType", + "value": "GolangModMetadata" + }, { "name": "syft:package:type", "value": "go-module" @@ -1903,6 +1193,10 @@ { "name": "syft:location:0:path", "value": "go.mod" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=" } ] }