Skip to content

Commit

Permalink
Adding license checking using cargo-deny
Browse files Browse the repository at this point in the history
  • Loading branch information
Ajit Banerjee committed Jul 23, 2024
1 parent 21e1a58 commit 1e48c66
Show file tree
Hide file tree
Showing 28 changed files with 111 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ on:
pull_request:

jobs:
cargo-deny:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: warn
manifest-path: ./rust/Cargo.toml
command: check
command-arguments: "licenses"
build_and_test:
strategy:
fail-fast: false
Expand Down Expand Up @@ -82,6 +92,8 @@ jobs:
exit 1
fi
cargo deny check licenses
# Disabling this for now as a check; fails way too often.
#
# if [[ -e ./Cargo.lock ]] ; then
Expand Down
64 changes: 64 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[graph]
targets = [
]
no-default-features = false

[output]
feature-depth = 1

[advisories]
ignore = [
]
#git-fetch-with-cli = true

[licenses]
copyleft = "deny"
allow = [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"CC0-1.0",
"ISC",
"MIT",
"MPL-2.0",
"0BSD",
"Zlib",
"Unicode-DFS-2016",
"OpenSSL"
]
confidence-threshold = 0.8
exceptions = [
]

[[licenses.clarify]]
crate = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [
{ path = "LICENSE", hash = 0xbd0eed23 }
]


[bans]
wildcards = "allow"
allow = [
]
# List of crates to deny
deny = [
]


skip = [
]
skip-tree = [
]

[sources]
unknown-registry = "warn"
unknown-git = "warn"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []

[sources.allow-org]
github = [""]
gitlab = [""]
bitbucket = [""]
1 change: 1 addition & 0 deletions gitxet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "gitxet"
version = "0.14.5"
edition = "2021"
resolver = "2"
license = "BSD-3-Clause"

[[bin]]
name = "git-xet"
Expand Down
24 changes: 7 additions & 17 deletions libxet/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions libxet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "libxet"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[dependencies]
gitxetcore = { path = "../rust/gitxetcore" }
Expand Down
1 change: 1 addition & 0 deletions rust/cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "cache"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/cas_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "cas_client"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[features]
strict = []
Expand Down
1 change: 1 addition & 0 deletions rust/chunkpipe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "chunkpipe"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/common_constants/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "common_constants"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/data_analysis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "data_analysis"
version = "0.14.5"
edition = "2021"
description = "Single-pass algorithms to analyze (potentially large) data"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/error_printer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "error_printer"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/file_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "file_utils"
version = "0.14.2"
edition = "2021"
license = "BSD-3-Clause"

[dependencies]
colored = "2.0.0"
Expand Down
1 change: 1 addition & 0 deletions rust/gitxetcore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "gitxetcore"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[profile.release]
opt-level = 3
Expand Down
3 changes: 2 additions & 1 deletion rust/lazy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "lazy"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -12,4 +13,4 @@ tokio = { version = "1.36", features = ["full"] }
lazy_static = "1.4.0"

[dev-dependencies]
tempfile = "3"
tempfile = "3"
3 changes: 2 additions & 1 deletion rust/libmagic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "libmagic"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[lib]
doctest = false
Expand All @@ -13,4 +14,4 @@ serde = {version = "1.0.142", features = ["derive"] }
serde_json = "1.0.83"
tracing = "0.1.*"
tracing-attributes = "0.1"
tracing-subscriber = {version = "0.3", features = ["tracing-log"]}
tracing-subscriber = {version = "0.3", features = ["tracing-log"]}
1 change: 1 addition & 0 deletions rust/mdb_shard/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "mdb_shard"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/merkledb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "merkledb"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/merklehash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "merklehash"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/parutils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "parutils"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 2 additions & 1 deletion rust/pointer_file/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "pointer_file"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand All @@ -12,4 +13,4 @@ merklehash = {path = "../merklehash"}
gitxetcore = {path = "../gitxetcore"}

[features]
strict = []
strict = []
1 change: 1 addition & 0 deletions rust/progress_reporting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "progress_reporting"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[lib]
path = "src/lib.rs"
Expand Down
1 change: 1 addition & 0 deletions rust/prometheus_dict_encoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "prometheus_dict_encoder"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/retry_strategy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "retry_strategy"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[features]
strict = []
Expand Down
1 change: 1 addition & 0 deletions rust/shard_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "shard_client"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[features]
strict = []
Expand Down
1 change: 1 addition & 0 deletions rust/tableau_summary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "tableau_summary"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[dependencies]
error_printer = {path = "../error_printer"}
Expand Down
1 change: 1 addition & 0 deletions rust/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "utils"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

[lib]
name = "cas"
Expand Down
1 change: 1 addition & 0 deletions rust/xet_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "xet_config"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
1 change: 1 addition & 0 deletions rust/xetblob/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "xetblob"
version = "0.14.5"
edition = "2021"
license = "BSD-3-Clause"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down

0 comments on commit 1e48c66

Please sign in to comment.