-
Notifications
You must be signed in to change notification settings - Fork 22
70 lines (59 loc) · 1.74 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Security
on:
push:
branches:
- 'master'
tags:
- '*'
paths-ignore:
- '**/README.md'
- '.github/RELEASE.md'
pull_request:
paths-ignore:
- '**/README.md'
- '.github/RELEASE.md'
jobs:
snyk-lint-python:
runs-on: ubuntu-latest
strategy:
matrix:
req_path: ["deploy/requirements.txt", "docs/requirements.txt"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: install dependencies
run: pip install -r ${{ matrix.req_path }}
- name: Copy requirements.txt at root of GITHUB_WORKSPACE for Snyk
run: cp ${{ matrix.req_path }} .
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/python@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
continue-on-error: true
# args: --sarif-file-output=snyk.sarif
# - name: Upload result to GitHub Code Scanning
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: snyk.sarif
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Lint Dockerfile
id: hadolint
uses: hadolint/[email protected]
with:
# only consider errors, not warning or info level
failure-threshold: error
output-file: ${{ github.workspace }}/hadolint.out
continue-on-error: true
- name: Upload hadolint output artifact
uses: actions/upload-artifact@v3
with:
name: hadolint
path: ${{ github.workspace }}/hadolint.out