-
Notifications
You must be signed in to change notification settings - Fork 0
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
6 changed files
with
119 additions
and
5 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 |
---|---|---|
|
@@ -6,6 +6,10 @@ inputs: | |
description: "Task version" | ||
required: true | ||
default: "3.33.1" | ||
trivy-version: | ||
description: "Trivy version" | ||
required: true | ||
default: "v0.57.1" | ||
python-version: | ||
description: "Python version" | ||
required: true | ||
|
@@ -23,6 +27,11 @@ runs: | |
with: | ||
version: ${{ inputs.task-version }} | ||
|
||
- name: Install Trivy | ||
uses: aquasecurity/[email protected] | ||
with: | ||
version: ${{ inputs.trivy-version }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
|
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,47 @@ | ||
name: 🔒 Security Scan | ||
|
||
on: | ||
schedule: | ||
# Every Sunday at 00:00 UTC | ||
- cron: 0 0 * * 0 | ||
workflow_dispatch: | ||
|
||
jobs: | ||
scan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Environment | ||
uses: ./.github/actions/setup_environment | ||
|
||
- name: Get latest image tag | ||
id: get_tag | ||
uses: pozetroninc/[email protected] | ||
with: | ||
owner: ${{ github.repository_owner }} | ||
repo: ${{ github.event.repository.name }} | ||
excludes: prerelease, draft | ||
|
||
- name: Scan image for vulnerabilities | ||
id: scan | ||
run: | | ||
task backend:ci-image-scan | ||
env: | ||
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | ||
IMAGE_NAME: ${{ github.event.repository.name }} | ||
IMAGE_TAG: ${{ steps.get_tag.outputs.release }} | ||
|
||
- name: Report vulnerabilities | ||
uses: ovsds/create-or-update-unique-issue-action@main | ||
with: | ||
title: "Security scan issues for ${{ steps.get_tag.outputs.release }}" | ||
body: | | ||
## Vulnerabilities found | ||
``` | ||
${{ steps.scan.outputs.stdout }} | ||
``` | ||
unique-title-includes: "Security scan issues for " | ||
close: ${{ steps.scan.outputs.exit_code == 0 }} |
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,11 @@ | ||
scan: | ||
scanners: | ||
- vuln | ||
- misconfig | ||
- secret | ||
|
||
severity: | ||
- HIGH | ||
- CRITICAL | ||
|
||
exit-code: 1 |