-
Notifications
You must be signed in to change notification settings - Fork 26
Project dependencies updated addressing security #232
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: master
Are you sure you want to change the base?
Changes from all commits
306d646
760e1d9
adf0b3b
b0f7ec8
b783089
3220468
51caf08
3a517d3
d53e2bf
5e50f4d
943cc29
b69ead3
1ae77c8
272fa8d
ba96830
64c9f6d
ed1916b
c8b73c8
4765ee4
8aaebd0
665c1db
e10832d
3f56adc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,8 @@ on: | |
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
RUST_VERSION_OLD: "1.68.0" | ||
RUST_VERSION_NEW: "1.88.0" | ||
RUST_VERSION_OLD: "1.82" # aka MSRV | ||
RUST_VERSION_NEW: "stable" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "stable" for RUST_VERSION_NEW is bad for CI because it will be updated in background without commit. The new version is used not only for compilation (which should remain stable), but for linter too and linter from new version often causing it to break on older code. It mean that if I want to fix a bug after new rust version released - I should to fix all linter errors as pre-requisite, or ignore it. I prefer to use fixed versions for reproducible CI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Get it!
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. third unblock stable - is ok, for early handle rusts bugs - nightly may be better. |
||
|
||
jobs: | ||
tests: | ||
|
@@ -37,29 +37,38 @@ jobs: | |
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- name: Show YDB server version | ||
run: docker ps; docker exec ydb /ydbd -V | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install nightly rust | ||
if: matrix.rust_version == 'RUST_VERSION_NEW' | ||
uses: dtolnay/rust-toolchain@nightly | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need nightly toolchain? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is obsolete code. Will drop it. |
||
with: | ||
components: clippy, rustfmt | ||
|
||
- name: Install rust | ||
uses: dtolnay/rust-toolchain@v1 | ||
- name: Install stable rust | ||
uses: dtolnay/rust-toolchain@master # as described in https://github.com/dtolnay/rust-toolchain/blob/master/README.md?plain=1#L45 | ||
with: | ||
toolchain: ${{ env[matrix.rust_version] }} | ||
components: clippy, rustfmt | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
submodules: true | ||
key: ${{ env[matrix.rust_version] }} | ||
|
||
- name: Show YDB server version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's very convenient to see the server version at the beginning, and it's independent of the source code and Rust. Why did you move it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because It's not important for me to stay at this point. If you say, that looking at YDB version as early as possible is required, I'll just rollback and make a comment in the code with such description. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. YDB run as service before. It starts before any step, the command show version only. It is fast. Faster, then install toolchain. |
||
run: docker ps; docker exec ydb /ydbd -V | ||
|
||
- name: Rust version | ||
id: rust_version_step | ||
run: | | ||
rustc --version | ||
cargo --version | ||
echo "CARGO_INCREMENTAL=$CARGO_INCREMENTAL" | ||
echo "::set-output name=version::$(rustc --version | cut -d ' ' -f 2)" | ||
|
||
- name: Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
echo "name=version::$(rustc --version | cut -d ' ' -f 2)" >> $GITHUB_OUTPUT | ||
|
||
- name: Run tests | ||
env: | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,65 @@ | ||||||
name: Security | ||||||
|
||||||
on: | ||||||
push: | ||||||
branches: [ master ] | ||||||
pull_request: | ||||||
branches: [ master ] | ||||||
|
||||||
env: | ||||||
CARGO_TERM_COLOR: always | ||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||||||
RUST_VERSION_NEW: "stable" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Almost all, upgraded with background is bad for CI, because in changes without commit and difficult to debug. |
||||||
|
||||||
jobs: | ||||||
tests: | ||||||
strategy: | ||||||
fail-fast: false | ||||||
matrix: | ||||||
rust_version: ["RUST_VERSION_NEW" ] | ||||||
runs-on: ubuntu-24.04 | ||||||
|
||||||
steps: | ||||||
- name: Checkout | ||||||
uses: actions/checkout@v4 | ||||||
with: | ||||||
submodules: true | ||||||
|
||||||
- name: Install nightly rust | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need nightly toolchain? |
||||||
if: matrix.rust_version == 'RUST_VERSION_NEW' | ||||||
uses: dtolnay/rust-toolchain@nightly | ||||||
with: | ||||||
components: clippy, rustfmt | ||||||
|
||||||
- name: Install stable rust | ||||||
uses: dtolnay/rust-toolchain@master # as described in https://github.com/dtolnay/rust-toolchain/blob/master/README.md?plain=1#L45 | ||||||
with: | ||||||
toolchain: ${{ env[matrix.rust_version] }} | ||||||
components: clippy, rustfmt | ||||||
|
||||||
- name: Rust cache | ||||||
uses: Swatinem/rust-cache@v2 | ||||||
with: | ||||||
key: ${{ env[matrix.rust_version] }} | ||||||
|
||||||
- name: Rust version | ||||||
id: rust_version_step | ||||||
run: | | ||||||
rustc --version | ||||||
cargo --version | ||||||
echo "CARGO_INCREMENTAL=$CARGO_INCREMENTAL" | ||||||
echo "name=version::$(rustc --version | cut -d ' ' -f 2)" >> $GITHUB_OUTPUT | ||||||
- name: Cargo install | ||||||
if: matrix.rust_version == 'RUST_VERSION_NEW' | ||||||
run: cargo install --locked cargo-audit cargo-pants | ||||||
|
||||||
- name: Cargo audit | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great idea, thanks |
||||||
if: matrix.rust_version == 'RUST_VERSION_NEW' | ||||||
run: | | ||||||
cargo audit | ||||||
- name: Cargi pants | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
if: matrix.rust_version == 'RUST_VERSION_NEW' | ||||||
run: | | ||||||
cargo pants | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All files must have new line at the end. |
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.
Why do you need rust newer, than 1.68?
It's ok to update an old version, when necessary, but the update should a reasonable justification.
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.
Because some of updated dependencies now require Rust
1.82
Probably I can downgrade some dependencies to keep MSRV
1.81
but not less.Updates of dependencies which contains fixes for critical vulnerabilities reported by
cargo audit
requires at least1.81
.