Skip to content

Commit 081c6bd

Browse files
authored
fix synk security scan on CI (#4875)
# Which issue(s) this PR closes Closes #4503 Closes grafana/oncall-private#2876 ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes.
1 parent a16525e commit 081c6bd

File tree

7 files changed

+136
-738
lines changed

7 files changed

+136
-738
lines changed

.github/workflows/on-pull-requests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ jobs:
2222
snyk-security-scan:
2323
name: Snyk security scan
2424
uses: ./.github/workflows/snyk-security-scan.yml
25+
secrets: inherit

.github/workflows/on-release-published.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
snyk-security-scan:
1414
name: Snyk security scan
1515
uses: ./.github/workflows/snyk-security-scan.yml
16+
secrets: inherit
1617

1718
build-sign-and-publish-plugin-to-gcom:
1819
name: Build, sign, and publish frontend plugin to grafana.com

.github/workflows/snyk-security-scan.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,20 @@ jobs:
2323
uses: ./.github/actions/install-frontend-dependencies
2424
- name: Install Snyk
2525
uses: snyk/actions/setup@master
26-
- name: Run Snyk
27-
continue-on-error: true
28-
run: snyk monitor --all-projects --severity-threshold=high
26+
# NOTE: on the snyk monitor and snyk test commands, we are excluding the dev and tools directories
27+
# because we can't install the requirements.txt files of these directories alongside the main engine
28+
# requirements.txt (some conflicting dep versions). If we realllly wanted to test these, we should do it
29+
# as a seperate job and setup a separate Python env w/ just the deps of those projects. Since these projects
30+
# are really just dev/internal scripts we don't really need to worry about them for now
31+
- name: snyk monitor
32+
# https://docs.snyk.io/snyk-cli/commands/monitor
33+
run: snyk monitor --all-projects --severity-threshold=high --exclude=dev,tools
34+
env:
35+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
36+
- name: snyk test
37+
# https://docs.snyk.io/snyk-cli/commands/test
38+
# yamllint disable rule:line-length
39+
run: snyk test --all-projects --severity-threshold=high --exclude=dev,tools --fail-on=all --show-vulnerable-paths=all
40+
# yamllint enable rule:line-length
2941
env:
3042
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

engine/requirements.in

+7-7
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ humanize==4.10.0
3636
icalendar==5.0.10
3737
lxml==5.2.2
3838
markdown2==2.4.10
39-
opentelemetry-sdk==1.25.0
40-
opentelemetry-api==1.25.0
41-
opentelemetry-exporter-otlp-proto-grpc==1.25.0
42-
opentelemetry-instrumentation-logging==0.46b0
43-
opentelemetry-instrumentation-wsgi==0.46b0
44-
opentelemetry-instrumentation-requests==0.46b0
45-
opentelemetry-instrumentation-django==0.46b0
39+
opentelemetry-sdk==1.26.0
40+
opentelemetry-api==1.26.0
41+
opentelemetry-exporter-otlp-proto-grpc==1.26.0
42+
opentelemetry-instrumentation-logging==0.47b0
43+
opentelemetry-instrumentation-wsgi==0.47b0
44+
opentelemetry-instrumentation-requests==0.47b0
45+
opentelemetry-instrumentation-django==0.47b0
4646
phonenumbers==8.10.0
4747
prometheus_client==0.16.0
4848
psutil==5.9.4

engine/requirements.txt

+13-12
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ deprecated==1.2.14
7474
# via
7575
# opentelemetry-api
7676
# opentelemetry-exporter-otlp-proto-grpc
77+
# opentelemetry-semantic-conventions
7778
django==4.2.15
7879
# via
7980
# -r requirements.in
@@ -264,7 +265,7 @@ oauthlib==3.2.2
264265
# via
265266
# requests-oauthlib
266267
# social-auth-core
267-
opentelemetry-api==1.25.0
268+
opentelemetry-api==1.26.0
268269
# via
269270
# -r requirements.in
270271
# opentelemetry-exporter-otlp-proto-grpc
@@ -275,41 +276,41 @@ opentelemetry-api==1.25.0
275276
# opentelemetry-instrumentation-wsgi
276277
# opentelemetry-sdk
277278
# opentelemetry-semantic-conventions
278-
opentelemetry-exporter-otlp-proto-common==1.25.0
279+
opentelemetry-exporter-otlp-proto-common==1.26.0
279280
# via opentelemetry-exporter-otlp-proto-grpc
280-
opentelemetry-exporter-otlp-proto-grpc==1.25.0
281+
opentelemetry-exporter-otlp-proto-grpc==1.26.0
281282
# via -r requirements.in
282-
opentelemetry-instrumentation==0.46b0
283+
opentelemetry-instrumentation==0.47b0
283284
# via
284285
# opentelemetry-instrumentation-django
285286
# opentelemetry-instrumentation-logging
286287
# opentelemetry-instrumentation-requests
287288
# opentelemetry-instrumentation-wsgi
288-
opentelemetry-instrumentation-django==0.46b0
289+
opentelemetry-instrumentation-django==0.47b0
289290
# via -r requirements.in
290-
opentelemetry-instrumentation-logging==0.46b0
291+
opentelemetry-instrumentation-logging==0.47b0
291292
# via -r requirements.in
292-
opentelemetry-instrumentation-requests==0.46b0
293+
opentelemetry-instrumentation-requests==0.47b0
293294
# via -r requirements.in
294-
opentelemetry-instrumentation-wsgi==0.46b0
295+
opentelemetry-instrumentation-wsgi==0.47b0
295296
# via
296297
# -r requirements.in
297298
# opentelemetry-instrumentation-django
298-
opentelemetry-proto==1.25.0
299+
opentelemetry-proto==1.26.0
299300
# via
300301
# opentelemetry-exporter-otlp-proto-common
301302
# opentelemetry-exporter-otlp-proto-grpc
302-
opentelemetry-sdk==1.25.0
303+
opentelemetry-sdk==1.26.0
303304
# via
304305
# -r requirements.in
305306
# opentelemetry-exporter-otlp-proto-grpc
306-
opentelemetry-semantic-conventions==0.46b0
307+
opentelemetry-semantic-conventions==0.47b0
307308
# via
308309
# opentelemetry-instrumentation-django
309310
# opentelemetry-instrumentation-requests
310311
# opentelemetry-instrumentation-wsgi
311312
# opentelemetry-sdk
312-
opentelemetry-util-http==0.46b0
313+
opentelemetry-util-http==0.47b0
313314
# via
314315
# opentelemetry-instrumentation-django
315316
# opentelemetry-instrumentation-requests

grafana-plugin/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,14 @@
170170
"react-string-replace": "^0.4.4",
171171
"react-transition-group": "^4.4.5",
172172
"react-use": "^17.4.0",
173-
"stylelint": "^13.13.1",
173+
"stylelint": "^14.0.0",
174174
"stylelint-config-standard": "^22.0.0",
175175
"throttle-debounce": "^2.1.0",
176176
"tinycolor2": "^1.6.0",
177177
"tslib": "2.5.3"
178178
},
179179
"resolutions": {
180-
"braces": "3.0.3"
180+
"braces": "3.0.3",
181+
"micromatch": "4.0.6"
181182
}
182183
}

0 commit comments

Comments
 (0)