Commit b7c3b06
🛡️ Sentinel: [HIGH] Fix insecure directory creation permissions for snapshots
Severity: HIGH
Vulnerability: `src/commands/snapshot.rs` uses `std::fs::create_dir_all` to create the snapshot directory. This relies on the default system umask, meaning sensitive snapshot files could be stored in a directory readable by other users on a shared machine.
Impact: Local privilege escalation or exposure of sensitive user data on a shared machine.
Fix: Replaced `std::fs::create_dir_all` with `crate::paths::create_secure_dir_all`, which correctly creates the directory with `0o700` permissions on Unix platforms.
Verification: Ran `cargo test` which completes successfully.
Co-authored-by: bitcoiner-dev <75873427+bitcoiner-dev@users.noreply.github.com>1 parent 25d33d3 commit b7c3b06
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
0 commit comments