V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m53s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m53s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -92,7 +92,7 @@ yaml_parser() {
|
||||
# shellcheck disable=SC1090
|
||||
. "${VAR_PRESEED}"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -258,7 +258,7 @@ END { print max }
|
||||
# shellcheck disable=SC2034
|
||||
VAR_USER_ROOT_SPECIFIC="${user_root_specific,,}"
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -219,7 +219,7 @@ yaml_validator() {
|
||||
|
||||
fi
|
||||
|
||||
guard_dir && return 0
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
@@ -87,10 +87,7 @@ ciss_secret_varname_from_path() {
|
||||
### Declare Arrays, HashMaps, and Variables.
|
||||
declare var_path="${1:-}"
|
||||
|
||||
var_path="${var_path//./_}"
|
||||
var_path="${var_path//-/_}"
|
||||
var_path="${var_path//\//_}"
|
||||
var_path="${var_path// /_}"
|
||||
var_path="${var_path//[^A-Za-z0-9_]/_}"
|
||||
var_path="${var_path^^}"
|
||||
|
||||
printf 'CISS_SECRET_%s' "${var_path}"
|
||||
@@ -180,13 +177,18 @@ yaml_secret() {
|
||||
|
||||
### Read path (up to NUL); break on EOF.
|
||||
IFS= read -r -d '' __path <&"${__pipe_fd}" || break
|
||||
echo "${__path}"
|
||||
|
||||
### Read value (up to NUL); if missing (odd count), treat as empty
|
||||
IFS= read -r -d '' __value <&"${__pipe_fd}" || __value=""
|
||||
echo "${__value}"
|
||||
|
||||
### Drop the leading 'secrets.' prefix for naming.
|
||||
__path_wo_prefix="${__path#secrets.}"
|
||||
echo "${__path_wo_prefix}"
|
||||
|
||||
__varname="$(ciss_secret_varname_from_path "${__path_wo_prefix}")"
|
||||
echo "${__varname}"
|
||||
|
||||
### Assign to a global variable, preserving content verbatim (including newlines).
|
||||
unset -v "${__varname}"
|
||||
@@ -199,11 +201,14 @@ yaml_secret() {
|
||||
done
|
||||
|
||||
### Close the producer FD
|
||||
exec {__pipe_fd}>&-
|
||||
exec {__pipe_fd}<&-
|
||||
|
||||
umask "${__umask}"
|
||||
|
||||
guard_dir && return 0
|
||||
echo "Inside 1256()"
|
||||
sleep 60
|
||||
|
||||
guard_dir; return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
Reference in New Issue
Block a user