-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.55 KB
/
release-scan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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: |
task backend:ci-image-scan \
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@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 }}