镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[P2] Preserve custom HTTPS ports in Git credential lookup #28

Closed

Description

@starmorph

Review finding R9, priority P2. Reviewed source: e112e51.

Assessment

Fix-benefit confidence Severity Difficulty Code size
99/100 28/100 15/100 15/100

Scores are engineering estimates, not calibrated probabilities or CVSS. Confidence rates improvement from the proposed fix; severity reflects this repository's prerequisites and safeguards. Higher difficulty/code-size scores mean more work.

The two auth phases use inconsistent keys. The fix is direct, but the affected deployment is narrow: private Git servers on nondefault HTTPS ports.

Finding and verification

Evidence: Credential keys explicitly support ports (src/bot-config.ts:10). Head resolution uses URL hostname, which removes the port (src/sandbox/render/snapshot.ts:34–35). The staged clone helper uses Git's host value, including a nondefault port (sandbox/build/git-credential-staged.sh:13–18).

Trigger and verification: A fake Git fixture recorded authentication selection for a private HTTPS server on a nondefault port. A matching host-and-port credential was skipped during head resolution, while the staged helper matched it. Source inspection confirms the inconsistent keys; no real server or credential was used.

Impact: An otherwise supported private Git configuration fails snapshot preparation unless the operator duplicates credential entries or changes the endpoint.

Fix direction: Normalize one host-and-port credential key for both phases, independently from the sanitized environment-variable name. Decide how default HTTPS ports are normalized.

Regression: Both head resolution and cloning select the same credential for a nondefault port; ordinary GitHub and default-port behavior remain intact.

Proposed implementation scope

Head-resolution credential key normalization and Git/helper tests; roughly 2–3 files.

Keep this fix separate from unrelated refactors. Preserve the qualifications above; no real Render or paid model validation was performed during review.

Acceptance and verification

  • Add the focused regression described above and confirm it detects the current behavior.
  • Implement the selected fix without changing unrelated public behavior.
  • Run frozen dependency installation, pnpm typecheck, and the relevant existing tests; report failures and skipped checks.
  • Update docs/config migration where affected.
  • Record any required Render staging or snapshot-refresh validation before rollout.

Use a dedicated codex/issue-N-git-credential-port branch and a focused PR referencing this issue after the fix is selected.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions