fix: tighten the crates lock check, drop the key from child environments
CI / shellcheck + selftests (pull_request) Successful in 1m44s
CI / move v1 to main (pull_request) Skipped

crates-lock-check.sh anchors on `[/:]daniel/gitdan-crates(.git)?/?` and
matches case-insensitively, so a trailing-slash or differently-cased second
commit is counted and a look-alike owner (notdaniel/) is not.
crates-access.sh unsets DEPLOY_KEY once the key file is written, so git, ssh
and timeout no longer inherit it. README says three actions, not two.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MfBCVNDv3y5gm2djeZSAk4
This commit is contained in:
2026-11-22 11:27:46 -06:00
co-authored by Claude Fable 5.2
parent 5b6d8ff7b4
commit ad8cf5756e
4 changed files with 23 additions and 5 deletions
+2
View File
@@ -47,6 +47,8 @@ known_hosts="$dir/known_hosts"
# builtin, so the key is not in any process's argv.
( umask 077; printf '%s\n' "${DEPLOY_KEY%$'\n'}" | tr -d '\r' > "$key" )
chmod 600 "$key"
# The children below (ssh-keygen, git, ssh, timeout) must not inherit the key.
unset DEPLOY_KEY
cp "$known_hosts_src" "$known_hosts"
chmod 600 "$known_hosts"