-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
101 changed files
with
2,683 additions
and
2,213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/configuration-chainsaw-v1alpha2.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha2 | ||
kind: Configuration | ||
metadata: | ||
name: configuration | ||
spec: | ||
cleanup: | ||
delayBeforeCleanup: 3s | ||
discovery: | ||
fullName: true | ||
execution: | ||
failFast: true | ||
forceTerminationGracePeriod: 5s | ||
parallel: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
|
||
name: CodeQL | ||
|
||
permissions: {} | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
scan-trivy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run trivy vulnerability scanner in repo mode | ||
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0 | ||
with: | ||
scan-type: fs | ||
ignore-unfixed: false | ||
format: sarif | ||
output: trivy-results.sarif | ||
severity: CRITICAL,HIGH,MEDIUM | ||
scanners: vuln,secret | ||
exit-code: "0" | ||
vuln-type: os,library | ||
env: | ||
TRIVY_DB_REPOSITORY: "public.ecr.aws/aquasecurity/trivy-db:2" | ||
- name: Upload trivy scan results | ||
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 | ||
with: | ||
sarif_file: trivy-results.sarif | ||
category: code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
|
||
name: KO publish | ||
|
||
permissions: {} | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ko-publish: | ||
permissions: | ||
id-token: write | ||
packages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Setup go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: go.mod | ||
cache-dependency-path: go.sum | ||
- name: Run ko | ||
run: | | ||
set -e | ||
REGISTRY=ghcr.io \ | ||
REGISTRY_USERNAME=${{ github.actor }} \ | ||
REGISTRY_PASSWORD=${{ secrets.GITHUB_TOKEN }} \ | ||
make ko-publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
|
||
name: Release | ||
|
||
permissions: {} | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
goreleaser: | ||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
pull-requests: write | ||
outputs: | ||
hashes: ${{ steps.hash.outputs.hashes }} | ||
image: ${{ steps.digest.outputs.image }} | ||
digest: ${{ steps.digest.outputs.digest }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free disk space | ||
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
with: | ||
tool-cache: true | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: false | ||
docker-images: true | ||
swap-storage: false | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Fetch all tags | ||
run: | | ||
set -e | ||
git fetch --force --tags | ||
- name: Setup go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: go.mod | ||
cache-dependency-path: go.sum | ||
- name: Install cosign | ||
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0 | ||
- name: Install syft | ||
uses: anchore/sbom-action/download-syft@251a468eed47e5082b105c3ba6ee500c0e65a764 # v0.17.6 | ||
- name: Install ko | ||
uses: ko-build/setup-ko@3aebd0597dc1e9d1a26bcfdb7cbeb19c131d3037 # v0.7 | ||
- name: Run goreleaser | ||
id: goreleaser | ||
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean --timeout 90m | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload artifacts.json | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist/artifacts.json | ||
asset_name: artifacts.json | ||
tag: ${{ github.ref }} | ||
- name: Upload metadata.json | ||
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist/metadata.json | ||
asset_name: metadata.json | ||
tag: ${{ github.ref }} | ||
- name: Generate subject | ||
id: hash | ||
env: | ||
ARTIFACTS: "${{ steps.goreleaser.outputs.artifacts }}" | ||
run: | | ||
set -euo pipefail | ||
checksum_file=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Checksum") | .path') | ||
hashes=$(cat $checksum_file | base64 -w0) | ||
echo "hashes=$hashes" >> $GITHUB_OUTPUT | ||
- name: Image digest | ||
id: digest | ||
env: | ||
ARTIFACTS: "${{ steps.goreleaser.outputs.artifacts }}" | ||
run: | | ||
set -euo pipefail | ||
image_and_digest=$(echo "$ARTIFACTS" | jq -r '.[] | select (.type=="Docker Manifest") | .path') | ||
image=$(echo "${image_and_digest}" | cut -d'@' -f1 | cut -d':' -f1) | ||
digest=$(echo "${image_and_digest}" | cut -d'@' -f2) | ||
echo "image=$image" >> "$GITHUB_OUTPUT" | ||
echo "digest=$digest" >> "$GITHUB_OUTPUT" | ||
provenance: | ||
needs: | ||
- goreleaser | ||
permissions: | ||
actions: read | ||
id-token: write | ||
contents: write | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0 | ||
with: | ||
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}" | ||
upload-assets: true | ||
|
||
image-provenance: | ||
needs: | ||
- goreleaser | ||
permissions: | ||
actions: read | ||
id-token: write | ||
packages: write | ||
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.0.0 | ||
with: | ||
image: ${{ needs.goreleaser.outputs.image }} | ||
digest: ${{ needs.goreleaser.outputs.digest }} | ||
registry-username: ${{ github.actor }} | ||
secrets: | ||
registry-password: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.