diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f98f44e..dbb73cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,3 +22,10 @@ repos: language: script pass_filenames: true files: "^(bin|tests)/hardening/" + - id: check_is_executable + name: check_is_executable.sh + description: Ensure checks are executables + entry: hooks/check_is_executable.sh + language: script + pass_filenames: true + files: "^bin/hardening/" diff --git a/hooks/check_is_executable.sh b/hooks/check_is_executable.sh new file mode 100755 index 0000000..f3ca2db --- /dev/null +++ b/hooks/check_is_executable.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for script in "$@"; do + chmod +x "$script" +done + +exit 0