Repository navigation
feat(cli): pin a backup trusted root and fetch roots by id - #244
Conversation
The root private key for skilld-root-2026 is lost, so the next release must pin a new primary root and a backup root. Each pinned root is fetched from /api/v1/trusted-roots/{rootKeyId}; only a 404 moves to the next pin, so a served root that fails verification never falls through. The release refuses to build unless skilld.dev serves the pinned primary root.
Only a 404 may move verification to the backup pin. These cases cover a served root for the wrong pin, invalid JSON, a transport failure, and a rejected redirect at the primary path.
Update checks verify the trusted root too, but only skilld run and install added the upgrade step to a TRUSTED_ROOT_* failure.
The guard checked only the primary root, so a wrong backup value could ship unnoticed. It now checks each id and key format, rejects the lost skilld-root-2026, and requires skilld.dev to serve both roots without a redirect.
🤖 MERGED
GitHub merged this pull request.
7f1d4c0f-5e6b-43f1-895b-d03924ba553d Selected findings run after merge and open separate pull requests. |
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: BLOCKED.
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: BLOCKED.
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: BLOCKED.
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: BLOCKED.
| verify_attestation(&attestation, &primary)?; | ||
| let backup = read_root(&mut args)?; | ||
| verify_attestation(&attestation, &backup)?; | ||
| if supported_signers(&primary)? != supported_signers(&backup)? { |
There was a problem hiding this comment.
Open (85/100): Both roots can pass preflight while dropping support for existing Artifacts.
Proof: The gate verifies one attestation and compares the two candidate signer maps. If both roots omit the same still-supported signer, the maps match and the probe passes. The CLI then rejects any still-served Artifact signed by the omitted key .
Next: Check both roots against a trusted baseline of signer IDs, public keys, and validity windows required by still-served Artifacts. Keep the live probe and the comparison between roots.
Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy.
🔗 Linked issue
No linked issue.
❓ Type of change
📚 Description
The private key of the pinned root
skilld-root-2026is lost. The next release must pin a new primary root and a backup root, and must not depend on/api/v1/trusted-root, which released CLIs keep reading.SKILLD_ROOT_KEY_IDandSKILLD_ROOT_PUBLIC_KEY. It can also pin a backup root fromSKILLD_BACKUP_ROOT_KEY_IDandSKILLD_BACKUP_ROOT_PUBLIC_KEY.TrustedRootPinsholds a required primary pin and an optional backup pin, so a backup without a primary cannot exist. An empty or half-set pair leaves the build unconfigured, and it fails withTRUSTED_ROOT_UNCONFIGURED.GET /api/v1/trusted-roots/{rootKeyId}for each pin in order, with the id percent-encoded. Only a 404 moves to the next pin. Any other failure keeps its current error, and a served root that fails verification never falls through to the backup.TRUSTED_ROOT_MISMATCH.TRUSTED_ROOT_*next step namedskilld upgrade, which is not a command. It now namesnpx skilld@latestandnpm i -g skilld@latest, for install, run, and update checks.release.ymlchecks the format of each root id and public key, and rejects the lostskilld-root-2026and a backup that reuses the primary id or key. Before any build, it requires skilld.dev to serve both roots, with no redirect, each withversion1, at least one key, and its pinned id and public key.📝 Migration
/api/v1/trusted-roots/{rootKeyId}with the new primary and backup roots. Until it serves both, the release stops at "Require skilld.dev to serve both pinned roots".SKILLD_ROOT_KEY_IDandSKILLD_ROOT_PUBLIC_KEYto the new primary root. SetSKILLD_BACKUP_ROOT_KEY_IDandSKILLD_BACKUP_ROOT_PUBLIC_KEYto the backup root.