Repository navigation
fix: address dependabot rand alert - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ratatuito the explicit features Prism-TUI usesCargo.lockso the unusedratatui-termwiz/termwizchain is removedrand 0.8.5path flagged by Dependabot (GHSA-cq8v-f236-94qc)Root cause
ratatuiwas being pulled in with its default feature set. That allowed Cargo to resolve the optionaltermwizbackend intoCargo.lock, which in turn pulledphf_generatorand vulnerablerand 0.8.5even though Prism-TUI only uses the crossterm backend.Validation
cargo auditcargo testGreptile Summary
This PR fixes the Dependabot
GHSA-cq8v-f236-94qcadvisory by disabling ratatui's default features and explicitly selecting only the crossterm backend and widget features the project actually uses, which breaks the transitive dependency chainratatui → ratatui-termwiz → termwiz → phf_generator → rand 0.8.5. The lock file regeneration confirms the removal of the entire termwiz/phf/rand 0.8.5 subtree.Confidence Score: 5/5
Safe to merge — correctly removes the vulnerable rand 0.8.5 transitive dependency with no functional regressions.
All four ratatui features selected are valid for 0.30, the termwiz/phf/rand chain is fully eliminated from the lock file, and the PR author validated with
cargo auditandcargo test. No P0/P1 findings.No files require special attention.
Important Files Changed
default-features = false; all four chosen features (crossterm_0_28,all-widgets,macros,layout-cache) are valid for ratatui 0.30 and align with the project's crossterm 0.28 dependency.ratatui-termwiz,termwiz,phf_generator,rand 0.8.5, and ~40 other transitive crates are dropped as expected.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["prism-tui"] -->|"ratatui = 0.30\n(default features)"| B["ratatui 0.30"] A -->|"AFTER: default-features = false\nfeatures = [crossterm_0_28, all-widgets,\nmacros, layout-cache]"| B2["ratatui 0.30"] subgraph BEFORE["❌ BEFORE (vulnerable chain)"] B --> C["ratatui-termwiz"] C --> D["termwiz"] D --> E["phf_generator"] E --> F["rand 0.8.5\n⚠️ GHSA-cq8v-f236-94qc"] end subgraph AFTER["✅ AFTER (clean)"] B2 --> G["ratatui-crossterm\n(crossterm 0.28 + 0.29)"] B2 --> H["ratatui-widgets"] B2 --> I["ratatui-macros"] end style BEFORE fill:#fdd,stroke:#f66 style AFTER fill:#dfd,stroke:#6a6 style F fill:#f66,color:#fffReviews (1): Last reviewed commit: "fix: address dependabot rand alert" | Re-trigger Greptile