-
Notifications
You must be signed in to change notification settings - Fork 951
Add insecure-dep test task to Makefile and CI #8464
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
base: unstable
Are you sure you want to change the base?
Conversation
|
Oops, I did not notice there's already another PR on the same issue. Feel free to close this |
Makefile
Outdated
| bash -c \ | ||
| "find -name Cargo.toml \ | ||
| | xargs grep -P \"git\s?=\s?[\\\"']http:\" \ | ||
| | tee /dev/tty \ | ||
| | [ \`wc -l\` == 0 ] || (echo \"Using plain HTTP in dependencies is forbidden\" && false)" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add a message to display when no http link is found (the all good case)
fc90403 to
0521750
Compare
0521750 to
f70d3ae
Compare
Makefile
Outdated
| cargo +$(PINNED_NIGHTLY) udeps --tests --all-targets --release --features "$(TEST_FEATURES)" | ||
|
|
||
| # Checks dependencies for unencrypted HTTP links | ||
| # Tee preserves output. If there are matches, print a message and return 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not relevant now
| # Tee preserves output. If there are matches, print a message and return 1 |
Makefile
Outdated
| .ONESHELL: | ||
| SHELL = /bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines seem not necessary, we can have the command directly (need to tweak a bit the command) to check for http links, and then can error or exit 1 if found
Issue Addressed
#8106
Proposed Changes
I added
insecure-depstarget to Makefile and a new step intocheck-codesection of test-suite CI workflow that uses the former.That bash multiliner is not ideal, I'd prefer a cargo plugin instead but none exists.
I also changed Cargo.toml to test that the new CI check works. Once we see a pipeline fails, I revert the change.