-
Notifications
You must be signed in to change notification settings - Fork 929
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'karmada-io:master' into karmada-operator-rbac
- Loading branch information
Showing
119 changed files
with
16,117 additions
and
985 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,69 @@ | ||
name: image-scanning-on-schedule | ||
on: | ||
schedule: | ||
# Run this workflow "At 00:00 UTC on Sunday" | ||
- cron: '0 0 * * 0' | ||
permissions: | ||
contents: read | ||
jobs: | ||
use-trivy-to-scan-image: | ||
permissions: | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
name: image-scanning | ||
if: ${{ github.repository == 'karmada-io/karmada' }} | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- karmada-controller-manager | ||
- karmada-scheduler | ||
- karmada-descheduler | ||
- karmada-webhook | ||
- karmada-agent | ||
- karmada-scheduler-estimator | ||
- karmada-interpreter-webhook-example | ||
- karmada-aggregated-apiserver | ||
- karmada-search | ||
- karmada-operator | ||
- karmada-metrics-adapter | ||
karmada-version: [ release-1.11, release-1.10, release-1.9 ] | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ matrix.karmada-version }} | ||
- name: install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- id: gen_git_info | ||
run: | | ||
echo "ref=$(git rev-parse --symbolic-full-name HEAD)" >> "$GITHUB_OUTPUT" | ||
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
- name: Build images from Dockerfile | ||
run: | | ||
export VERSION=${{ matrix.karmada-version }} | ||
export REGISTRY="docker.io/karmada" | ||
make image-${{ matrix.target }} | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}' | ||
format: 'sarif' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
output: '${{ matrix.target }}:${{ matrix.karmada-version }}.trivy-results.sarif' | ||
- name: display scan results | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/karmada/${{ matrix.target }}:${{ matrix.karmada-version }}' | ||
format: 'table' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: '${{ matrix.target }}:${{ matrix.karmada-version }}.trivy-results.sarif' | ||
ref: ${{steps.gen_git_info.outputs.ref}} | ||
sha: ${{steps.gen_git_info.outputs.sha}} |
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 |
---|---|---|
@@ -1,62 +1,62 @@ | ||
name: image-scanning | ||
on: | ||
push: | ||
# Exclude branches created by Dependabot to avoid triggering current workflow | ||
# for PRs initiated by Dependabot. | ||
branches-ignore: | ||
- 'dependabot/**' | ||
permissions: | ||
contents: read | ||
jobs: | ||
use-trivy-to-scan-image: | ||
permissions: | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
name: image-scanning | ||
if: ${{ github.repository == 'karmada-io/karmada' }} | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- karmada-controller-manager | ||
- karmada-scheduler | ||
- karmada-descheduler | ||
- karmada-webhook | ||
- karmada-agent | ||
- karmada-scheduler-estimator | ||
- karmada-interpreter-webhook-example | ||
- karmada-aggregated-apiserver | ||
- karmada-search | ||
- karmada-operator | ||
- karmada-metrics-adapter | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
- name: install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Build an image from Dockerfile | ||
run: | | ||
export VERSION="latest" | ||
export REGISTRY="docker.io/karmada" | ||
make image-${{ matrix.target }} | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' | ||
format: 'sarif' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
output: 'trivy-results.sarif' | ||
- name: display scan results | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' | ||
format: 'table' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'trivy-results.sarif' | ||
name: image-scanning | ||
on: | ||
push: | ||
# Exclude branches created by Dependabot to avoid triggering current workflow | ||
# for PRs initiated by Dependabot. | ||
branches-ignore: | ||
- 'dependabot/**' | ||
permissions: | ||
contents: read | ||
jobs: | ||
use-trivy-to-scan-image: | ||
permissions: | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
name: image-scanning | ||
if: ${{ github.repository == 'karmada-io/karmada' }} | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- karmada-controller-manager | ||
- karmada-scheduler | ||
- karmada-descheduler | ||
- karmada-webhook | ||
- karmada-agent | ||
- karmada-scheduler-estimator | ||
- karmada-interpreter-webhook-example | ||
- karmada-aggregated-apiserver | ||
- karmada-search | ||
- karmada-operator | ||
- karmada-metrics-adapter | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
- name: install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Build an image from Dockerfile | ||
run: | | ||
export VERSION="latest" | ||
export REGISTRY="docker.io/karmada" | ||
make image-${{ matrix.target }} | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' | ||
format: 'sarif' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
output: 'trivy-results.sarif' | ||
- name: display scan results | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: 'docker.io/karmada/${{ matrix.target }}:latest' | ||
format: 'table' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'trivy-results.sarif' |
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
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.