File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 " Bash(sudo *)" ,
1717 " Bash(mkfs *)" ,
1818 " Bash(dd *)" ,
19- " Bash(curl *|bash*)" ,
2019 " Bash(wget *|bash*)" ,
20+ " Bash(wget *| bash*)" ,
2121 " Bash(git push --force*)" ,
2222 " Bash(git push *--force*)" ,
2323 " Bash(git reset --hard*)" ,
5353 "hooks" : [
5454 {
5555 "type" : " command" ,
56- "command" : " CMD=$(jq -r '.tool_input.command'); if echo \" $CMD\" | grep -qE ' rm[[:space:]]+-[^[ :space:]]*r[^[ :space:]]*f '; then echo 'BLOCKED: Use trash instead of rm -rf' >&2; exit 2; fi"
56+ "command" : " CMD=$(jq -r '.tool_input.command'); if echo \" $CMD\" | grep -qiE '(^|;[[:space:]]*|&&[[:space:]]*|[|][|][[:space:]]*|[|][[:space:]]*) rm[[:space:]]' && echo \" $CMD \" | grep -qiE '(^|[[ :space:]])-[a-zA-Z]*[rR]|--recursive' && echo \" $CMD \" | grep -qiE '(^|[[ :space:]])-[a-zA-Z]*[fF]|--force '; then echo 'BLOCKED: Use trash instead of rm -rf' >&2; exit 2; fi"
5757 },
5858 {
5959 "type" : " command" ,
You can’t perform that action at this time.
0 commit comments