fix(agentcompat): secure legacy file manager boundaries

Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
This commit is contained in:
naiba
2026-07-20 17:04:52 +00:00
co-authored by naiba/CloudCode
parent 029d458f50
commit 23763c8210
3 changed files with 16 additions and 13 deletions
@@ -133,9 +133,9 @@ func newLegacyFMRunID() (string, error) {
return hex.EncodeToString(bytes), nil
}
func verifyLegacyFMSentinels(sentinelPaths []string, sentinel []byte) error {
for _, path := range sentinelPaths {
content, err := os.ReadFile(path)
func verifyLegacyFMSentinels(root *os.Root, sentinelNames []string, sentinel []byte) error {
for _, name := range sentinelNames {
content, err := root.ReadFile(name)
if err != nil {
return err
}