-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (61 loc) · 2.37 KB
/
dependency-review.yml
File metadata and controls
69 lines (61 loc) · 2.37 KB
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
name: Dependency Review
on:
push:
branches: [ "**" ]
paths:
- 'Cargo.toml'
- 'Cargo.lock'
- 'scripts/native_bench/bench_pecos/Cargo.toml'
- 'scripts/native_bench/bench_pecos/Cargo.lock'
- 'pyproject.toml'
- 'python/**/pyproject.toml'
- 'uv.lock'
- 'requirements*.txt'
- '**/requirements*.txt'
- 'package.json'
- 'package-lock.json'
- 'pnpm-lock.yaml'
- 'yarn.lock'
- 'bun.lock'
- 'bun.lockb'
- '.github/dependabot.yml'
- '.github/workflows/dependency-review.yml'
pull_request:
# No `paths:` filter here on purpose. `dependency-review` is a required
# status check on protected branches; gating it by `paths:` blocks merges
# of PRs that don't touch dep files (GitHub waits forever for a check
# that doesn't fire). `actions/dependency-review-action` is cheap and
# idempotent on no-diff PRs.
branches: [ "main", "master", "development", "dev" ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
dependency-review:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Harden the runner (egress audit)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Review dependency changes in pull request
if: github.event_name == 'pull_request'
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4
with:
fail-on-severity: high
- name: Review dependency changes in push
if: github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000'
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4
with:
fail-on-severity: high
base-ref: ${{ github.event.before }}
head-ref: ${{ github.sha }}
- name: Skip dependency review for first push to a branch
if: github.event_name == 'push' && github.event.before == '0000000000000000000000000000000000000000'
run: echo "No previous commit exists for this pushed ref; dependency review will run on subsequent pushes."