-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cruizen-patch-1
- Loading branch information
Showing
123 changed files
with
8,393 additions
and
375 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,48 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow checks out code, builds an image, performs a container image | ||
# vulnerability scan with Anchore's Grype tool, and integrates the results with GitHub Advanced Security | ||
# code scanning feature. For more information on the Anchore scan action usage | ||
# and parameters, see https://github.com/anchore/scan-action. For more | ||
# information on Anchore's container image scanning tool Grype, see | ||
# https://github.com/anchore/grype | ||
name: Anchore Grype vulnerability scan | ||
|
||
on: | ||
push: | ||
branches: [ "master", "platform9-v*" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '44 8 * * 4' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
Anchore-Build-Scan: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v4 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag platform9/luigi_dev:latest | ||
- name: Run the Anchore Grype scan action | ||
uses: anchore/scan-action@v3 | ||
id: scan | ||
with: | ||
image: "platform9/luigi_dev:latest" | ||
fail-build: false | ||
severity-cutoff: critical | ||
- name: Upload vulnerability report | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: ${{ steps.scan.outputs.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Unit Tests and Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
environment: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
go-version: 1.19 | ||
check-latest: true | ||
cache: true | ||
- name: Print the version of golang | ||
run: go version | ||
# - name: Run golangci-lint | ||
# uses: golangci/[email protected] | ||
# with: | ||
# skip-pkg-cache: true | ||
# args: --timeout=5m | ||
build_and_unit_test: | ||
environment: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
go-version: 1.19 | ||
check-latest: true | ||
cache: true | ||
- name: Print the version of golang | ||
run: go version | ||
- name: Run unit tests with code coverage | ||
run: make test | ||
- name: Build | ||
run: make build | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./cover.out |
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,19 @@ | ||
name: Vuln check | ||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "v**" | ||
schedule: | ||
- cron: '* * * * *' | ||
permissions: | ||
security-events: write | ||
|
||
jobs: | ||
vuln-check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Golang Vulncheck | ||
uses: Templum/[email protected] |
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,48 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: trivy_scan | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '42 17 * * 0' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build_image: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
name: Build | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build an image from Dockerfile | ||
run: | | ||
docker build -t docker.io/platform9/luigi:${{ github.sha }} . | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe | ||
with: | ||
image-ref: 'docker.io/platform9/luigi:${{ github.sha }}' | ||
format: 'template' | ||
template: '@/contrib/sarif.tpl' | ||
output: 'trivy-results.sarif' | ||
severity: 'CRITICAL,HIGH' | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.