-
Notifications
You must be signed in to change notification settings - Fork 12
43 lines (37 loc) · 1.11 KB
/
security.yml
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
name: Security Check
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * *'
permissions:
contents: read
security-events: write
jobs:
scan:
name: 'Image Scan (PHP: ${{ matrix.php-version }})'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'
- '8.3'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Pull image
run: docker pull shopware/docker-base:${{ matrix.php-version }}
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Scan for vulnerabilities
id: scan
uses: crazy-max/ghaction-container-scan@v3
with:
image: shopware/docker-base:${{ matrix.php-version }}
dockerfile: ./${{ matrix.php-version }}/Dockerfile
- name: Upload SARIF file
if: ${{ steps.scan.outputs.sarif != '' }}
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.scan.outputs.sarif }}