Skip to content

Commit c8e001e

Browse files
committed
Support SLSA level 3
1 parent 9972832 commit c8e001e

File tree

25 files changed

+107
-1953
lines changed

25 files changed

+107
-1953
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Tell us about a problem you are experiencing
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**What steps did you take:**
11+
[A clear and concise description steps that can be used to reproduce the problem.]
12+
13+
**What happened:**
14+
[A small description of the issue]
15+
16+
**What did you expect:**
17+
[A description of what was expected]
18+
19+
**Anything else you would like to add:**
20+
[Additional information that will assist in solving the issue.]
21+
22+
**Additional context:**
23+
Add any other context about the problem here.
24+
25+
**Environment:**
26+
27+
- Kubernetes version (execute `kubectl version`):
28+
- kapp-controller version (execute `kubectl get deployment -n kapp-controller kapp-controller -o yaml` and the annotation is `kbld.k14s.io/images`):

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the problem/challenge you have:**
11+
[A description of the current challenge that you are experiencing.]
12+
13+
**Describe the solution you'd like:**
14+
[A clear and concise description of what you want to happen. If applicable a visual representation of the UX.]
15+
16+
**Anything else you would like to add:**
17+
[Additional information that will assist in solving the issue.]

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 58 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
COSIGN_EXPERIMENTAL: 1
77
REGISTRY: ghcr.io
88
IMAGE_NAME: ${{ github.repository }}
9-
VERSION: 0.5.1
9+
VERSION: 0.6.0
1010

1111
jobs:
1212
build:
@@ -16,7 +16,8 @@ jobs:
1616
contents: write
1717
packages: write
1818
outputs:
19-
image-release: ${{ steps.image-info.outputs.release }}
19+
image-name: ${{ steps.image-info.outputs.image_name }}
20+
image-digest: ${{ steps.image-info.outputs.image_digest }}
2021
steps:
2122
- name: Checkout source code
2223
uses: actions/checkout@v3.1.0
@@ -56,7 +57,9 @@ jobs:
5657
package_file=repo/package-repository.yml
5758
image_release=$(yq '.spec.fetch.imgpkgBundle.image' ${package_file})
5859
echo "IMAGE_RELEASE=${image_release}" >> $GITHUB_ENV
59-
echo "release=${image_release}" >> $GITHUB_OUTPUT
60+
61+
echo "image_name=$(echo ${image_release} | cut -d'@' -f1)" >> $GITHUB_OUTPUT
62+
echo "image_digest=$(echo ${image_release} | cut -d'@' -f2)" >> $GITHUB_OUTPUT
6063
6164
- name: Add additional tags to OCI image
6265
run: |
@@ -81,7 +84,8 @@ jobs:
8184
packages: write
8285
id-token: write
8386
env:
84-
IMAGE_RELEASE: ${{ needs.build.outputs.image-release }}
87+
IMAGE_NAME: ${{ needs.build.outputs.image-name }}
88+
IMAGE_DIGEST: ${{ needs.build.outputs.image-digest }}
8589
steps:
8690
- name: Install Cosign
8791
uses: sigstore/cosign-installer@v2.8.1
@@ -95,49 +99,63 @@ jobs:
9599

96100
- name: Sign image
97101
run: |
98-
cosign sign "${IMAGE_RELEASE}"
102+
cosign sign "${IMAGE_NAME}@${IMAGE_DIGEST}"
99103
100104
provenance:
101-
name: Provenance
102-
runs-on: ubuntu-22.04
103105
needs: [build,sign]
104106
permissions:
105-
packages: write
107+
actions: read
106108
id-token: write
107-
env:
108-
IMAGE_RELEASE: ${{ needs.build.outputs.image-release }}
109-
PROVENANCE_FILE: provenance.att
110-
steps:
111-
- name: Install Cosign
112-
uses: sigstore/cosign-installer@v2.8.1
109+
packages: write
110+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v1.4.0
111+
with:
112+
image: ${{ needs.build.outputs.image-name }}
113+
digest: ${{ needs.build.outputs.image-digest }}
114+
registry-username: ${{ inputs.registry-username }}
115+
secrets:
116+
registry-password: ${{ secrets.GITHUB_TOKEN }}
117+
118+
# provenance:
119+
# name: Provenance
120+
# runs-on: ubuntu-22.04
121+
# needs: [build,sign]
122+
# permissions:
123+
# packages: write
124+
# id-token: write
125+
# env:
126+
# IMAGE_RELEASE: ${{ needs.build.outputs.image-release }}
127+
# PROVENANCE_FILE: provenance.att
128+
# steps:
129+
# - name: Install Cosign
130+
# uses: sigstore/cosign-installer@v2.8.1
113131

114-
- name: Log into container registry
115-
uses: redhat-actions/podman-login@v1.4
116-
with:
117-
username: ${{ github.actor }}
118-
password: ${{ secrets.GITHUB_TOKEN }}
119-
registry: ${{ env.REGISTRY }}
132+
# - name: Log into container registry
133+
# uses: redhat-actions/podman-login@v1.4
134+
# with:
135+
# username: ${{ github.actor }}
136+
# password: ${{ secrets.GITHUB_TOKEN }}
137+
# registry: ${{ env.REGISTRY }}
120138

121-
- name: Extract digest
122-
run: |
123-
digest=$(echo ${IMAGE_RELEASE} | cut -d "@" -f2)
124-
echo "IMAGE_DIGEST=${digest}" >> $GITHUB_ENV
139+
# - name: Extract digest
140+
# run: |
141+
# digest=$(echo ${IMAGE_RELEASE} | cut -d "@" -f2)
142+
# echo "IMAGE_DIGEST=${digest}" >> $GITHUB_ENV
125143

126-
- name: Generate provenance
127-
uses: philips-labs/slsa-provenance-action@v0.7.2
128-
with:
129-
command: generate
130-
subcommand: container
131-
arguments: --repository ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} --tags ${{ env.VERSION }} --digest ${{ env.IMAGE_DIGEST }} --output-path ${{ env.PROVENANCE_FILE }}
132-
env:
133-
COSIGN_EXPERIMENTAL: 0
144+
# - name: Generate provenance
145+
# uses: philips-labs/slsa-provenance-action@v0.7.2
146+
# with:
147+
# command: generate
148+
# subcommand: container
149+
# arguments: --repository ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} --tags ${{ env.VERSION }} --digest ${{ env.IMAGE_DIGEST }} --output-path ${{ env.PROVENANCE_FILE }}
150+
# env:
151+
# COSIGN_EXPERIMENTAL: 0
134152

135-
- name: Attach provenance
136-
run: |
137-
jq '.predicate' "${PROVENANCE_FILE}" > provenance-predicate.att
138-
cosign attest --predicate provenance-predicate.att --type slsaprovenance "${IMAGE_RELEASE}"
153+
# - name: Attach provenance
154+
# run: |
155+
# jq '.predicate' "${PROVENANCE_FILE}" > provenance-predicate.att
156+
# cosign attest --predicate provenance-predicate.att --type slsaprovenance "${IMAGE_RELEASE}"
139157

140-
- uses: actions/upload-artifact@v3.1.1
141-
with:
142-
name: provenance.att
143-
path: ${{ env.PROVENANCE_FILE }}
158+
# - uses: actions/upload-artifact@v3.1.1
159+
# with:
160+
# name: provenance.att
161+
# path: ${{ env.PROVENANCE_FILE }}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Kadras Packages
22

3+
<a href="https://slsa.dev/spec/v0.1/levels"><img src="https://slsa.dev/images/gh-badge-level3.svg" alt="The SLSA Level 3 badge"></a>
4+
35
A collection of Kubernetes-native packages built with [Carvel](https://carvel.dev) and part of the Kadras project.
46

57
## Package Repository
@@ -95,6 +97,6 @@ This package repository is inspired by the work done by the Carvel team and the
9597

9698
## Supply Chain Security
9799

98-
This project is compliant with level 2 of the [SLSA Framework](https://slsa.dev).
100+
This project is compliant with level 3 of the [SLSA Framework](https://slsa.dev).
99101

100-
<img src="https://slsa.dev/images/SLSA-Badge-full-level2.svg" alt="The SLSA Level 2 badge" width=200>
102+
<img src="https://slsa.dev/images/SLSA-Badge-full-level3.svg" alt="The SLSA Level 3 badge" width=200>

repo/packages/cert-manager.packages.kadras.io/1.10.0.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

repo/packages/cert-manager.packages.kadras.io/1.10.1+kadras.1.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

repo/packages/cert-manager.packages.kadras.io/1.10.1.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)