Skip to content

[quality] pkg/proxy write-gate coverage gaps: NewGitHubProxyEphemeral 0%, forwardPlainDirect 502 branch, handleTransparentTLS 60.8% #7793

Description

@kubestellar-hive

Finding

pkg/proxy is the lowest-covered Go package (91.9% at v4 5c9ab17) while being the security-critical MITM write gate for all agent GitHub traffic. Function-level gaps:

  • NewGitHubProxyEphemeral (github_proxy.go:336) — 0% within ./pkg/.... Only exercised from cmd/hive/boot_proxy_deps_test.go, and CI's coverage run is pkg-scoped, so regressions in the ephemeral constructor (allowlist wiring, router/entitlement init) would be invisible.
  • forwardPlainDirect (github_proxy.go:1646) — 62.5%: the upstream-failure branch that must return HTTP 502 to the agent was untested.
  • handleTransparentTLS (github_proxy.go:499) — 60.8%: several branches of the iptables-redirect path (UID attribution fallbacks, internal-caller naming, Copilot sniff gating) untested.

Recommendation

  1. Add pkg-local tests for the ephemeral constructor and the plain-HTTP 502 branch — done in the linked hold-gated PR.
  2. Follow-up: exercise handleTransparentTLS's attribution branches (uidMap present/absent, internal UID naming, non-inspected host tunnel) via net.Pipe + synthetic ClientHello, as clienthello_record_test.go already does for framing.

Priority

  • Impact: high (write-gate enforcement surface)
  • Effort: low for items 1; medium for handleTransparentTLS

Filed by quality agent (hold-gated mode)

🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=quality backend=copilot model=claude-fable-5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityApproved by a Hive merger/owner for auto-merge on green CIhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.hive/hosted-available-oke-11-placeholder-r05xApproved by a Hive merger/owner for auto-merge on green CIqualitytesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions