Repository navigation
chore(deps): update rust crate getrandom to 0.4 - #13
cachekit-renovate-bot[bot] wants to merge 1 commit into
Conversation
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
Kody Code Review — 1 suggested fix. 🛠️ Open Agent Prompt |
46cc6d5 to
73d01a6
Compare
| cachekit-core = { version = "0.7", default-features = false, features = ["encryption"] } | ||
| cachekit-rs = { version = "0.11.1", default-features = false, features = ["cachekitio", "encryption", "file"] } | ||
| getrandom = "0.2" | ||
| getrandom = "0.4" |
There was a problem hiding this comment.
WHAT: The getrandom dependency jumps from 0.2 to 0.4, skipping 0.3. The diff includes no supply-chain or CVE evidence for this change.
WHY: getrandom is a security-critical crate because it is the OS entropy source used for encryption. A major version bump can change the public API (for example, getrandom::getrandom became getrandom::fill) and backend or feature selection. It can also add new transitive dependencies. Without audit evidence and a matching Cargo.lock update, these risks go unchecked.
HOW: Run cargo audit or query OSV for getrandom 0.4.x and attach the output to the PR description. Update and commit Cargo.lock. Then verify the following:
- All call sites are migrated to the new API.
- Any required backend features or cfgs are enabled for your targets.
cachekit-coreandcachekit-rsdon't pull a conflicting getrandom version.
Kody rule violation: Validate new/updated dependencies for CVEs and supply-chain risk
Prompt for LLM
File Cargo.toml:
Line 33:
WHAT: The `getrandom` dependency jumps from 0.2 to 0.4, skipping 0.3. The diff includes no supply-chain or CVE evidence for this change.
WHY: `getrandom` is a security-critical crate because it is the OS entropy source used for encryption. A major version bump can change the public API (for example, `getrandom::getrandom` became `getrandom::fill`) and backend or feature selection. It can also add new transitive dependencies. Without audit evidence and a matching Cargo.lock update, these risks go unchecked.
HOW: Run `cargo audit` or query OSV for getrandom 0.4.x and attach the output to the PR description. Update and commit Cargo.lock. Then verify the following:
- All call sites are migrated to the new API.
- Any required backend features or cfgs are enabled for your targets.
- `cachekit-core` and `cachekit-rs` don't pull a conflicting getrandom version.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
73d01a6 to
85fcf31
Compare
| cachekit-core = { version = "0.7", default-features = false, features = ["encryption"] } | ||
| cachekit-rs = { version = "0.11.1", default-features = false, features = ["cachekitio", "encryption", "file"] } | ||
| getrandom = "0.2" | ||
| getrandom = "0.4" |
There was a problem hiding this comment.
Build break in Cargo.toml: bumping getrandom to 0.4 removes the getrandom::getrandom free function, which src/keys.rs:115 still calls to create the file key. The crate fails to compile with an unresolved-function error at getrandom::getrandom(&mut secret), because 0.3 renamed the function to getrandom::fill and 0.4 keeps that name. Fix: in the same PR, change src/keys.rs:115 to getrandom::fill(&mut secret).map_err(|e| Fatal(format!("cannot generate a file key: {e}")))?;.
getrandom = "0.4"
# and in src/keys.rs:
# getrandom::fill(&mut secret)
# .map_err(|e| Fatal(format!("cannot generate a file key: {e}")))?;Prompt for LLM
File Cargo.toml:
Line 33:
Build break in Cargo.toml: bumping `getrandom` to 0.4 removes the `getrandom::getrandom` free function, which src/keys.rs:115 still calls to create the file key. The crate fails to compile with an unresolved-function error at `getrandom::getrandom(&mut secret)`, because 0.3 renamed the function to `getrandom::fill` and 0.4 keeps that name. Fix: in the same PR, change src/keys.rs:115 to `getrandom::fill(&mut secret).map_err(|e| Fatal(format!("cannot generate a file key: {e}")))?;`.
Suggested Code:
getrandom = "0.4"
# and in src/keys.rs:
# getrandom::fill(&mut secret)
# .map_err(|e| Fatal(format!("cannot generate a file key: {e}")))?;
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
| cachekit-core = { version = "0.7", default-features = false, features = ["encryption"] } | ||
| cachekit-rs = { version = "0.11.1", default-features = false, features = ["cachekitio", "encryption", "file"] } | ||
| getrandom = "0.2" | ||
| getrandom = "0.4" |
There was a problem hiding this comment.
WHAT: The dependency getrandom jumps two major versions, from 0.2 to 0.4. WHY: The PR includes no CVE/SCA evidence and no confirmation that Cargo.lock was updated. The 0.3+ releases also changed the API (e.g., getrandom::getrandom was renamed to fill, and custom backend configuration changed), so call sites may break. HOW: Run cargo audit or an OSV query and attach the output to the PR. Commit the updated Cargo.lock. Verify that all getrandom call sites compile against the new API.
Kody rule violation: Validate new/updated dependencies for CVEs and supply-chain risk
Prompt for LLM
File Cargo.toml:
Line 33:
WHAT: The dependency getrandom jumps two major versions, from 0.2 to 0.4. WHY: The PR includes no CVE/SCA evidence and no confirmation that Cargo.lock was updated. The 0.3+ releases also changed the API (e.g., getrandom::getrandom was renamed to fill, and custom backend configuration changed), so call sites may break. HOW: Run cargo audit or an OSV query and attach the output to the PR. Commit the updated Cargo.lock. Verify that all getrandom call sites compile against the new API.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Providing Context (Files & MCPs)Add these hints in your PR description (or a comment) to unlock deeper checks:
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
This PR contains the following updates:
0.2→0.4Release Notes
rust-random/getrandom (getrandom)
v0.4.3Compare Source
Added
wasm64-unknown-unknowntarget support forwasm_jsbackend #848Changed
wasip2andwasip3dependencies in favor of manual bindings #830v0.4.2Compare Source
Changed
r-efidependency to v6 #814Fixed
errnoonly when it is set #810ProcessPrngon Windows #811v0.4.1Compare Source
Fixed
v0.4.0Compare Source
Added
RawOsErrortype alias #739SysRngbehind new featuresys_rng#751extern_implopt-in backend #786 #794Changed
v0.3.4Compare Source
Major change to
wasm_jsbackendNow, when the
wasm_jsfeature is enabled, thewasm_jsbackend will be usedby default. Users of
wasm32-unknown-unknowntargeting JavaScript environmentslike the Web and Node.js will no longer need to specify:
in
RUSTFLAGSfor the crate to compile. They can now simple enable a feature.Note: this should not affect non-JS users of the
wasm32-unknown-unknowntarget. Using
--cfg getrandom_backendwill still override the source ofrandomness even if the
wasm_jsfeature is enabled. This includes--cfg getrandom_backend=customand--cfg getrandom_backend=unsupported.For more information, see the discussions in #671, #675, and #730.
Added
unsupportedopt-in backend #667windows_legacyopt-in backend #724Changed
linux_rawopt-in backend on ARM targets #688getrandomsyscall on all RISC-V Linux targets #699wasidependency withwasip2#721wasm_jsbackend by default if thewasm_jsfeature is enabled #730Removed
rustc-dep-of-stdcrate feature #694v0.3.3Compare Source
Changed
compile_error!s #639Fixed
v0.3.2Compare Source
Added
efi_rngopt-in backend #570linux_rawopt-in backend #572.cargo/config.tomlexample in the crate-level docs #591getrandom_test_linux_without_fallbackconfiguration flag to test that file fallbackis not triggered in the
linux_android_with_fallbackbackend #605*-linux-nonetargets #618Changed
wasidependency to v0.14 #594#[inline]attribute to the inner functions #596dlsymon MUSL targets in thelinux_android_with_fallbackbackend #602linux_android.rsand usegetrandom.rsinstead #603RtlGenRandomon Windows targets when compiling with pre-1.78 Rust #610Errortype #614windows-targetsdependency and useraw-dylibdirectly #627Removed
Error::INTERNAL_STARTandError::CUSTOM_STARTassociated constants #614v0.3.1Compare Source
Fixed
v0.3.0Compare Source
Breaking Changes
Changed
getrandomandgetrandom_uninitfunctions tofillandfill_uninitrespectively #532Removed
wasm32-wasitarget support (usewasm32-wasip1orwasm32-wasip2instead) #499linux_disable_fallback,rdrand,js,test-in-browser, andcustomcrate featuresin favor of configuration flags #504
register_custom_getrandom!macro #504From<NonZeroU32>forErrorandError::codemethod #507Errorconstants #562Changed
ProcessPrngon Windows 10 and up, and useRtlGenRandomon older Windows versions #415strerror_rfor retrieving error code descriptions #440usizeis the native word size in therdrandbackend #442errnowhenlibcdid not indicate error on Solaris #448libpthread's mutex tofutexon Linux and tonanosleep-based wait loopon other targets in the
use_filebackend #490EAGAINwhile polling/dev/randomon Linux #522wasm_jsbackend(bumps minimum supported Node.js version to v19) #557
js_namespacein thewasm_jsbackend #559Added
wasm32-wasip1andwasm32-wasip2support #499getrandom_backendconfiguration flag for selection of opt-in backends #504Error::new_custommethod #507rndropt-in backend #512u32andu64functions for generating random values of the respective type #544wasm32v1-nonesupport in thewasm_jsbackend #560wasm_jscrate feature which allows users to enable thewasm_jsopt-in backend #574Fixed
KERN_ARND#555Configuration
📅 Schedule: (in timezone Australia/Sydney)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.