Skip to content

Update Git checkout and SSH host handling - #23239

Merged
niik merged 2 commits into
developmentfrom
niik-security-advisory-fixes
Nov 26, 2026
Merged

niik merged 2 commits into
developmentfrom
niik-security-advisory-fixes

Conversation

@niik

@niik niik commented Nov 26, 2026

Copy link
Copy Markdown
Member

N/A

Description

Updates checkout argument boundaries and routes SSH host authenticity checks through the existing prompt flow. Adds checkout regression tests and updates the Git argument guidance.

Validation:

  • npm test -- app/test/unit/git/checkout-test.ts - passed (17 tests).
  • npx tsc --noEmit -p . - passed.
  • npm run lint:fix - passed; no files changed.

The tests and type check ran on the same file tree as commit 296fc3856f, before its history was replaced. No focused SSH host-authenticity test was run.

Screenshots

N/A: no visual UI changes.

Release notes

Notes: Improved Git checkout and SSH host handling.

Team-authored review

Evidence: Validation results above; screenshots are not applicable.

Review path: needs-deep-review. Git checkout arguments and SSH host trust need in-depth review by another human, including checkout behavior and the host verification prompt.

Co-authored-by: Copilot App <[email protected]>
@niik
niik requested a review from a team as a code owner November 26, 2026 10:43
@niik
niik requested review from sergiou87 and a balanced review from Copilot November 26, 2026 10:43
@niik niik added the needs-deep-review Requires in-depth human code review of affected paths; agent review is not sufficient. label Nov 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The GitHub SSH host-trust change lacks focused validation, requiring human review of foreground acceptance/rejection and background no-prompt behavior.

No open issues 🎉

What changed in this PR

This PR updates GitHub Desktop’s Git integration to handle option-like branch names safely and use the existing SSH host-authenticity flow consistently.

Changes:

  • Adds explicit checkout option boundaries and documents their placement.
  • Adds regression tests for local branch names and remote tracking, with and without progress callbacks.
  • Removes automatic acceptance of the pinned GitHub RSA host key.
File Description
docs/​contributing/​styleguide.md Clarifies checkout option and path separator placement.
app/​test/​unit/​git/​checkout-test.ts Tests option-like local branch names and remote checkout tracking.
app/​src/​lib/​trampoline/​trampoline-askpass-handler.ts Removes the GitHub-specific host-key auto-accept exception.
app/​src/​lib/​git/​checkout.ts Places --end-of-options before branch targets while preserving checkout options.

Review effort: Balanced

sergiou87
sergiou87 previously approved these changes Nov 26, 2026
@niik
niik merged commit 5abce6b into development Nov 26, 2026
9 checks passed
@niik
niik deleted the niik-security-advisory-fixes branch November 26, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-deep-review Requires in-depth human code review of affected paths; agent review is not sufficient.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants