Repository navigation
59 lines (50 loc) · 1.77 KB
/
Copy pathrelease-scan.yaml
File metadata and controls
59 lines (50 loc) · 1.77 KB
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
57
58
59
name: 🔒 Security Scan
on:
schedule:
# Every Sunday at 00:00 UTC
- cron: 0 0 * * 0
workflow_dispatch:
concurrency:
group: $${{ github.workflow }}
cancel-in-progress: false
jobs:
scan:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup Environment
uses: $/.github/actions/setup_environment
- name: Get latest image tag
id: get_tag
uses: pozetroninc/github-action-get-latest-release@2a61c339ea7ef0a336d1daa35ef0cb1418e7676c # v0.8.0
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@9bc0dcb1df5b70d1704c709f9cc0f40d260a5f40 # v1.4.0
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 }}" \
mise run ci-image-scan
- name: Report vulnerabilities
uses: ovsds/create-or-update-unique-issue-action@e5d7437e9f6acd688d3b09834d0494a732d87d2d # v1.1.1
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 }}