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).
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.
## 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
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
A
gitdan-crates-accesscomposite action: one step gives a CI job read access to the privatedaniel/gitdan-cratesrepo over SSH with a read-only deploy key, and checksCargo.lockfor 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
lockfileinput skips the check.known_hostsrecord (SHA256:XAMzCdVb...BP0).sshclient: install it, or fail? Picked fail with a message; no existing action installs packages.GIT_SSH_COMMANDalso uses-F /dev/null, so otherssh://remotes in the same job get strict, key-only ssh too.Smoke
Nothing to smoke here; the live
ls-remoteneeds the secret. After merge, on the first consumer run (adoption PR), the step must pass; failure messages nameGITDAN_CRATES_DEPLOY_KEY.Unproven until then: that the forge accepts the real key, and the action's use from a
desktopcontainer image (ssh client present). Probed offline: with a throwaway key the action reachesPermission denied (publickey)against live gitdan.com:22022 (pin verified), and a tampered pin is rejected.Rode along
🤖 Generated with Claude Code
https://claude.ai/code/session_01MfBCVNDv3y5gm2djeZSAk4