Repository navigation
fix(dg): keep the encryption key beside the limited key, describe runner keys, per-file passphrases - #273
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (16)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ner keys, per-file passphrases QW2-004: dg auth login, dg auth new and dg auth keys add store the identity's ENCRYPTION keys beside the limited signing key (a bridge identity holding exactly those, no master key or words), so private repositories work without the master key on disk, as the web's Enable private repos does. --signing-only opts out. auth status shows a Private: line, doctor says it too, and E306/E301 now point at signing in again instead of --full-key. QW2-005: auth status and doctor describe a key bound to one document type (a CI runner key) as such, with its budget and expiry, instead of unlimited / a general write key; doctor fails a key that is not live on the identity. QW2-022: dg ci runner new reads the --runner file's passphrase from DASH_FORGE_RUNNER_PASSPHRASE (else DASH_FORGE_PASSPHRASE); a sealed file that does not open is E303 naming the file and where the passphrase came from, not an E204. QW-034: dg webhook list is a read that opens no key for a public repository. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Callers pick the encryption keys once (encryption_to_store) and pass them to register_and_store, so what is printed is what is stored and the identity is not fetched again. dg auth keys add keeps the encryption keys the replaced key holds. Nothing is stored beside a key written in the clear (--insecure-plaintext). The Private: line and the doctor keys row read the keys against the chain, point an identity with none at dg auth keys add --encryption, and name --replace <key id> so signing in again leaves no orphaned key. doctor fails a spent or expired key. A sealed file's non-passphrase errors keep their type, and the variable in use is looked up in one place. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PastaPastaPasta
force-pushed
the
fix/qw2-cli-keys
branch
from
September 30, 2026 21:36
29d3834 to
1bc963a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
QA wave 2 (bonsia), stream cli-keys-args, batch 4: the CLI key model.
Fixes
dg auth login(from the file or the words),dg auth newanddg auth keys addnow keep the identity'sENCRYPTIONkey(s) next to the limited signing key. What's stored is a bridge-format identity holding exactly the limited key and those keys, with no master key and no recovery words. So private repos work with a spend-capped key, as they do with the web app's "Enable private repos".EncryptionKeys::held: only keys the source holds, or that its words derive, which match the identity on chain.keys addalso keeps the ones the replaced key held.--signing-onlystores the signing key alone. So does--insecure-plaintext, because the encryption key is never written in the clear.dg auth statushas aPrivate:line, checked against the chain.keysrow reports the same.dggets the exact command to fix it,dg auth login <file> --replace <id>, so no key is left live on chain with nothing holding it. An identity with no encryption key is pointed atdg auth keys add --encryption.--full-key.dg auth statusanddg doctornow describe a key bound to one document type as#7 bound to checkRun documents only (a CI runner key) — 0.5 of 0.5 DASH left, expires in 365 day(s). Before, it read as "unlimited" or as a general "HIGH/CRITICAL auth key for writes". doctor also fails a key that isn't live on the identity, or whose budget is spent or which has expired.dg ci runner new --runner <file>reads that file's passphrase fromDASH_FORGE_RUNNER_PASSPHRASE, falling back toDASH_FORGE_PASSPHRASE. A sealed file that doesn't open now fails with E303 naming the file and the variable the passphrase came from, instead of E204 naming neither.ci.mddocuments the scripted recipe.dg webhook listopened the key. It's now a read that opens no key for a public repo, like the other lists.Not touched
The recovery-word and secret output (QW2-001, a separate hotfix).
Security note
The encryption key now sits where the limited key is kept: the OS keychain, or a passphrase-sealed file. The keychain paragraph in identity-and-keys.md says so. It's a read key with no budget, and it opens old private content, which is why
--signing-onlyexists and why it's never stored unencrypted. This is the same tradeoff as a scoped token or deploy key on GitHub, and it's what the QA expected ("a spend-capped signing key plus the encryption key only").Verification
cargo fmt --check,clippy --workspace --all-targets -D warningsandcargo test --workspaceall pass. New tests:spent_or_expiredPrivate:line casesdash-forge-qa/evidence/qa-wave-bonsia-2/fixes/cli-keys-args/:10-private-repo-with-limited-key.txt: before, a signing-only key gets E306. After re-login, the owner createsqw2-keys-priv(private), plaingit pushes it, and creates and lists an issue, all with limited key feat(cli): actionable errors with stable codes, exit codes and --json #16 plus encryption key Publish the browse index on ordinary pushes #4 (masterKeyStored: false).11-ci-runner-new-two-passphrases.txt: with key and runner file sealed under different passphrases, E303 names the runner file. WithDASH_FORGE_RUNNER_PASSPHRASE, the runner key registers and is enrolled.12-runner-key-status-doctor.txt: the runner key reads as bound to checkRun in both status and doctor.13-readonly-webhook-list-sealed-key.txt:webhook listworks with a sealed key, no passphrase and no terminal.14-status-doctor-keys-add-keep-encryption.txt:keys addreplaces feat(cli): actionable errors with stable codes, exit codes and --json #16 with feat(web): read forge-v2 repos (protocol 14) with v1 read-compat #17 and keeps encryption key Publish the browse index on ordinary pushes #4, and the private repo still reads.This is CLI-only, with no web UI change.
🤖 Generated with Claude Code