π Security Scan #11
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
name: π Security Scan | |
on: | |
schedule: | |
# Every Sunday at 00:00 UTC | |
- cron: 0 0 * * 0 | |
workflow_dispatch: | |
jobs: | |
scan: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Environment | |
uses: ./.github/actions/setup_environment | |
with: | |
with-python: "false" | |
with-poetry: "false" | |
- 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 | |
uses: ovsds/run-with-output-action@v1 | |
continue-on-error: true | |
with: | |
run: | | |
IMAGE_REGISTRY="ghcr.io/${{ github.repository_owner }}" \ | |
IMAGE_NAME="${{ github.event.repository.name }}" \ | |
IMAGE_TAG="${{ steps.get_tag.outputs.release }}" \ | |
task backend:ci-image-scan | |
- name: Report vulnerabilities | |
uses: ovsds/create-or-update-unique-issue-action@v1 | |
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 }} |