You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: extract path validation helper to resolve CodeQL path-injection alert
Extract the sidecar path validation logic into a dedicated validateSidecarPath()
helper function. This improves code clarity and allows static analyzers like
CodeQL to recognize the validation as a proper path sanitizer.
The validation logic itself is unchanged and remains secure against:
- Symlink escape attacks (via filepath.EvalSymlinks)
- Prefix collisions (via trailing separator guard)
- macOS symlink handling (/tmp → /private/tmp)
This change resolves the CodeQL alert while maintaining the same security
guarantees and improving code maintainability.
Fixes: CodeQL alert on line 542 (Uncontrolled data used in path expression)
0 commit comments