diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 7344a9367b7..f7f53431451 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -329,6 +329,8 @@ jobs: run: make cargo-fmt - name: Lint code for quality and style with Clippy run: make lint-full + - name: Check dependencies for unencrypted HTTP links + run: make insecure-deps - name: Certify Cargo.lock freshness run: git diff --exit-code Cargo.lock - name: Typecheck benchmark code without running it diff --git a/Makefile b/Makefile index 9d08c3ebe18..76d7e5f2537 100644 --- a/Makefile +++ b/Makefile @@ -343,6 +343,12 @@ vendor: udeps: cargo +$(PINNED_NIGHTLY) udeps --tests --all-targets --release --features "$(TEST_FEATURES)" +# Checks dependencies for unencrypted HTTP links +insecure-deps: + BAD_LINKS=`find -name Cargo.toml | xargs grep -P "git\s?=\s?[\"']http:"`; \ + if [ "_$$BAD_LINKS" = "_" ]; then echo "All Git dependencies use secure HTTPS"; \ + else echo "$$BAD_LINKS"; echo "Using plain HTTP in dependencies is forbidden"; false; fi + # Performs a `cargo` clean and cleans the `ef_tests` directory. clean: cargo clean