chore: only ban readlink -f (#1539)

This commit is contained in:
Trevor Brown 2023-04-13 10:06:25 -04:00 committed by GitHub
parent 2cf2f58c3e
commit 2dd65e0e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,6 @@ banned_commands=(
eval
# realpath not available by default on OSX.
realpath
# readlink on OSX behaves differently from readlink on other Unix systems
readlink
# source isn't POSIX compliant. . behaves the same and is POSIX compliant
# Except in fish, where . is deprecated, and will be removed in the future.
source
@ -32,6 +30,8 @@ banned_commands_regex=(
"grep.* -P"
# Ban grep long commands as they do not work on alpine
"grep[^|]+--\w{2,}"
# readlink -f on OSX behaves differently from readlink -f on other Unix systems
'readlink.+-.*f.+["$]'
# sort --sort-version isn't supported everywhere
"sort.*-V"
"sort.*--sort-versions"