-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.23 KB
/
security_scan.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
44
45
46
47
48
49
50
51
name: "Test and Coverage"
on:
push:
branches:
- '*'
- '**'
- '*/*'
- '**/**'
- '!dev'
tags-ignore:
- '**'
workflow_call:
jobs:
semgrep_scan:
name: Smegrep Scan Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install semgrep
run: python3 -m pip install semgrep
- name: Run semgrep
run: semgrep scan --error
trivy_scan:
name: Trivy Scan Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Trivy
run: |
sudo apt-get install wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy
- name: Run Trivy on filesystem
run: trivy fs --scanners vuln,misconfig,secret,license --severity HIGH,CRITICAL --exit-code 1 .