Skip to content

Commit 1fee7c6

Browse files
fix: Bump Cosign to latest v2.2.3 (#3355)
Versions of Cosign before v2.2.0 are not compatible with the latest TUF root. Fixes #3350 # Summary ... ## Testing Process ... ## Checklist - [ ] Review the contributing [guidelines](./../CONTRIBUTING.md) - [ ] Add a reference to related issues in the PR description. - [ ] Update documentation if applicable. - [ ] Add unit tests if applicable. - [ ] Add changes to the [CHANGELOG](./../CHANGELOG.md) if applicable. --------- Signed-off-by: Hayden Blauzvern <[email protected]> Signed-off-by: Bob Callaway <[email protected]> Co-authored-by: Bob Callaway <[email protected]>
1 parent b595e06 commit 1fee7c6

22 files changed

+562
-1053
lines changed

.github/workflows/builder_container-based_slsa3.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ jobs:
201201
with:
202202
repository: "${{ needs.detect-env.outputs.repository }}"
203203
ref: "${{ needs.detect-env.outputs.ref }}"
204-
go-version: "1.20"
204+
go-version: "1.21"
205205
# Note: This must be the non-randomized binary name, so that it can be downloaded from the release assets.
206206
binary: "${{ env.BUILDER_BINARY }}"
207207
compile-builder: "${{ inputs.compile-builder }}"

.github/workflows/builder_go_slsa3.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
with:
162162
repository: "${{ needs.detect-env.outputs.repository }}"
163163
ref: "${{ needs.detect-env.outputs.ref }}"
164-
go-version: "1.20"
164+
go-version: "1.21"
165165
# Note: This must be the non-randomized binary name, so that it can be downloaded from the release assets.
166166
binary: "${{ env.BUILDER_BINARY }}"
167167
compile-builder: "${{ inputs.compile-builder }}"

.github/workflows/generator_container_slsa3.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
with:
149149
repository: "${{ needs.detect-env.outputs.repository }}"
150150
ref: "${{ needs.detect-env.outputs.ref }}"
151-
go-version: "1.20"
151+
go-version: "1.21"
152152
binary: "${{ env.BUILDER_BINARY }}"
153153
compile-builder: "${{ inputs.compile-generator }}"
154154
# NOTE: We are using the generic generator.
@@ -165,9 +165,9 @@ jobs:
165165
service_account: ${{ inputs.gcp-service-account }}
166166

167167
- id: cosign-install
168-
uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # v3.2.0
168+
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0
169169
with:
170-
cosign-release: v2.2.1
170+
cosign-release: v2.2.3
171171
continue-on-error: true
172172

173173
# TODO(#2974): consolidate this code into a script

.github/workflows/generator_generic_slsa3.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
with:
161161
repository: "${{ needs.detect-env.outputs.repository }}"
162162
ref: "${{ needs.detect-env.outputs.ref }}"
163-
go-version: "1.20"
163+
go-version: "1.21"
164164
binary: "${{ env.BUILDER_BINARY }}"
165165
compile-builder: "${{ inputs.compile-generator }}"
166166
directory: "${{ env.BUILDER_DIR }}"

.github/workflows/pre-submit.actions.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
uses: ./__BUILDER_CHECKOUT_DIR__/.github/actions/secure-project-checkout-go
184184
with:
185185
path: __PROJECT_CHECKOUT_DIR__
186-
go-version: "1.20"
186+
go-version: "1.21"
187187

188188
secure-project-checkout-node:
189189
runs-on: ubuntu-latest
@@ -499,7 +499,7 @@ jobs:
499499
repository: "slsa-framework/slsa-github-generator"
500500
ref: "main"
501501
compile-builder: true
502-
go-version: "1.20"
502+
go-version: "1.21"
503503
binary: "slsa-generator-generic-linux-amd64"
504504
directory: "internal/builders/generic"
505505

@@ -516,7 +516,7 @@ jobs:
516516
repository: ${{ steps.detect.outputs.repository }}
517517
ref: ${{ steps.detect.outputs.ref }}
518518
builder-ref: "refs/tags/v1.6.0"
519-
go-version: "1.20"
519+
go-version: "1.21"
520520
binary: "slsa-generator-generic-linux-amd64"
521521
directory: "internal/builders/generic"
522522
# NOTE: compile-builder explicitly set to false.

.github/workflows/pre-submit.e2e.go.config-ldflags-main-dir.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
actions: read # For the entry point.
5151
uses: ./.github/workflows/builder_go_slsa3.yml
5252
with:
53-
go-version: "1.20"
53+
go-version: "1.21"
5454
config-file: .github/workflows/configs-go/config-ldflags-main-dir.yml
5555
evaluated-envs: "VERSION:${{needs.args.outputs.version}},COMMIT:${{needs.args.outputs.commit}},BRANCH:${{needs.args.outputs.branch}}"
5656
compile-builder: true

.github/workflows/pre-submit.lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
with:
5959
go-version-file: "go.mod"
6060
- env:
61-
GOLANGCI_LINT_VERSION: "1.53.2"
62-
GOLANGCI_LINT_CHECKSUM: "2298f73b9bc03b88b91fee06c5d519fc7f9d7f328e2c388615bbd7e85a9d6cae"
61+
GOLANGCI_LINT_VERSION: "1.57.0"
62+
GOLANGCI_LINT_CHECKSUM: "fc7a9f73d2e3de6aa0ef8d8586906e0067fed577f704b3b0bc29cdd6ad0b74d8"
6363
run: |
6464
set -euo pipefail
6565

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
actions: read # For the entrypoint.
6363
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@main
6464
with:
65-
go-version: "1.20"
65+
go-version: "1.21"
6666
config-file: .github/workflows/configs-container/config-release.yml
6767
compile-builder: true
6868

@@ -75,7 +75,7 @@ jobs:
7575
actions: read # For the entrypoint.
7676
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@main
7777
with:
78-
go-version: "1.20"
78+
go-version: "1.21"
7979
config-file: .github/workflows/configs-generic/config-release.yml
8080
compile-builder: true
8181

@@ -88,7 +88,7 @@ jobs:
8888
actions: read # For the entrypoint.
8989
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@main
9090
with:
91-
go-version: "1.20"
91+
go-version: "1.21"
9292
config-file: .github/workflows/configs-go/config-release.yml
9393
compile-builder: true
9494

@@ -101,6 +101,6 @@ jobs:
101101
actions: read # For the entrypoint.
102102
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@main
103103
with:
104-
go-version: "1.20"
104+
go-version: "1.21"
105105
config-file: .github/workflows/configs-docker/config-release.yml
106106
compile-builder: true

.golangci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
run:
1717
concurrency: 2
1818
deadline: 5m
19+
timeout: 5m
1920
issues:
2021
# TODO(github.com/slsa-framework/slsa-github-generator/issues/450): revive `package-comments` and `exported` rules.
2122
include:

github/oidctest.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func NewTestOIDCServer(t *testing.T, now time.Time, token *OIDCToken) (*httptest
7676

7777
// FIXME: Fix creating a test server that can return tokens that can be verified.
7878
var issuerURL string
79-
s, c := newTestOIDCServer(t, now, func(w http.ResponseWriter, r *http.Request) {
79+
s, c := newTestOIDCServer(t, now, func(w http.ResponseWriter, _ *http.Request) {
8080
// Allow the token to override the issuer for verification testing.
8181
issuer := issuerURL
8282
if token.Issuer != "" {
@@ -116,7 +116,7 @@ func NewTestOIDCServer(t *testing.T, now time.Time, token *OIDCToken) (*httptest
116116
}
117117

118118
func newRawTestOIDCServer(t *testing.T, now time.Time, status int, raw string) (*httptest.Server, *OIDCClient) {
119-
return newTestOIDCServer(t, now, func(w http.ResponseWriter, r *http.Request) {
119+
return newTestOIDCServer(t, now, func(w http.ResponseWriter, _ *http.Request) {
120120
// Respond with a very basic 3-part JWT token.
121121
w.WriteHeader(status)
122122
fmt.Fprintln(w, raw)
@@ -144,7 +144,7 @@ func newTestOIDCServer(t *testing.T, now time.Time, f http.HandlerFunc) (*httpte
144144
}
145145
c := OIDCClient{
146146
requestURL: requestURL,
147-
verifierFunc: func(ctx context.Context) (*oidc.IDTokenVerifier, error) {
147+
verifierFunc: func(_ context.Context) (*oidc.IDTokenVerifier, error) {
148148
return oidc.NewVerifier(s.URL, &testKeySet{}, &oidc.Config{
149149
Now: func() time.Time { return now },
150150
SkipClientIDCheck: true,

0 commit comments

Comments
 (0)