V8.00.000.2025.06.17
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:
2025-10-24 20:58:50 +01:00
parent ffb20a7342
commit 17bf5ca5fc
88 changed files with 104 additions and 99 deletions

View File

@@ -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