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
ci: Prevent dependencies issue #142
Conversation
this file created by 'cargo deny init'
Codecov Report
@@ Coverage Diff @@
## main #142 +/- ##
==========================================
+ Coverage 87.81% 87.84% +0.03%
==========================================
Files 203 203
Lines 12620 12620
==========================================
+ Hits 11082 11086 +4
+ Misses 1538 1534 -4
Continue to review full report at Codecov.
|
fd42873
to
4830a9e
Compare
https://github.com/SpringQL/SpringQL/runs/6432517672?check_suite_focus=true#step:13:65 |
I skip CHANGELOG update, because this is CI job changes. |
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.
Thanks.
I need deeper look at (done) already have some change requests.deny.toml
but
[tasks.build] | ||
script = [''' | ||
#!/usr/bin/env bash -eux | ||
RUSTFLAGS='-D warnings' cargo build --workspace --all-targets --all-features | ||
'''] | ||
dependencies=["check-dependencies"] |
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 seems too severe.
build
should run even with bad dependencies.
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.
The build
process executes the crate build scripts and procedural macros that came in from the dependencies.
For this reason, we need to verify that the dependencies are safe before building, which is represented by dependencies
.
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.
The build process executes the crate build scripts and procedural macros
Yes. They can be malicious.
But I don't think putting this dependency saves developers (they might use cargo build
).
I think it's OK to run malicious codes in CI's containers at build time.
IMO, running check-dependencies
as a required job on pull-request should be enough.
(Maybe better to run it also on creating release artifacts)
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.
But I don't think putting this dependency saves developers (they might use cargo build).
The problem is certainly not solved this way.
I'm looking for a solution, but I haven't found a solution at the moment.
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.
ref: #148
rename get_crate_version to get_crate_latest_version
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.
[tasks.build] | ||
script = [''' | ||
#!/usr/bin/env bash -eux | ||
RUSTFLAGS='-D warnings' cargo build --workspace --all-targets --all-features | ||
'''] | ||
dependencies=["check-dependencies"] |
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.
ref: #148
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.
Issue number and link
Fixes: #138
Describe your changes
add
deny.toml
forcargo-deny
add
cargo-deny
install for Github Actionsadd
check-dependencies
task for makefileadd CI job for runs it.
Checklist before requesting a review
## [Unreleased]
section inCHANGELOG.md
following keep a changelog syntax (bugfix/feature)