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
matches/exec: create path integrity check before execution
Fixes#518
Create function check_path_integrity which checks
the integrity of the path, with the following criteria:
- Only absolute paths
- Only non-empty paths
- Only directories in path
If the PATH env var does not pass the criteria,
an error is returned warning about the specific
path part that caused that error.
Tests:
- Added tests for both SingleExecMatcher and MultiExecMatcher
- Covered all PATH validation scenarios:
* Valid absolute directories
* Empty path segments
* Relative path segments
* File paths instead of directories
- Ensured safe environment variable handling with unsafe blocks
- Maintained consistent test patterns with existing serial tests
- Verified correct error handling for invalid PATH configurations
To avoid making the function that performs the check public,
tests were also added that verify that there is no error
with a valid PATH.
0 commit comments