-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1391 from ScilifelabDataCentre/dev
Release to fix security issues
- Loading branch information
Showing
31 changed files
with
835 additions
and
402 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
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,24 @@ | ||
# Yamtllint: Lint Yaml files. | ||
# A linter for YAML files. Checks for: | ||
# - syntax validity | ||
# - weirdnesses like key repetition and cosmetic problems such as: | ||
# - lines length | ||
# - trailing spaces | ||
# - indentation | ||
# etc. | ||
--- | ||
name: Yamllint | ||
on: [push] | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: yaml-lint | ||
uses: ibiqlik/action-yamllint@v3 | ||
with: | ||
config_data: | | ||
extends: default | ||
rules: | ||
line-length: | ||
max: 120 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Trivy: Scan of current branch | ||
# Trivy is a comprehensive and versatile security scanner. | ||
# Trivy has scanners that look for security issues, and targets where it can find those issues. | ||
# https://github.com/aquasecurity/trivy | ||
# --------------------------------- | ||
name: Trivy - branch scan | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
jobs: | ||
scan: | ||
permissions: | ||
contents: read | ||
security-events: write | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
scan-type: "fs" | ||
ignore-unfixed: true | ||
format: "sarif" | ||
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" | ||
category: trivy |
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,17 +1,16 @@ | ||
# Trivy: | ||
# Trivy: Scan remote image on GHCR on schedule | ||
# Trivy (pronunciation) is a comprehensive and versatile security scanner. | ||
# Trivy has scanners that look for security issues, and targets where it can find those issues. | ||
# Trivy has scanners that look for security issues, | ||
# and targets where it can find those issues. | ||
# https://github.com/aquasecurity/trivy | ||
# --------------------------------- | ||
name: trivy | ||
name: Trivy - ghcr image scan - dev | ||
on: | ||
workflow_dispatch: | ||
branches: | ||
- master | ||
- dev | ||
schedule: | ||
# - cron: "*/5 * * * *" | ||
- cron: "0 7,13 * * *" | ||
- cron: "0 9,12,15 * * *" | ||
jobs: | ||
scan: | ||
permissions: | ||
|
@@ -26,16 +25,16 @@ jobs: | |
- name: Ensure lowercase name | ||
run: echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr "[:upper:]" "[:lower:]") >> $GITHUB_ENV | ||
|
||
- name: Run Trivy vulnerability scanner | ||
- name: Run Trivy on latest dev image | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: "ghcr.io/${{ env.REPOSITORY_OWNER }}/dds-backend:latest" | ||
image-ref: "ghcr.io/${{ env.REPOSITORY_OWNER }}/dds-backend:dev" | ||
format: "sarif" | ||
output: "trivy-results.sarif" | ||
output: "trivy-results-dev.sarif" | ||
severity: "CRITICAL,HIGH" | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
- name: Upload Trivy scan results to dev branch GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: "trivy-results.sarif" | ||
category: trivy | ||
sarif_file: "trivy-results-dev.sarif" | ||
category: trivy-dev |
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,42 @@ | ||
# Trivy: Scan remote image on GHCR on schedule | ||
# Trivy (pronunciation) is a comprehensive and versatile security scanner. | ||
# Trivy has scanners that look for security issues, | ||
# and targets where it can find those issues. | ||
# https://github.com/aquasecurity/trivy | ||
# --------------------------------- | ||
name: Trivy - ghcr image scan - master | ||
on: | ||
workflow_dispatch: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 7,15 * * *" | ||
jobs: | ||
scan: | ||
permissions: | ||
contents: read | ||
security-events: write | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: master | ||
|
||
- name: Ensure lowercase name | ||
run: echo REPOSITORY_OWNER=$(echo ${{ github.repository_owner }} | tr "[:upper:]" "[:lower:]") >> $GITHUB_ENV | ||
|
||
- name: Run Trivy on latest release image | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: "ghcr.io/${{ env.REPOSITORY_OWNER }}/dds-backend:latest" | ||
format: "sarif" | ||
output: "trivy-results-master.sarif" | ||
severity: "CRITICAL,HIGH" | ||
|
||
- name: Upload Trivy scan results to master branch GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: "trivy-results-master.sarif" | ||
category: trivy-master |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
--- | ||
printWidth: 120 |
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.