Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ unsafe_code = "deny"
blake2 = "0.10"
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"
Comment thread
kodus-27b[bot] marked this conversation as resolved.
Comment thread
kodus-27b[bot] marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

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.

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.

​

​

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Bug high

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.

​

​

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Kody Rules high

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.

​

​

hex = "0.4"
libc = "0.2"
rustix = { version = "1", default-features = false, features = ["std", "fs", "process"] }
Expand Down
Loading