feat(vc): implement SSH commit signing (ENG-2002)#348
Open
feat(vc): implement SSH commit signing (ENG-2002)#348
Conversation
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.
Summary
brv vc commitcreates unsigned commits. There is no way to cryptographically sign commits made through ByteRover's isomorphic-git-based VC, limiting trust and traceability in collaborative workflows.brv vccannot match the security posture they have with native git.src/server/infra/ssh/module: SSH key parser (Ed25519/RSA/ECDSA, OpenSSH + PEM formats), sshsig signer (PROTOCOL.sshsig-compliant envelope), SSH agent client (Unix domain socket protocol), and in-memory TTL key cache.VcHandler.handleCommit: Path A -- ssh-agent (zero-prompt), Path B -- in-memory cache (passphrase-free after first use, 30 min TTL), Path C -- file-based parse (prompts for passphrase if encrypted, then caches).brv vc configkeys:user.signingkey(path to SSH key),commit.sign(boolean), plus--import-git-signingflag to import from native git config.brv signing-keycommand group (add,list,remove) for managing signing keys on the Byterover IAM API.vc:signing-keytransport event andSigningKeyHandlerfor daemon-side CRUD.brv vc commitgains--sign/--no-signflags with interactive passphrase retry (max 3 attempts).resolveAuthorrefactored: vc config -> auth token fallback (replaces duplicatedbuildAuthorHint).gpg.formatmust besshor absent).Type of change
Scope (select all touched areas)
Linked issues
Root cause (bug fixes only, otherwise write
N/A)N/A
Test plan
test/unit/infra/ssh/ssh-key-parser.test.ts(169 lines)test/unit/infra/ssh/ssh-agent-signer.test.ts(372 lines)test/unit/infra/ssh/sshsig-signer.test.ts(79 lines)test/unit/infra/ssh/signing-key-cache.test.ts(150 lines)~path resolution, probe (exists/needs-passphrase detection)User-visible changes
brv vc commit --sign/--no-signbrv vc config user.signingkey <path>,brv vc config commit.sign true|falsebrv vc config --import-git-signing(imports from native git config)brv signing-key add --key <path> [--title <label>],brv signing-key list,brv signing-key remove <id>PASSPHRASE_REQUIRED,SIGNING_KEY_NOT_CONFIGURED,SIGNING_KEY_NOT_FOUNDEvidence
Attach at least one:
Checklist
npm test)npm run lint)npm run typecheck)npm run build)mainRisks and mitigations
crypto.KeyObjectis opaque (not extractable), passphrase itself is never stored, cache clears on daemon restart, per-key invalidation on config change.mainhistory (release/3.1.0, adaptive knowledge, etc.) inflating the diff.mainbefore merge, or use squash merge scoped to the signing commit.