forked from kubeflow/manifests
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1017 Bytes
/
trivy.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
name: Image Extracting and Security Scanning
on:
push:
branches:
- master
jobs:
image-extraction-and-security-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# Install kustomize
- name: Install kustomize
run: |
sudo apt update
sudo apt install snapd
sudo snap install kustomize
# Install trivy
- name: Install trivy
run: |
sudo apt update
sudo snap install trivy
# Install Python
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
# Install prettytable package
- name: Install prettytable
run: |
pip install prettytable
- name: Run image extracting and security scanning script
run: |
cd hack
python3 trivy_scan.py
- name: Upload trivy scanned_results
uses: actions/upload-artifact@v4
with:
name: trivy_scanned_results
path: image_lists/