V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m15s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 2m15s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -148,10 +148,9 @@ yaml_secret() {
|
||||
### Decrypt once, stream into yq; avoid storing full doc in memory; emits '<path>\0<value>\0' for each 'secrets.*.value'
|
||||
# shellcheck disable=SC2016,SC2312
|
||||
exec {__pipe_fd}< <(
|
||||
sops -d --input-type=yaml --output-type=yaml -- "${secrets_yaml}" | yq -r -N -0 '
|
||||
paths(scalars) as $p
|
||||
| select($p[0] == "secrets" and $p[-1] == "value")
|
||||
| ($p[0:-1] | join(".")), ((getpath($p) // "") | tostring)
|
||||
sops -d --input-type=yaml --output-type=yaml -- "${secrets_yaml}" | yq -r -N -0 'leaf_paths as $p
|
||||
| select($p[0]=="secrets" and $p[-1]=="value")
|
||||
| ($p[0:-1] | join(".")), ((getpath($p)//"") | tostring)
|
||||
' -
|
||||
)
|
||||
|
||||
@@ -163,10 +162,9 @@ yaml_secret() {
|
||||
# -0 : NUL between *each* result
|
||||
# shellcheck disable=SC2016,SC2312
|
||||
exec {__pipe_fd}< <(
|
||||
yq -r -N -0 '
|
||||
paths(scalars) as $p
|
||||
| select($p[0] == "secrets" and $p[-1] == "value")
|
||||
| ($p[0:-1] | join(".")), ((getpath($p) // "") | tostring)
|
||||
yq -r -N -0 'leaf_paths as $p
|
||||
| select($p[0]=="secrets" and $p[-1]=="value")
|
||||
| ($p[0:-1] | join(".")), ((getpath($p)//"") | tostring)
|
||||
' -- "${secrets_yaml}"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user