File tree Expand file tree Collapse file tree 1 file changed +50
-4
lines changed Expand file tree Collapse file tree 1 file changed +50
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- name : Check for Snyk Vulnerabilities
2
+ name : Snyk Security
3
3
4
- on : # yamllint disable-line rule:truthy
4
+ on :
5
5
workflow_dispatch :
6
6
schedule :
7
- - cron : ' 0 12 * * *' # every day at 12pm UTC
7
+ # Run weekly on Sundays at 2:00 AM EST (7:00 AM UTC)
8
+ - cron : ' 0 7 * * 0'
9
+ push :
10
+ branches :
11
+ - main
8
12
9
13
jobs :
10
- snyk :
14
+ snyk-test :
11
15
name : snyk test
12
16
runs-on : ubuntu-latest
17
+ if : github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
18
+ permissions :
19
+ contents : write
20
+ pull-requests : write
21
+ security-events : write
13
22
steps :
14
23
- name : Checkout
15
24
uses : actions/checkout@v4
80
89
snyk
81
90
draft : false
82
91
# yamllint enable rule:line-length
92
+
93
+ snyk-monitor :
94
+ name : snyk monitor
95
+ runs-on : ubuntu-latest
96
+ if : github.event_name == 'push'
97
+ permissions :
98
+ contents : read
99
+ steps :
100
+ - name : Checkout
101
+ uses : actions/checkout@v4
102
+
103
+ - name : Set up Python 3.10
104
+ uses : actions/setup-python@v5
105
+ with :
106
+ python-version : 3.10.14
107
+ cache : ' pip'
108
+
109
+ - name : Display Python version
110
+ run : python -c "import sys; print(sys.version)"
111
+
112
+ - name : Install Dependencies
113
+ run : |
114
+ npm install snyk -g
115
+ sudo apt-get update -y
116
+ sudo apt-get install -y \
117
+ openssl libssl-dev libffi-dev pkg-config libxml2-dev \
118
+ libxmlsec1-dev libxmlsec1-openssl libgeos-dev proj-bin \
119
+ libpq-dev
120
+ pip3 install -r requirements.txt
121
+
122
+ - name : Run Snyk Monitor
123
+ run : |
124
+ # Authenticate with Snyk
125
+ snyk auth ${{ secrets.SNYK_TOKEN }}
126
+
127
+ # Run snyk monitor to track dependencies
128
+ snyk monitor --file=requirements.txt
You can’t perform that action at this time.
0 commit comments