From d027ad4b7b3faca304d98f8a31e1ae8ac10a5cae Mon Sep 17 00:00:00 2001 From: DJ Schleen Date: Thu, 20 Oct 2022 16:08:47 -0600 Subject: [PATCH] Adds goreleaser workflows and windows binary creation --- .github/dependabot.yml | 4 +- .github/workflows/release.yml | 168 ++------ .goreleaser.yaml | 43 ++ .hookz.yaml | 9 +- Makefile | 12 +- README.md | 26 +- cmd/generate.go | 2 +- cmd/root.go | 2 +- go.mod | 20 +- go.sum | 44 +- {src => lib}/gardener.go | 0 {src => lib}/gardener_test.go | 0 sbom/gardener.cyclonedx.json | 780 ++++++++++++++++++++++++++++++++++ 13 files changed, 926 insertions(+), 184 deletions(-) create mode 100644 .goreleaser.yaml rename {src => lib}/gardener.go (100%) rename {src => lib}/gardener_test.go (100%) create mode 100644 sbom/gardener.cyclonedx.json diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ec52d8c..09f747e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,10 +5,10 @@ updates: schedule: interval: daily time: "05:00" - timezone: UTC + timezone: US/Pacific - package-ecosystem: gomod directory: / schedule: interval: daily time: "05:00" - timezone: UTC + timezone: US/Pacific diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index adb4264..656c1e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,150 +1,50 @@ -name: gardener Release +name: Release on: push: tags: - 'v*' +permissions: + contents: write + jobs: release: - name: Create Release runs-on: ubuntu-latest - outputs: - upload_url: ${{ steps.upload_url.outputs.upload_url }} - steps: - - name: Checkout code + - + name: Checkout uses: actions/checkout@v2 - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: | - This release has the following changes: - - README Updates. - draft: false - prerelease: false - - - name: Fix Upload URL - id: upload_url - run: echo ::set-output name=upload_url::$(echo "${{ steps.create_release.outputs.upload_url }}" | cut -d"{" -f1) - - - name: Echo upload url - run: echo "${{ steps.upload_url.outputs.upload_url }}" - - build: - needs: release - strategy: - matrix: - os: ["darwin", "freebsd", "linux", "netbsd", "openbsd", "windows"] - arch: ["amd64", "arm64", "arm"] - - env: - UPLOAD_URL: ${{ needs.release.outputs.upload_url }} - - name: Build and Upload Assets - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup Go + fetch-depth: 0 + # - + # name: Install Snapcraft + # uses: samuelmeuli/action-snapcraft@v1 + # with: + # snapcraft_token: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} + - + name: Set up Go uses: actions/setup-go@v2 with: - go-version: '1.16' - - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} - - - name: Generate SBOM - uses: CycloneDX/gh-gomod-generate-sbom@v0.3.0 + go-version: 1.19 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 with: - include-stdlib: true - json: true - output: sbom.json - resolve-licenses: true - version: "^v0" - - - name: Build amd64 Assets - if: matrix.arch == 'amd64' - run: | - echo "${{ matrix.os }} ${{ matrix.arch }}" - env GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o $FILE github.com/devops-kung-fu/gardener - env: - FILE: build/gardener-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-${{ matrix.arch }} - - - name: Build arm64 Assets - if: matrix.arch == 'arm64' && matrix.os == 'linux' - run: | - echo "${{ matrix.os }} ${{ matrix.arch }}" - env GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o $FILE github.com/devops-kung-fu/gardener - env: - FILE: build/gardener-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-${{ matrix.arch }} - - - name: Build arm Assets - if: matrix.arch == 'arm' && (matrix.os == 'freebsd' || matrix.os == 'netbsd' || matrix.os == 'openbsd') - run: | - echo "${{ matrix.os }} ${{ matrix.arch }}" - env GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o $FILE github.com/devops-kung-fu/gardener - env: - FILE: build/gardener-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-${{ matrix.arch }} - - - name: Upload SBoM - run: | - curl \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: $(file -b --mime-type $FILE)" \ - --data-binary @$FILE \ - "$UPLOAD_URL?name=$(basename $FILE)" - env: - FILE: sbom.json - - - name: Upload amd64 Non-Windows - if: matrix.os != 'windows' && matrix.arch == 'amd64' - run: | - curl \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: $(file -b --mime-type $FILE)" \ - --data-binary @$FILE \ - "$UPLOAD_URL?name=$(basename $FILE)" - env: - FILE: build/gardener-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-${{ matrix.arch }} - - - name: Upload amd64 Windows - if: matrix.os == 'windows' && matrix.arch == 'amd64' - run: | - curl \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: $(file -b --mime-type $FILE)" \ - --data-binary @$FILE \ - "$UPLOAD_URL?name=$(basename $FILE)" - env: - FILE: build/gardener-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-${{ matrix.arch }}.exe - - - name: Upload arm64 - if: matrix.os == 'linux' && matrix.arch == 'arm64' - run: | - curl \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: $(file -b --mime-type $FILE)" \ - --data-binary @$FILE \ - "$UPLOAD_URL?name=$(basename $FILE)" - env: - FILE: build/gardener-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-${{ matrix.arch }} + distribution: goreleaser + version: ${{ env.GITHUB_REF_NAME }} + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} + - + name: Generate SBOM + uses: anchore/sbom-action@v0 + with: + artifact-name: bomber.cyclonedx.json + path: . + - + name: Release SBOM + uses: anchore/sbom-action/publish-sbom@v0 + with: + sbom-artifact-match: ".*\\.cyclonedx.json$" - - name: Upload arm - if: (matrix.os == 'freebsd' || matrix.os == 'netbsd' || matrix.os == 'openbsd') && matrix.arch == 'arm' - run: | - curl \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - -H "Content-Type: $(file -b --mime-type $FILE)" \ - --data-binary @$FILE \ - "$UPLOAD_URL?name=$(basename $FILE)" - env: - FILE: build/gardener-${{ steps.get_version.outputs.VERSION }}-${{ matrix.os }}-${{ matrix.arch }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..b797764 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,43 @@ +project_name: gardener + +builds: + - + binary: bomber + goos: + - darwin + - linux + - windows + goarch: + - amd64 + - arm64 + +release: + prerelease: auto + +universal_binaries: + - replace: true + +brews: + - + name: bomber + homepage: "https://github.com/devops-kung-fu/gardener" + tap: + owner: devops-kung-fu + name: homebrew-tap + commit_author: + name: djschleen + email: djschleen@gmail.com + +checksum: + name_template: 'checksums.txt' + +nfpms: + - + maintainer: DevOps Kung Fu Mafia + description: A utility that renders PlantUML diagram source in Markdown image tags. + homepage: https://github.com/devops-kung-fu/gardener + license: MPL + formats: + - deb + - rpm + diff --git a/.hookz.yaml b/.hookz.yaml index 7d16e74..b081ebc 100644 --- a/.hookz.yaml +++ b/.hookz.yaml @@ -1,7 +1,6 @@ version: 2.4.0 sources: - - source: github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest - - source: github.com/devops-kung-fu/lucha@latest + - source: github.com/anchore/syft/cmd/syft@latest - source: github.com/devops-kung-fu/hinge@latest - source: github.com/kisielk/errcheck@latest - source: golang.org/x/lint/golint@latest @@ -42,9 +41,9 @@ - name: "go: Test coverage" exec: go args: ["tool", "cover", "-func=coverage.out"] - - name: "cyclone-dx: Generate a Software Bill of Materials (SBoM)" - exec: cyclonedx-gomod - args: ["app", "-json", "-output", "gardener-sbom.json"] + - name: "syft: Generate a Software Bill of Materials (SBoM)" + exec: syft + args: [".", "-o", "cyclonedx-json=sbom/gardener.cyclonedx.json"] - name: "git: Add all changed files during the pre-commit stage" exec: git args: ["add", "."] \ No newline at end of file diff --git a/Makefile b/Makefile index c6e1a51..1b11730 100644 --- a/Makefile +++ b/Makefile @@ -8,20 +8,20 @@ help: ## This help .DEFAULT_GOAL := help - title: @echo "gardener Makefile" @echo "-----------------" build: ## Builds the application + go get -u ./... + go mod tidy go build test: ## Runs tests and coverage go test -v -coverprofile=coverage.out ./... && go tool cover -func=coverage.out -install: build ## Builds an executable local version of gardener and puts in in /usr/local/bin - sudo chmod +x gardener - sudo mv hookz /usr/local/bin - -all: title build test ## Makes all targets +check: build ## Tests the pre-commit hooks if they exist + hookz reset --verbose --debug --verbose-output + . .git/hooks/pre-commit +all: title build test ## Makes all targets \ No newline at end of file diff --git a/README.md b/README.md index ed3319e..3cc498b 100644 --- a/README.md +++ b/README.md @@ -14,15 +14,31 @@ At [DKFM](https://github.com/devops-kung-fu), when we develop PlantUML documents ## Installation -To install ```gardener```, [download the latest release](https://github.com/devops-kung-fu/gardener/releases) , make is executable, rename it to ```gardener``` and toss it in your ```/usr/local/bin``` directory for Linux, or on your path for other operating systems. +### Mac -Linux Example: +You can use [Homebrew](https://brew.sh) to install ```gardener``` using the following: + +``` bash +brew tap devops-kung-fu/homebrew-tap +brew install devops-kung-fu/homebrew-tap/gardener +``` + +If you do not have Homebrew, you can still [download the latest release](https://github.com/devops-kung-fu/hookz/releases) (ex: ```gardener_1.0.1_darwin_all.tar.gz```), extract the files from the archive, and use the ```gardener``` binary. + +If you wish, you can move the ```gardener``` binary to your ```/usr/local/bin``` directory or anywhere on your path. + +### Linux + +To install ```gardener```, [download the latest release](https://github.com/devops-kung-fu/hookz/releases) for your platform and install locally. For example, install ```gardener``` on Ubuntu: ```bash -sudo chmod +x gardener-1.0.0-linux-amd64 -sudo mv gardener-1.0.0-linux-amd64 /usr/local/bin/gardener +dpkg -i gardener_1.0.1_linux_arm64.deb ``` +### Windows + +To install ```gardener``` on Windows [download the latest release](https://github.com/devops-kung-fu/hookz/releases), extract, put somewhere on your PATH, and use. + ## File Support ```gardener``` will process the following PlantUML and Markdown extensions: @@ -146,7 +162,7 @@ Here are some examples from processed from [diagrams/src/example1.pu](diagrams/s ```gardener``` uses the CycloneDX to generate a Software Bill of Materials in CycloneDX format (v1.4) every time a developer commits code to this repository. More information for CycloneDX is available [here](https://cyclonedx.org) -The SBoM for the last commit of ```gardener``` is available [here](gardener-sbom.json). +The SBoM for the last commit of ```gardener``` is available [here](sbom/gardener.cyclonedx.json). ## Credits diff --git a/cmd/generate.go b/cmd/generate.go index 96001fb..41f6377 100644 --- a/cmd/generate.go +++ b/cmd/generate.go @@ -8,7 +8,7 @@ import ( "github.com/gookit/color" "github.com/spf13/cobra" - "github.com/devops-kung-fu/gardener/src" + src "github.com/devops-kung-fu/gardener/lib" ) var ( diff --git a/cmd/root.go b/cmd/root.go index b223208..7526e28 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -15,7 +15,7 @@ import ( var ( Afs = &afero.Afero{Fs: afero.NewOsFs()} - version = "1.0.0" + version = "1.0.1" debug bool Verbose bool rootCmd = &cobra.Command{ diff --git a/go.mod b/go.mod index 23436d6..d6e86cf 100644 --- a/go.mod +++ b/go.mod @@ -3,21 +3,21 @@ module github.com/devops-kung-fu/gardener go 1.18 require ( - github.com/devops-kung-fu/common v0.2.1 - github.com/gookit/color v1.5.1 - github.com/spf13/cobra v1.4.0 - github.com/stretchr/testify v1.7.2 + github.com/devops-kung-fu/common v0.2.5 + github.com/gookit/color v1.5.2 + github.com/spf13/cobra v1.6.0 + github.com/stretchr/testify v1.8.0 ) -require golang.org/x/text v0.3.7 // indirect +require golang.org/x/text v0.4.0 // indirect require ( - github.com/davecgh/go-spew v1.1.0 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/spf13/afero v1.8.2 + github.com/spf13/afero v1.9.2 github.com/spf13/pflag v1.0.5 // indirect - github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + golang.org/x/sys v0.1.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index afd41a2..9cfee28 100644 --- a/go.sum +++ b/go.sum @@ -46,11 +46,12 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/devops-kung-fu/common v0.2.1 h1:Wy3bW2O269CWdCdsJlrOvRAqInd/vR9LPISFR8U3NX0= -github.com/devops-kung-fu/common v0.2.1/go.mod h1:1eupDyY9wxRUGpb/d5kdEHO2fVLGnoIPDP7pIBhyX/g= +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/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= @@ -114,14 +115,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.1 h1:Vjg2VEcdHpwq+oY63s/ksHrgJYCTo0bwWvmmYWdE9fQ= -github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= +github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI= +github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg= 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.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -138,20 +139,23 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +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.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= +github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= 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= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= +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= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -179,6 +183,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -287,8 +292,8 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/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.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/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/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= @@ -296,8 +301,8 @@ 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.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +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/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= @@ -445,7 +450,6 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/src/gardener.go b/lib/gardener.go similarity index 100% rename from src/gardener.go rename to lib/gardener.go diff --git a/src/gardener_test.go b/lib/gardener_test.go similarity index 100% rename from src/gardener_test.go rename to lib/gardener_test.go diff --git a/sbom/gardener.cyclonedx.json b/sbom/gardener.cyclonedx.json new file mode 100644 index 0000000..3445055 --- /dev/null +++ b/sbom/gardener.cyclonedx.json @@ -0,0 +1,780 @@ +{ + "bomFormat": "CycloneDX", + "specVersion": "1.4", + "serialNumber": "urn:uuid:164ac901-cddb-413c-82d2-267301e4b8e9", + "version": 1, + "metadata": { + "timestamp": "2022-10-20T16:08:57-06:00", + "tools": [ + { + "vendor": "anchore", + "name": "syft", + "version": "[not provided]" + } + ], + "component": { + "bom-ref": "af63bd4c8601b7f1", + "type": "file", + "name": "." + } + }, + "components": [ + { + "bom-ref": "pkg:golang/github.com/davecgh/go-spew@v1.1.1?package-id=82cf8b15f7c32de3", + "type": "library", + "name": "github.com/davecgh/go-spew", + "version": "v1.1.1", + "cpe": "cpe:2.3:a:davecgh:go-spew:v1.1.1:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/davecgh/go-spew@v1.1.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:cpe23", + "value": "cpe:2.3:a:davecgh:go_spew:v1.1.1:*:*:*:*:*:*:*" + }, + { + "name": "syft:location:0:path", + "value": "go.mod" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/devops-kung-fu/common@v0.2.5?package-id=28c16f739f670306", + "type": "library", + "name": "github.com/devops-kung-fu/common", + "version": "v0.2.5", + "cpe": "cpe:2.3:a:devops-kung-fu:common:v0.2.5:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/devops-kung-fu/common@v0.2.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:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops-kung:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops_kung:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:location:0:path", + "value": "gardener" + }, + { + "name": "syft:metadata:architecture", + "value": "amd64" + }, + { + "name": "syft:metadata:goCompiledVersion", + "value": "go1.19.2" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:Ktyp1vsE2iyQPbazSxkQ1CiUq29FblQk/fYPHa09AzA=" + }, + { + "name": "syft:metadata:mainModule", + "value": "github.com/devops-kung-fu/gardener" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/devops-kung-fu/common@v0.2.5?package-id=f95acdc3523b68eb", + "type": "library", + "name": "github.com/devops-kung-fu/common", + "version": "v0.2.5", + "cpe": "cpe:2.3:a:devops-kung-fu:common:v0.2.5:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/devops-kung-fu/common@v0.2.5", + "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:devops_kung_fu:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops-kung:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops_kung:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops:common:v0.2.5:*:*:*:*:*:*:*" + }, + { + "name": "syft:location:0:path", + "value": "go.mod" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/devops-kung-fu/gardener@v0.0.0-20220618181732-b2519ef8aa89?package-id=7d8f43b8e9e52b9e", + "type": "library", + "name": "github.com/devops-kung-fu/gardener", + "version": "v0.0.0-20220618181732-b2519ef8aa89", + "cpe": "cpe:2.3:a:devops-kung-fu:gardener:v0.0.0-20220618181732-b2519ef8aa89:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/devops-kung-fu/gardener@v0.0.0-20220618181732-b2519ef8aa89", + "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:gardener:v0.0.0-20220618181732-b2519ef8aa89:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops-kung:gardener:v0.0.0-20220618181732-b2519ef8aa89:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops_kung:gardener:v0.0.0-20220618181732-b2519ef8aa89:*:*:*:*:*:*:*" + }, + { + "name": "syft:cpe23", + "value": "cpe:2.3:a:devops:gardener:v0.0.0-20220618181732-b2519ef8aa89:*:*:*:*:*:*:*" + }, + { + "name": "syft:location:0:path", + "value": "gardener" + }, + { + "name": "syft:metadata:architecture", + "value": "amd64" + }, + { + "name": "syft:metadata:goCompiledVersion", + "value": "go1.19.2" + }, + { + "name": "syft:metadata:mainModule", + "value": "github.com/devops-kung-fu/gardener" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/gookit/color@v1.5.2?package-id=39dc11f7f368ac7b", + "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": "gardener" + }, + { + "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/gardener" + } + ] + }, + { + "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" + }, + { + "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/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/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/spf13/afero@v1.9.2?package-id=3afd2c9c9926cc57", + "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": "gardener" + }, + { + "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/gardener" + } + ] + }, + { + "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/cobra@v1.6.0?package-id=eb898f60f96e9285", + "type": "library", + "name": "github.com/spf13/cobra", + "version": "v1.6.0", + "cpe": "cpe:2.3:a:spf13:cobra:v1.6.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/cobra@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": "gardener" + }, + { + "name": "syft:metadata:architecture", + "value": "amd64" + }, + { + "name": "syft:metadata:goCompiledVersion", + "value": "go1.19.2" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI=" + }, + { + "name": "syft:metadata:mainModule", + "value": "github.com/devops-kung-fu/gardener" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/spf13/cobra@v1.6.0?package-id=c8c4404c1551709f", + "type": "library", + "name": "github.com/spf13/cobra", + "version": "v1.6.0", + "cpe": "cpe:2.3:a:spf13:cobra:v1.6.0:*:*:*:*:*:*:*", + "purl": "pkg:golang/github.com/spf13/cobra@v1.6.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/spf13/pflag@v1.0.5?package-id=a8aad8bded37a6c5", + "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", + "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": "gardener" + }, + { + "name": "syft:metadata:architecture", + "value": "amd64" + }, + { + "name": "syft:metadata:goCompiledVersion", + "value": "go1.19.2" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=" + }, + { + "name": "syft:metadata:mainModule", + "value": "github.com/devops-kung-fu/gardener" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/spf13/pflag@v1.0.5?package-id=b5f60d334205548", + "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", + "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/stretchr/testify@v1.8.0?package-id=384b2b91069c12ca", + "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", + "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/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e?package-id=fc6a8925c7d31029", + "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", + "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": "gardener" + }, + { + "name": "syft:metadata:architecture", + "value": "amd64" + }, + { + "name": "syft:metadata:goCompiledVersion", + "value": "go1.19.2" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=" + }, + { + "name": "syft:metadata:mainModule", + "value": "github.com/devops-kung-fu/gardener" + } + ] + }, + { + "bom-ref": "pkg:golang/github.com/xo/terminfo@v0.0.0-20220910002029-abceb7e1c41e?package-id=b516433ce4c71aa5", + "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", + "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/golang.org/x/sys@v0.1.0?package-id=f0dbacc78b47bc77", + "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", + "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/golang.org/x/text@v0.4.0?package-id=bbd92e31437d37fa", + "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", + "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": "gardener" + }, + { + "name": "syft:metadata:architecture", + "value": "amd64" + }, + { + "name": "syft:metadata:goCompiledVersion", + "value": "go1.19.2" + }, + { + "name": "syft:metadata:h1Digest", + "value": "h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=" + }, + { + "name": "syft:metadata:mainModule", + "value": "github.com/devops-kung-fu/gardener" + } + ] + }, + { + "bom-ref": "pkg:golang/golang.org/x/text@v0.4.0?package-id=4ce8c6d02da0599a", + "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", + "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/gopkg.in/yaml.v3@v3.0.1?package-id=7d36a1c0c358a2f8", + "type": "library", + "name": "gopkg.in/yaml.v3", + "version": "v3.0.1", + "purl": "pkg:golang/gopkg.in/yaml.v3@v3.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" + } + ] + } + ] +}