Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sigstore/cosign
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.13.2
Choose a base ref
...
head repository: sigstore/cosign
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.13.6
Choose a head ref
  • 4 commits
  • 16 files changed
  • 3 contributors

Commits on Mar 21, 2024

  1. V1 go tuf update (#3598)

    * Updated v1 to support latest version of go-tuf
    
    Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
    
    * Udated documentation to be correct
    
    Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
    
    * Update sign_test.go
    
    swap out deprecated lib
    
    Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
    
    * Update keys.go
    
    swap out deprecated lib
    
    Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
    
    * Update sign_test.go
    
    fix gofmt issue
    
    Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
    
    * Update go.mod
    
    go mod tidy
    
    Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
    
    * Update validate-release.yml
    
    free up space ahead of running goreleaser
    
    Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
    
    ---------
    
    Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
    Signed-off-by: Bob Callaway <bobcallaway@users.noreply.github.com>
    Co-authored-by: Bob Callaway <bobcallaway@users.noreply.github.com>
    kommendorkapten and bobcallaway authored Mar 21, 2024
    Copy the full SHA
    566ab9d View commit details
  2. Update cloud build script to latest for v1.13.x (#3615)

    * Update cloud build script to latest for v1.13.x
    
    Will use the latest Go binary and Cosign version
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update validate-release.yml
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update ko-sign-release-images.sh
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update .goreleaser.yml
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update release.mk
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update .ko.yaml
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update Makefile
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update release.mk
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update ko-sign-release-images.sh
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update .ko.yaml
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update .ko.yaml
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update ko-sign-release-images.sh
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    * Update Makefile
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    
    ---------
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    haydentherapper authored Mar 21, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    aduh95 Antoine du Hamel
    Copy the full SHA
    eb4e699 View commit details
  3. 1.13.x release: Fix spacing (#3617)

    Signed-off-by: Hayden B <hblauzvern@google.com>
    haydentherapper authored Mar 21, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    tpoisseau tpoisseau
    Copy the full SHA
    91bb52b View commit details
  4. release 1.13.x: fix goreleaser (#3619)

    This is using Cosign v1 to sign, so we need to experimental flag set.
    
    Signed-off-by: Hayden B <hblauzvern@google.com>
    haydentherapper authored Mar 21, 2024
    Copy the full SHA
    eb4c436 View commit details
13 changes: 7 additions & 6 deletions .github/workflows/validate-release.yml
Original file line number Diff line number Diff line change
@@ -26,28 +26,29 @@ jobs:
check-signature:
runs-on: ubuntu-latest
container:
image: gcr.io/projectsigstore/cosign:v1.13.1@sha256:fd5b09be23ef1027e1bdd490ce78dcc65d2b15902e1f4ba8e04f3b4019cc1057
image: gcr.io/projectsigstore/cosign:v2.2.3-dev@sha256:0d795fa145b03026b7bc2a35e33068cdb75e1c1f974e604c17408bf7bd174967

steps:
- name: Check Signature
run: |
cosign verify ghcr.io/gythialy/golang-cross:v1.19.13-0@sha256:06e3605b227948431d43f4a868b68d4a771c71c728099f37856e404f2d77cf06
cosign verify ghcr.io/gythialy/golang-cross:v1.21.8-0@sha256:9c86fc6c6763cd5cd9a07f25083fc5a87f3525b5f8d7ff886822e2153f0c8405 \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity "https://github.com/gythialy/golang-cross/.github/workflows/release-golang-cross.yml@refs/tags/v1.21.8-0"
env:
TUF_ROOT: /tmp
COSIGN_EXPERIMENTAL: true

validate-release-job:
runs-on: ubuntu-latest
needs:
- check-signature

container:
image: ghcr.io/gythialy/golang-cross:v1.19.13-0@sha256:06e3605b227948431d43f4a868b68d4a771c71c728099f37856e404f2d77cf06
image: ghcr.io/gythialy/golang-cross:v1.21.8-0@sha256:9c86fc6c6763cd5cd9a07f25083fc5a87f3525b5f8d7ff886822e2153f0c8405

permissions: {}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

# Error: fatal: detected dubious ownership in repository at '/__w/cosign/cosign'
# To add an exception for this directory, call:
@@ -116,7 +117,7 @@ jobs:
run: make snapshot
env:
PROJECT_ID: honk-fake-project
RUNTIME_IMAGE: gcr.io/distroless/static:debug-nonroot
RUNTIME_IMAGE: gcr.io/distroless/static-debian12:nonroot

- name: check binaries
run: |
298 changes: 136 additions & 162 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -10,186 +10,160 @@ env:
# Prevents parallel builds from stepping on each others toes downloading modules
before:
hooks:
- go mod tidy
- /bin/bash -c 'if [ -n "$(git --no-pager diff --exit-code go.mod go.sum)" ]; then exit 1; fi'
# if running a release we will generate the images in this step
# if running in the CI the CI env va is set and we dont run the ko steps
# this is needed because we are generating files that goreleaser was not aware to push to GH project release
- /bin/bash -c 'if [ -z "$CI" ]; then make sign-release-images; fi'
- go mod tidy
- /bin/bash -c 'if [ -n "$(git --no-pager diff --exit-code go.mod go.sum)" ]; then exit 1; fi'

gomod:
proxy: true

sboms:
- artifacts: binary
- artifacts: binary

builds:
- id: linux
binary: cosign-linux-{{ .Arch }}
no_unique_dist_dir: true
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
goarch:
- amd64
- arm64
- arm
- s390x
- ppc64le
goarm:
- '7'
ldflags:
- "{{ .Env.LDFLAGS }}"
env:
- CGO_ENABLED=0

- id: linux-pivkey-pkcs11key-amd64
binary: cosign-linux-pivkey-pkcs11key-amd64
no_unique_dist_dir: true
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
goarch:
- amd64
ldflags:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key
hooks:
pre:
- apt-get update
- apt-get -y install libpcsclite-dev
env:
- PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/"

- id: darwin-amd64
binary: cosign-darwin-amd64
no_unique_dist_dir: true
env:
- CC=o64-clang
- CXX=o64-clang++
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- darwin
goarch:
- amd64
ldflags:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key

- id: darwin-arm64
binary: cosign-darwin-arm64
no_unique_dist_dir: true
env:
- CC=aarch64-apple-darwin21.4-clang
- CXX=aarch64-apple-darwin21.4-clang++
main: ./cmd/cosign
flags:
- -trimpath
goos:
- darwin
goarch:
- arm64
tags:
- pivkey
- pkcs11key
ldflags:
- "{{.Env.LDFLAGS}}"

- id: windows-amd64
binary: cosign-windows-amd64
no_unique_dist_dir: true
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
main: ./cmd/cosign
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
goos:
- windows
goarch:
- amd64
ldflags:
- -buildmode=exe
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key

- id: sget
binary: sget-{{ .Os }}-{{ .Arch }}
no_unique_dist_dir: true
mod_timestamp: '{{ .CommitTimestamp }}'
main: ./cmd/sget
flags:
- -trimpath
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- arm
- s390x
- ppc64le
goarm:
- 7
ignore:
- goos: windows
goarch: arm64
- goos: windows
goarch: arm
- goos: windows
goarch: s390x
- goos: windows
goarch: ppc64le
ldflags:
- "{{ .Env.LDFLAGS }}"
env:
- CGO_ENABLED=0
- id: linux
binary: cosign-linux-{{ .Arch }}
no_unique_dist_dir: true
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
goarch:
- amd64
- arm64
- arm
- s390x
- ppc64le
- riscv64
goarm:
- '7'
ldflags:
- "{{ .Env.LDFLAGS }}"
env:
- CGO_ENABLED=0

- id: linux-pivkey-pkcs11key-amd64
binary: cosign-linux-pivkey-pkcs11key-amd64
no_unique_dist_dir: true
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
goarch:
- amd64
ldflags:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key
hooks:
pre:
- apt-get update
- apt-get -y install --no-install-recommends libpcsclite-dev
env:
- PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/

- id: linux-pivkey-pkcs11key-arm64
binary: cosign-linux-pivkey-pkcs11key-arm64
no_unique_dist_dir: true
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- linux
goarch:
- arm64
ldflags:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key
hooks:
pre:
- dpkg --add-architecture arm64
- apt-get update
- apt-get install -y --no-install-recommends libpcsclite-dev:arm64
env:
- CC=aarch64-linux-gnu-gcc
- PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/

- id: darwin-amd64
binary: cosign-darwin-amd64
no_unique_dist_dir: true
env:
- CC=o64-clang
- CXX=o64-clang++
main: ./cmd/cosign
flags:
- -trimpath
mod_timestamp: '{{ .CommitTimestamp }}'
goos:
- darwin
goarch:
- amd64
ldflags:
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key

- id: darwin-arm64
binary: cosign-darwin-arm64
no_unique_dist_dir: true
env:
- CC=aarch64-apple-darwin22-clang
- CXX=aarch64-apple-darwin22-clang++
main: ./cmd/cosign
flags:
- -trimpath
goos:
- darwin
goarch:
- arm64
tags:
- pivkey
- pkcs11key
ldflags:
- "{{.Env.LDFLAGS}}"

- id: windows-amd64
binary: cosign-windows-amd64
no_unique_dist_dir: true
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
main: ./cmd/cosign
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
goos:
- windows
goarch:
- amd64
ldflags:
- -buildmode=exe
- "{{ .Env.LDFLAGS }}"
tags:
- pivkey
- pkcs11key

signs:
- id: cosign
signature: "${artifact}.sig"
cmd: ./dist/cosign-linux-amd64
args: ["sign-blob", "--output-signature", "${artifact}.sig", "--key", "gcpkms://projects/{{ .Env.PROJECT_ID }}/locations/{{ .Env.KEY_LOCATION }}/keyRings/{{ .Env.KEY_RING }}/cryptoKeys/{{ .Env.KEY_NAME }}/versions/{{ .Env.KEY_VERSION }}", "${artifact}"]
artifacts: binary
- id: sget
signature: "${artifact}.sig"
cmd: ./dist/cosign-linux-amd64
args: ["sign-blob", "--output-signature", "${artifact}.sig", "--key", "gcpkms://projects/{{ .Env.PROJECT_ID }}/locations/{{ .Env.KEY_LOCATION }}/keyRings/{{ .Env.KEY_RING }}/cryptoKeys/{{ .Env.KEY_NAME }}/versions/{{ .Env.KEY_VERSION }}", "${artifact}"]
artifacts: binary
ids:
- sget
# Keyless
- id: cosign-keyless
signature: "${artifact}-keyless.sig"
certificate: "${artifact}-keyless.pem"
cmd: ./dist/cosign-linux-amd64
args: ["sign-blob", "--output-signature", "${artifact}-keyless.sig", "--output-certificate", "${artifact}-keyless.pem", "${artifact}"]
artifacts: binary
- id: sget-keyless
signature: "${artifact}-keyless.sig"
certificate: "${artifact}-keyless.pem"
cmd: ./dist/cosign-linux-amd64
args: ["sign-blob", "--output-signature", "${artifact}-keyless.sig", "--output-certificate", "${artifact}-keyless.pem", "${artifact}"]
artifacts: binary
ids:
- sget
- id: checksum-keyless
signature: "${artifact}-keyless.sig"
certificate: "${artifact}-keyless.pem"
@@ -224,9 +198,9 @@ nfpms:
type: "symlink"

archives:
- format: binary
name_template: "{{ .Binary }}"
allow_different_binary_count: true
- format: binary
name_template: "{{ .Binary }}"
allow_different_binary_count: true

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ lint: golangci-lint ## Run golangci-lint linter
$(GOLANGCI_LINT_BIN) run -n

test:
go test $(shell go list ./... | grep -v third_party/)
GODEBUG=x509sha1=1 go test $(shell go list ./... | grep -v third_party/)

clean:
rm -rf cosign
Loading