-
Notifications
You must be signed in to change notification settings - Fork 28
64 lines (56 loc) · 2.15 KB
/
static_analysis.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
name: static_analysis
# Runs the workflow on the below events:
# 1. on pull request raised to trunk branch.
# 2. on push event to trunk branch.
on:
push:
branches:
- trunk
pull_request:
branches:
- trunk
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
static_analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # v1.7.0
with:
sdk: stable
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: "stable"
cache-dependency-path: tools/osv-scanner/go.sum
# Runs dart lint rules
- name: Install dependencies and run analyze - mwc_demo/dart/iot_sender
working-directory: ./demos/mwc_demo/dart/iot_sender/
run: |
dart pub get
dart analyze
- name: Install dependencies and run analyze - at_notifications
working-directory: ./demos/at_notifications/
run: |
dart pub get
dart analyze
- name: Install dependencies and run analyze - at_demo_data
working-directory: ./packages/at_demo_data/
run: |
dart pub get
dart analyze
- name: Install dependencies and run analyze - at_data_share
working-directory: ./demos/at_data_share/
run: |
dart pub get
dart analyze
# Runs osv-scanner to find any vulnerable Dart dependencies
# It needs to look at pubspec.lock files, which is why it's
# placed here, as the `dart pub get` above will create them
- name: Run osv-scanner
run: |
go install github.com/google/osv-scanner/cmd/osv-scanner@6316373e47d7e3e4b4fd3630c4bbc10987738de6 # v1.4.3
osv-scanner --lockfile=./demos/mwc_demo/dart/iot_sender/pubspec.lock
osv-scanner --lockfile=./demos/at_notifications/pubspec.lock
osv-scanner --lockfile=./packages/at_demo_data/pubspec.lock
osv-scanner --lockfile=./demos/at_data_share/pubspec.lock