Skip to content

Commit 27fbea2

Browse files
committed
chore(ci): check licenses of dependencies on PRs
1 parent 4f8c0c9 commit 27fbea2

File tree

2 files changed

+68
-2
lines changed

2 files changed

+68
-2
lines changed

.github/dependency-review-config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
comment_summary_in_pr: on-failure
2+
vulnerability_check: false
3+
license_check: true
4+
# Source for the below is https://eng-handbook.hashicorp.services/licensing-and-dependencies/#disallowed-licenses
5+
deny_licenses:
6+
- AGPL-1.0-only
7+
- AGPL-1.0-or-later
8+
- AGPL-3.0-only
9+
- AGPL-3.0-or-later
10+
- CC-BY-ND-1.0
11+
- CC-BY-ND-2.0
12+
- CC-BY-ND-2.0
13+
- CC-BY-ND-3.0
14+
- CC-BY-ND-3.0-DE
15+
- CC-BY-ND-4.0
16+
- CC-BY-SA-1.0
17+
- CC-BY-SA-2.0
18+
- CC-BY-SA-2.0-UK
19+
- CC-BY-SA-2.1-JP
20+
- CC-BY-SA-2.5
21+
- CC-BY-SA-3.0
22+
- CC-BY-SA-3.0-AT
23+
- CC-BY-SA-3.0-DE
24+
- CC-BY-SA-3.0-IGO
25+
- CC-BY-SA-4.0
26+
- GPL-1.0-only
27+
- GPL-1.0-or-later
28+
- GPL-2.0-only
29+
- GPL-2.0-or-later
30+
- GPL-3.0-only
31+
- GPL-3.0-or-later
32+
- LGPL-2.0-only
33+
- LGPL-2.0-or-later
34+
- LGPL-2.1-only
35+
- LGPL-2.1-or-later
36+
- LGPL-3.0-only
37+
- LGPL-3.0-or-later
38+
- NPL-1.0
39+
- NPL-1.1
40+
- OSL-1.0
41+
- OSL-1.1
42+
- OSL-2.0
43+
- OSL-2.1
44+
- OSL-3.0
45+
- QPL-1.0
46+
- QPL-1.0-INRIA-2004
47+
- Sleepycat
48+
# Also disallowed, but could not find license identifiers for:
49+
# - BCL
50+
# - qmail Terms of Distribution
51+
# BUSL is also disallowed by any companies other than HashiCorp
52+
# I do not know if adding BUSL here will cause problems, so skipping for now

.github/workflows/pr-depcheck.yml renamed to .github/workflows/pr-dependencies.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
name: Depcheck
1+
name: Dependency Review
2+
23
on:
34
merge_group:
45
types: [checks_requested]
56
pull_request:
67
branches:
78
- main
9+
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
814
jobs:
915
depcheck:
1016
runs-on: ubuntu-latest
@@ -26,9 +32,17 @@ jobs:
2632
"@cdktf/commons",
2733
# "@cdktf/cli-core",
2834
]
29-
3035
steps:
3136
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3237
- name: "Run Depcheck"
3338
run: |
3439
npx lerna exec --scope '${{ matrix.package }}' -- npx -y depcheck --ignores="@types/*,jsii,jsii-pacmak,jsii-docgen,yoga-layout-prebuilt,eslint,jest,tsc-files,typescript,esbuild,esbuild-jest,graphology-types"
40+
41+
license:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
45+
- name: Check dependency licenses
46+
uses: actions/dependency-review-action@0c155c5e8556a497adf53f2c18edabf945ed8e70 # v4.3.2
47+
with:
48+
config-file: ./.github/dependency-review-config.yml

0 commit comments

Comments
 (0)