mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-05 04:48:19 +00:00
fix: don't run arbitrary commands with script
* scripts are now called with their absolute paths instead of ./
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
# Tell build process to exit if there are any errors.
|
||||
set -oue pipefail
|
||||
|
||||
get_yaml_array RUN '.run[]' "$1"
|
||||
get_yaml_array SCRIPTS '.scripts[]' "$1"
|
||||
|
||||
cd "$CONFIG_DIRECTORY/scripts"
|
||||
|
||||
find "$PWD" -type f -exec chmod +x {} \;
|
||||
|
||||
for CMD in "${RUN[@]}"; do
|
||||
echo "Running command: $CMD"
|
||||
eval "$CMD"
|
||||
for SCRIPT in "${SCRIPTS[@]}"; do
|
||||
echo "Running script $SCRIPT"
|
||||
eval "$PWD/$SCRIPT"
|
||||
done
|
||||
Reference in New Issue
Block a user