fix: tighten the crates lock check, drop the key from child environments
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:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user