π‘οΈ Sentinel: [MEDIUM] Fix insecure snapshot directory permissions#13
π‘οΈ Sentinel: [MEDIUM] Fix insecure snapshot directory permissions#13bitcoiner-dev wants to merge 1 commit intomasterfrom
Conversation
Replaced `fs::create_dir_all` with `crate::paths::create_secure_dir_all` in `src/commands/snapshot.rs` to ensure the snapshot directory is created with secure default permissions (0o700) instead of relying on the system's default umask. 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: MEDIUM
π‘ Vulnerability: The snapshot directory was being created using the standard
fs::create_dir_allfunction, which relies on the system's defaultumask(often0755or022). This could potentially expose sensitive snapshot data or configuration to other users on the system if they have access to the data directory.π― Impact: If a malicious local user gains access to the snapshot directory created with overly permissive permissions, they could potentially read sensitive wallet snapshot data.
π§ Fix: Replaced
fs::create_dir_allwithcrate::paths::create_secure_dir_allto enforce strict permissions (e.g.,0700on Unix systems) when creating the snapshot directory, following defense-in-depth security best practices.β Verification: Verified by checking that
src/commands/snapshot.rsuses thecreate_secure_dir_allhelper function. Rancargo testandcargo clippyto ensure no regressions.PR created automatically by Jules for task 18051328316366071199 started by @bitcoiner-dev