[architect] refactor: remove dead pkg/hub wrapkey* envelope-encryption subsystem (wrapkey.go, wrapkey_store.go) - #5697
Conversation
… subsystem wrapkey.go and wrapkey_store.go (747 LOC, 19 functions) implement X25519/AEAD hub-spoke envelope encryption that is unreachable from every binary (hive, hivectl, apiproxy, bd, hive-backup) per 'deadcode ./cmd/...'. No production file outside the pair references any of its symbols, and no documentation mentions the feature. Only wrapkey_test.go exercised it. Refs #5694 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
clubanderson
left a comment
There was a problem hiding this comment.
Reviewed the security-adjacent removal rigorously. All removed wrapkey symbols are unreferenced from current v4 product code after excluding the deleted files/tests; stored-data field/path searches found only the design document, not live migrations or readers. v5 still has the same orphan implementation/tests but no product call into it. go build ./... and go test ./pkg/hub pass.
|
LGTM label has been added. DetailsGit tree hash: f17cb161401e1842d0d8334ed094f04db848eec3 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andy Anderson <andy@clubanderson.com>
clubanderson
left a comment
There was a problem hiding this comment.
Re-reviewed after adding the required changelog fragment. The wrapkey removal remains unreferenced by runtime code/storage readers; build and hub package tests passed.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andy Anderson <andy@clubanderson.com>
clubanderson
left a comment
There was a problem hiding this comment.
Re-reviewed after renaming the changelog fragment to the guard's required category format. Verdict remains approve.
|
LGTM label has been added. DetailsGit tree hash: cb37c258b392a6a813fceb17db28ea87453dc738 |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
Refactor
Deletes
src/pkg/hub/wrapkey.go,src/pkg/hub/wrapkey_store.go, andsrc/pkg/hub/wrapkey_test.go— the X25519/AEAD hub↔spoke envelope-encryption subsystem (747 LOC production, 19 functions).Why it is safe to remove:
deadcode ./cmd/...reports every function in the pair unreachable from all 5 binaries (hive, hivectl, apiproxy, bd, hive-backup).generateWrapKeypair,sealForSpoke,openFromHub,ensureSpokeWrapKeys,wrapPublicKey, …) finds no references outside the three deleted files.Validation:
go build ./...andgo test ./pkg/hub/(full suite, 173s) pass after removal.Claimed ground: only the three
src/pkg/hub/wrapkey*files. Disjoint from open hold-gated PRs #4032 (pkg/proxy, pkg/github, pkg/config), #5642/#5635/#5559 (docs).If this subsystem is a staged feature, reviewers should reject and instead attach a tracking issue/build tag as proposed in the parent issue.
Refs #5694 (partial — the delegation and mint clusters remain)
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.78