v0.328.0 (unreleased): security review round 3 — under HDD_PATH only appdata/ is a data root (not backups/)
gates / gates (push) Successful in 45s
gates / gates (push) Successful in 45s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
36c4aa4e69
commit
09ac87a843
3 files changed
+22
No files matched your search
@@ -512,6 +512,12 @@ func (c *checker) validRoots() []string {
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(v, DriveNamespace) || (c.p.SystemDataPath != "" && within(v, filepath.Clean(c.p.SystemDataPath))) {
|
||||
if r == "HDD_PATH" {
|
||||
// round 3: HDD_PATH is the drive's whole namespace — its backups/ (recovery units carry app secrets)
|
||||
// and every other top-level folder are siblings an app has no business binding. Only appdata/ is a
|
||||
// root; the household's folders come through USERDATA_PATH.
|
||||
v = filepath.Join(v, "appdata")
|
||||
}
|
||||
out = append(out, v)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user