diff --git a/cmd/runtimetest/main.go b/cmd/runtimetest/main.go index 371052c3b..955be1bba 100644 --- a/cmd/runtimetest/main.go +++ b/cmd/runtimetest/main.go @@ -410,6 +410,10 @@ func validateMaskedPaths(spec *rspec.Spec) error { if err != io.EOF { return fmt.Errorf("%v should not be readable", maskedPath) } + + if !filepath.IsAbs(maskedPath) { + return fmt.Errorf("maskdePath %v is not an absoulte path", maskedPath) + } } return nil } @@ -421,6 +425,10 @@ func validateROPaths(spec *rspec.Spec) error { if err == nil { return fmt.Errorf("%v should be readonly", v) } + + if !filepath.IsAbs(v) { + return fmt.Errorf("readonlyPath %v is not an absoulte path", v) + } } return nil