Verify deployment-managed cache permissions
This commit is contained in:
@@ -303,6 +303,8 @@ prompt.
|
|||||||
|
|
||||||
## Stage 5: Repository-Wide Verification And Contract Audit
|
## Stage 5: Repository-Wide Verification And Contract Audit
|
||||||
|
|
||||||
|
**Completed:** 2026-09-11
|
||||||
|
|
||||||
### Goal
|
### Goal
|
||||||
|
|
||||||
Prove the complete target state and catch accidental permission, safety, or
|
Prove the complete target state and catch accidental permission, safety, or
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"syscall"
|
"syscall"
|
||||||
@@ -43,19 +44,10 @@ func assertGroupAccessibleCacheTree(t *testing.T, root string) {
|
|||||||
want = 0o770
|
want = 0o770
|
||||||
}
|
}
|
||||||
if got := info.Mode().Perm(); got != want {
|
if got := info.Mode().Perm(); got != want {
|
||||||
return &cachePermissionError{path: path, got: got, want: want}
|
return fmt.Errorf("%s mode = %#o, want %#o", path, got, want)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type cachePermissionError struct {
|
|
||||||
path string
|
|
||||||
got, want os.FileMode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (err *cachePermissionError) Error() string {
|
|
||||||
return err.path + " mode mismatch"
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user