Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): check licenses of dependencies on PRs #3625

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/dependency-review-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

comment_summary_in_pr: on-failure
vulnerability_check: false
license_check: true
# Source for the below is https://eng-handbook.hashicorp.services/licensing-and-dependencies/#disallowed-licenses
deny_licenses:
- AGPL-1.0-only
- AGPL-1.0-or-later
- AGPL-3.0-only
- AGPL-3.0-or-later
- CC-BY-ND-1.0
- CC-BY-ND-2.0
- CC-BY-ND-2.0
- CC-BY-ND-3.0
- CC-BY-ND-3.0-DE
- CC-BY-ND-4.0
- CC-BY-SA-1.0
- CC-BY-SA-2.0
- CC-BY-SA-2.0-UK
- CC-BY-SA-2.1-JP
- CC-BY-SA-2.5
- CC-BY-SA-3.0
- CC-BY-SA-3.0-AT
- CC-BY-SA-3.0-DE
- CC-BY-SA-3.0-IGO
- CC-BY-SA-4.0
- GPL-1.0-only
- GPL-1.0-or-later
- GPL-2.0-only
- GPL-2.0-or-later
- GPL-3.0-only
- GPL-3.0-or-later
- LGPL-2.0-only
- LGPL-2.0-or-later
- LGPL-2.1-only
- LGPL-2.1-or-later
- LGPL-3.0-only
- LGPL-3.0-or-later
- NPL-1.0
- NPL-1.1
- OSL-1.0
- OSL-1.1
- OSL-2.0
- OSL-2.1
- OSL-3.0
- QPL-1.0
- QPL-1.0-INRIA-2004
- Sleepycat
# Also disallowed, but could not find license identifiers for:
# - BCL
# - qmail Terms of Distribution
# BUSL is also disallowed by any companies other than HashiCorp
# I do not know if adding BUSL here will cause problems, so skipping for now
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
name: Depcheck
name: Dependency Review

on:
merge_group:
types: [checks_requested]
pull_request:
branches:
- main

permissions:
contents: read
pull-requests: write

jobs:
depcheck:
runs-on: ubuntu-latest
Expand All @@ -26,9 +32,17 @@ jobs:
"@cdktf/commons",
# "@cdktf/cli-core",
]

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: "Run Depcheck"
run: |
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"

license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Check dependency licenses
uses: actions/dependency-review-action@0c155c5e8556a497adf53f2c18edabf945ed8e70 # v4.3.2
with:
config-file: ./.github/dependency-review-config.yml
Loading