diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 480a523..a58b66c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,9 @@ jobs: - name: Fetch the repository code uses: actions/checkout@v4 + - name: Deny banned crates and licenses + uses: EmbarkStudios/cargo-deny-action@v1 + - name: Build Docker image run: docker build . -t tinty diff --git a/Makefile b/Makefile index 8eda2a8..a597748 100644 --- a/Makefile +++ b/Makefile @@ -4,13 +4,16 @@ publish: publish_dry @echo "---------------" cargo publish -publish_dry: test_docker +publish_dry: setup_tests @echo "-------------------" @echo "Running publish_dry" @echo "-------------------" + @echo "Generating license file" + cargo about generate about.hbs > license.html @if [ -n "$(git status --porcelain)" ]; then \ echo "There are changes." && exit 1; \ fi + @echo "Publish dry run" cargo publish --dry-run test_docker: setup_tests @@ -36,4 +39,4 @@ build: @echo "Running build" @echo "-------------" cargo build --release - + cargo deny check diff --git a/about.hbs b/about.hbs new file mode 100644 index 0000000..699b3b0 --- /dev/null +++ b/about.hbs @@ -0,0 +1,70 @@ + + + + + + + +
+
+

Third Party Licenses

+

This page lists the licenses of the projects used in cargo-about.

+
+ +

Overview of licenses:

+ + +

All license text:

+ +
+ + + diff --git a/about.toml b/about.toml new file mode 100644 index 0000000..56100b6 --- /dev/null +++ b/about.toml @@ -0,0 +1,19 @@ +accepted = [ + "Apache-2.0", + "MIT", +] +targets = [ + "x86_64-unknown-linux-gnu", + "x86_64-unknown-linux-musl", + "x86_64-apple-darwin", +] +ignore-build-dependencies = false +ignore-dev-dependencies = false +ignore-transitive-dependencies = false +filter-noassertion = true + +[option-ext] +accepted = ["MPL-2.0"] + +[unicode-ident] +accepted = ["Unicode-DFS-2016"] diff --git a/deny.toml b/deny.toml new file mode 100644 index 0000000..8706eb5 --- /dev/null +++ b/deny.toml @@ -0,0 +1,52 @@ +targets = [ + { triple = "x86_64-unknown-linux-gnu" }, + { triple = "aarch64-unknown-linux-gnu" }, + { triple = "x86_64-unknown-linux-musl" }, + { triple = "aarch64-apple-darwin" }, + { triple = "x86_64-apple-darwin" }, +] +all-features = false +no-default-features = false +feature-depth = 1 + +[advisories] +vulnerability = "deny" +unmaintained = "deny" +notice = "deny" +unsound = "deny" + +[licenses] +unlicensed = "deny" +allow-osi-fsf-free = "neither" +copyleft = "deny" +# We want really high confidence when inferring licenses from text +confidence-threshold = 0.93 +allow = [ + "Apache-2.0", + "MIT", +] +exceptions = [ + { allow = [ + "Unicode-DFS-2016", + ], name = "unicode-ident" }, + { allow = [ + "MPL-2.0", + ], name = "option-ext" }, +] + +[bans] +multiple-versions = "deny" +wildcards = "deny" +deny = [ + { name = "openssl" }, + { name = "openssl-sys" }, + { name = "libssh2-sys" }, + + # No reason to use these + { name = "cmake" }, + { name = "windows" }, +] + +[sources] +unknown-registry = "deny" +unknown-git = "deny" diff --git a/license.html b/license.html new file mode 100644 index 0000000..f0d1fdc --- /dev/null +++ b/license.html @@ -0,0 +1,2524 @@ + + + + + + + +
+
+

Third Party Licenses

+

This page lists the licenses of the projects used in cargo-about.

+
+ +

Overview of licenses:

+ + +

All license text:

+ +
+ + + +