Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TUF from scaffolding for validating cosign. #2146

Merged
merged 5 commits into from Aug 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/kind-verify-attestation.yaml
Expand Up @@ -32,21 +32,15 @@ jobs:
strategy:
matrix:
k8s-version:
- v1.22.x
# Try without this one now, might have problems with job restartings
# may require upstream changes.
- v1.23.x
- v1.24.x

env:
KNATIVE_VERSION: "1.5.0"
KNATIVE_VERSION: "1.6.0"
KO_DOCKER_REPO: "registry.local:5000/policy-controller"
SCAFFOLDING_RELEASE_VERSION: "v0.3.0"
SCAFFOLDING_RELEASE_VERSION: "v0.4.2"
GO111MODULE: on
GOFLAGS: -ldflags=-s -ldflags=-w
KOCACHE: ~/ko
# Trust the custom Rekor API endpoint for fetching the Public Key from it.
SIGSTORE_TRUST_REKOR_API_PUBLIC_KEY: "true"
# We are only testing keyless here, so set it.
COSIGN_EXPERIMENTAL: "true"

Expand All @@ -67,8 +61,11 @@ jobs:
run: |
make cosign

- name: Install cluster + cosign
- name: Install cluster + sigstore
uses: sigstore/scaffolding/actions/setup@main
with:
legacy-variables: "false"
k8s-version: ${{ matrix.k8s-version }}

- name: Create sample image - demoimage
run: |
Expand All @@ -86,6 +83,10 @@ jobs:
echo Created image $demoimage
popd

- name: Initialize with our custom TUF root
TUF_MIRROR=$(kubectl -n tuf-system get ksvc tuf -ojsonpath='{.status.url})
./cosign initialize --mirror $TUF_MIRROR --root ./root.json

- name: Sign demoimage with cosign
run: |
./cosign sign --rekor-url ${{ env.REKOR_URL }} --fulcio-url ${{ env.FULCIO_URL }} --force --allow-insecure-registry ${{ env.demoimage }} --identity-token ${{ env.OIDC_TOKEN }}
Expand Down