We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69b27ae commit 4206ac1Copy full SHA for 4206ac1
internal/config/types.go
@@ -365,6 +365,14 @@ func (col *Collector) Validate(allowedDirectories []string) error {
365
err = errors.Join(err, nginxReceiver.Validate(allowedDirectories))
366
}
367
368
+ for _, path := range col.AdditionalPaths {
369
+ cleanPath := filepath.Clean(path)
370
+ pathAllowed := isAllowedDir(cleanPath, allowedDirectories)
371
+ if !pathAllowed {
372
+ err = errors.Join(err, fmt.Errorf("additional config path %s not in allowed directories", path))
373
+ }
374
375
+
376
return err
377
378
0 commit comments