Cloud sandbox configures SSH commit signing but ships an empty signing key — commits silently unsigned; stop hook then gives misleading remediation

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 2, 2026

Environment: Claude Code on the web / remote session (v2.1.220), Linux container, private repo attached via the git proxy.

Observed:

  1. The environment sets commit.gpgsign=true, gpg.format=ssh, user.signingkey=/home/claude/.ssh/commit_signing_key.pub (global), and ~/.claude/session-start-git-identity.sh's header states commits are meant to be "SSH-signed by CCR" under an identity registered as noreply@anthropic.com.
  2. /home/claude/.ssh/commit_signing_key.pub exists but is 0 bytes (no private key present). Result: every commit created in the session is unsigned (git log --format='%G?' shows N) with no error surfaced.
  3. Docs state signing keys are deliberately kept out of the sandbox ("Credential protection: sensitive credentials such as git credentials or signing keys are never inside the sandbox…", code.claude.com/docs/en/claude-code-on-the-web). So either the config should not claim signing, signing should happen at the proxy, or the key should be provisioned — the current middle state produces silently unsigned commits that the platform's own stop hook then flags.
  4. The stop hook ~/.claude/stop-hook-git-check.sh compounds this:

a. It flags commits with committer noreply@github.com even when %G? = E — i.e. GitHub's own signed merge commits, which display Verified on github.com.
b. It scopes to origin/<branch>..HEAD, so if the local branch pointer moves (e.g. a post-merge fast-forward), it attributes foreign master history to the session.
c. Its suggested fix — git rebase --exec "git commit --amend --no-edit --reset-author" origin/<branch> then push — applied to that foreign history would strip valid signatures, rewrite other actors' committer identities, and push rewritten master history to a session branch.

Suggested: provision a real key (or sign at the proxy, or drop commit.gpgsign), and in the stop hook: whitelist committer noreply@github.com when a signature is present, restrict the range to commits created in-session, and remove the unconditional rebase advice.

Expected: commits are actually signed, or the environment does not demand signatures the sandbox cannot produce.

View original on GitHub ↗