-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.39 KB
/
Copy pathsecurity.yml
File metadata and controls
62 lines (54 loc) · 1.39 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
60
61
62
name: Security
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '41 4 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
trivy-config:
name: Trivy config scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Run Trivy config scan
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: config
scan-ref: .
format: table
severity: HIGH,CRITICAL
exit-code: '0'
trivy-image:
name: Build and scan image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build local image
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile
load: true
tags: postgresql:security-scan
build-args: |
BUILD_DATE=${{ github.event.repository.updated_at }}
VERSION=16.14-mldm1
APP_VERSION=16.14
IMAGE_REVISION=mldm1
VCS_REF=${{ github.sha }}
- name: Run Trivy image scan
uses: aquasecurity/trivy-action@v0.36.0
with:
image-ref: postgresql:security-scan
format: table
severity: HIGH,CRITICAL
exit-code: '0'