-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Policy Reporter v3 Signed-off-by: Frank Jogeleit <[email protected]>
- Loading branch information
Showing
277 changed files
with
15,603 additions
and
10,925 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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: daily | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: daily |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- development | ||
- 3.x | ||
|
||
paths-ignore: | ||
- README.md | ||
|
@@ -14,25 +14,62 @@ on: | |
pull_request: | ||
branches: | ||
- main | ||
- 3.x | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@v2 | ||
- name: Checkout | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.2.0 | ||
with: | ||
go-version-file: go.mod | ||
cache-dependency-path: go.sum | ||
|
||
- name: Check go.mod | ||
run: | | ||
set -e | ||
go mod tidy && git diff --exit-code | ||
- name: Check code format | ||
run: | | ||
set -e | ||
make fmt | ||
git diff --exit-code | ||
- name: Run Trivy vulnerability scanner in repo mode | ||
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # v0.24.0 | ||
with: | ||
go-version: 1.22 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Get dependencies | ||
run: go get -v -t -d ./... | ||
scan-type: 'fs' | ||
ignore-unfixed: true | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
- name: Calc coverage | ||
run: make coverage | ||
|
||
- name: Convert coverage to lcov | ||
uses: jandelgado/[email protected] | ||
uses: jandelgado/gcov2lcov-action@c680c0f7c7442485f1749eb2a13e54a686e76eb5 #v1.0.9 | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2.0.0 | ||
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0 | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
file: coverage.lcov | ||
file: coverage.lcov | ||
|
||
check-actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
- name: Ensure SHA pinned actions | ||
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@b8f9a25a51fe633d9215ac7734854dc11cd299cb # v3.0.13 | ||
with: | ||
# slsa-github-generator requires using a semver tag for reusable workflows. | ||
# See: https://github.com/slsa-framework/slsa-github-generator#referencing-slsa-builders-and-generators | ||
allowlist: | | ||
slsa-framework/slsa-github-generator |
This file was deleted.
Oops, something went wrong.
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,65 @@ | ||
name: release-chart | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'policy-reporter-chart-v*' | ||
|
||
jobs: | ||
helm-chart: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Verify Helm Docs | ||
run: | | ||
set -e | ||
make verify-helm-docs | ||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 | ||
with: | ||
version: v3.16.1 | ||
|
||
- name: Prepare GPG key | ||
run: | | ||
gpg_dir=.cr-gpg | ||
mkdir "$gpg_dir" | ||
keyring="$gpg_dir/secring.gpg" | ||
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring" | ||
passphrase_file="$gpg_dir/passphrase" | ||
echo "$GPG_PASSPHRASE" > "$passphrase_file" | ||
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV" | ||
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV" | ||
env: | ||
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}" #Referring secrets of github above | ||
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}" | ||
|
||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0 | ||
id: cr | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
CR_KEY: "${{ secrets.CR_KEY }}" | ||
CR_SIGN: true | ||
|
||
- name: Install Cosign | ||
uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # v3.2.0 | ||
|
||
- name: Push to OCI | ||
run: | | ||
set -e | ||
output=$(helm push .cr-release-packages/policy-reporter-{{ steps.cr.outputs.chart_version }}.tgz oci://ghcr.io/kyverno/charts 2>&1) | ||
digest=$( echo "$output" | grep Digest | cut -c9-) | ||
cosign sign --yes ghcr.io/kyverno/charts/policy-reporter@$digest |
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ build | |
/test.yaml | ||
*.db | ||
values*.yaml | ||
monitoring.yaml | ||
coverage.out* | ||
heap* | ||
/.env* | ||
|
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.