feat: gitdan-crates-access action for private crates read access #36

Merged
claude merged 1 commits from feat/crates-access into main 2026-11-19 16:37:39 +00:00
Collaborator

Summary

A gitdan-crates-access composite action: one step gives a CI job read access to the private daniel/gitdan-crates repo over SSH with a read-only deploy key, and checks Cargo.lock for a single crates commit.

Why

The Actions job token cannot read gitdan-crates; consumers need a deploy key (secret GITDAN_CRATES_DEPLOY_KEY, created by gitdan#123).

Closes #35.

Decisions

  • Missing lockfile: fail, or pass as "no entry"? Picked fail (a mistyped path must not read as clean); an empty lockfile input skips the check.
  • Host key: pinned RSA only, the sole type the server offers; cross-checked against the trusted known_hosts record (SHA256:XAMzCdVb...BP0).
  • Missing ssh client: install it, or fail? Picked fail with a message; no existing action installs packages.
  • GIT_SSH_COMMAND also uses -F /dev/null, so other ssh:// remotes in the same job get strict, key-only ssh too.

Smoke

Nothing to smoke here; the live ls-remote needs the secret. After merge, on the first consumer run (adoption PR), the step must pass; failure messages name GITDAN_CRATES_DEPLOY_KEY.

Unproven until then: that the forge accepts the real key, and the action's use from a desktop container image (ssh client present). Probed offline: with a throwaway key the action reaches Permission denied (publickey) against live gitdan.com:22022 (pin verified), and a tampered pin is rejected.

Rode along

  • none

🤖 Generated with Claude Code

https://claude.ai/code/session_01MfBCVNDv3y5gm2djeZSAk4

## Summary A `gitdan-crates-access` composite action: one step gives a CI job read access to the private `daniel/gitdan-crates` repo over SSH with a read-only deploy key, and checks `Cargo.lock` for a single crates commit. ## Why The Actions job token cannot read gitdan-crates; consumers need a deploy key (secret `GITDAN_CRATES_DEPLOY_KEY`, created by gitdan#123). Closes #35. ## Decisions - Missing lockfile: fail, or pass as "no entry"? Picked fail (a mistyped path must not read as clean); an empty `lockfile` input skips the check. - Host key: pinned RSA only, the sole type the server offers; cross-checked against the trusted `known_hosts` record (SHA256:XAMzCdVb...BP0). - Missing `ssh` client: install it, or fail? Picked fail with a message; no existing action installs packages. - `GIT_SSH_COMMAND` also uses `-F /dev/null`, so other `ssh://` remotes in the same job get strict, key-only ssh too. ## Smoke Nothing to smoke here; the live `ls-remote` needs the secret. After merge, on the first consumer run (adoption PR), the step must pass; failure messages name `GITDAN_CRATES_DEPLOY_KEY`. Unproven until then: that the forge accepts the real key, and the action's use from a `desktop` container image (ssh client present). Probed offline: with a throwaway key the action reaches `Permission denied (publickey)` against live gitdan.com:22022 (pin verified), and a tampered pin is rejected. ## Rode along - none 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01MfBCVNDv3y5gm2djeZSAk4
claude added the enhancement label 2026-11-19 16:26:48 +00:00
claude added 1 commit 2026-11-19 16:26:48 +00:00
feat: add gitdan-crates-access, a deploy-key action for the private crates repo
CI / move v1 to main (pull_request) Skipped
CI / shellcheck + selftests (pull_request) Successful in 1m18s
ea5b60ae94
The job token cannot read daniel/gitdan-crates, so CI authenticates with a
read-only deploy key. The action writes it 0600 outside the workspace, pins
the forge's host key (RSA, the only type offered, confirmed against the
trusted known_hosts record and a fresh keyscan), exports GIT_SSH_COMMAND,
proves access with ls-remote, and fails on a Cargo.lock with two commits of
the crates repo. The selftest is wired into selftest.sh.

Existing actions and scripts are untouched.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MfBCVNDv3y5gm2djeZSAk4
claude marked the pull request as ready for review 2026-11-19 16:31:32 +00:00
claude-reviewer approved these changes 2026-11-19 16:33:58 +00:00
claude merged commit 5b6d8ff7b4 into main 2026-11-19 16:37:39 +00:00
claude deleted branch feat/crates-access 2026-11-19 16:37:39 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: daniel/gitdan-actions#36