π‘οΈ Sentinel: [HIGH] Fix insecure default file permissions for snapshot directory#7
Conversation
Co-authored-by: bitcoiner-dev <75873427+bitcoiner-dev@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: HIGH
π‘ Vulnerability: The CLI application creates sensitive snapshot data directories using
std::fs::create_dir_all. This standard function creates directories using the system's default umask, which can allow other local users to read sensitive backup contents.π― Impact: This could expose sensitive user data like wallets, mnemonic, config parameters and others to a local privilege escalation or exposure if the CLI is executed on a shared system.
π§ Fix: We swapped
std::fs::create_dir_allforcrate::paths::create_secure_dir_all, which correctly configures explicit permissions (e.g.0o700).β Verification:
cargo testruns correctly.cargo clippyandcargo fmtexecuted successfully and the security behavior of the directory creations was addressed.PR created automatically by Jules for task 2440586732785390127 started by @bitcoiner-dev