mirror of
https://github.com/github/codeql-action.git
synced 2026-01-02 04:30:14 +08:00
ban / as a path
This commit is contained in:
@@ -142,6 +142,15 @@ export function validateAndSanitisePath(
|
||||
path = path.substring(0, path.length - 2);
|
||||
}
|
||||
|
||||
// An empty path is not allowed as it's meaningless
|
||||
if (path === '') {
|
||||
throw new Error(getConfigFilePropertyError(
|
||||
configFile,
|
||||
propertyName,
|
||||
'"' + originalPath + '" is not an invalid path. ' +
|
||||
'It is not necessary to include it, and it is not allowed to exclude it.'));
|
||||
}
|
||||
|
||||
// Check for illegal uses of **
|
||||
if (path.match(pathStarsRegex)) {
|
||||
throw new Error(getConfigFilePropertyError(
|
||||
|
||||
Reference in New Issue
Block a user