-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.15 KB
/
security-scan.yml
File metadata and controls
48 lines (41 loc) · 1.15 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
name: Security scan
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "37 15 * * 3"
permissions:
contents: read
jobs:
security:
permissions:
contents: read
security-events: write
actions: read
name: Security scan Postgre Container
runs-on: "ubuntu-latest"
strategy:
matrix:
version: [14, 15, 16, 17]
os: ["bookworm", "bullseye"]
steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: extractions/setup-just@v2
- name: Build Docker image
run: |
just build ${{ matrix.version }} ${{ matrix.os }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "ghcr.io/bitbytelabio/postgres:${{ matrix.version }}"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
severity: "CRITICAL,HIGH,MEDIUM,LOW"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"