diff --git a/integration/agentcompat/internal/workflowpolicy/verify.go b/integration/agentcompat/internal/workflowpolicy/verify.go index 69ee8d42..85254cd6 100644 --- a/integration/agentcompat/internal/workflowpolicy/verify.go +++ b/integration/agentcompat/internal/workflowpolicy/verify.go @@ -3,6 +3,7 @@ package workflowpolicy import ( "fmt" "os" + "path/filepath" "regexp" "strings" @@ -25,7 +26,12 @@ func Verify(data []byte, repository Repository) error { } func VerifyFile(path string, repository Repository) error { - data, err := os.ReadFile(path) + root, err := os.OpenRoot(filepath.Dir(path)) + if err != nil { + return &ReadError{Path: path, Cause: err} + } + defer root.Close() + data, err := root.ReadFile(filepath.Base(path)) if err != nil { return &ReadError{Path: path, Cause: err} }