fix: anchor profile directory traversal

This commit is contained in:
proxyctl coordinator
2026-07-17 02:39:42 +08:00
parent 1fa7e0fb2d
commit 6c06859783
4 changed files with 265 additions and 29 deletions
+3
View File
@@ -168,6 +168,9 @@ func TestLoadSecuresExistingSecretBearingConfiguration(t *testing.T) {
t.Fatalf("load existing configuration: %v", err)
}
assertMode(t, path, 0o600)
if _, err := os.Lstat(path + ".lock"); !errors.Is(err, os.ErrNotExist) {
t.Fatalf("view-only Load unexpectedly created a lock: %v", err)
}
}
func assertMode(t *testing.T, path string, want os.FileMode) {