Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

skills: remoteHeadSha() can open a Git Credential Manager dialog on Windows (GIT_TERMINAL_PROMPT does not cover GUI helpers; slug unvalidated)

Đang mở Phù hợp với người mới
#4,702 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu trong packages/cli/src/utils/skillsManifest.ts tại remoteHeadSha() và lần theo caller của --source nếu cần. Xác minh slug trước khi khởi chạy git, vô hiệu hóa credential helpers và các prompt tương tác cho lần tra cứu này, đồng thời đảm bảo các repository không hợp lệ hoặc không thể truy cập trả về null mà không mở hộp thoại GUI.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

packages/cli/src/utils/skillsManifest.ts remoteHeadSha() runs

execFileAsync("git", ["ls-remote", `https://github.com/${repoSlug}.git`, "refs/heads/main"], { env: { ...process.env, GIT_TERMINAL_PROMPT: "0" } })

GIT_TERMINAL_PROMPT=0 only suppresses terminal prompts. On Windows with Git Credential Manager (the Git for Windows default), a slug for a nonexistent or private repository makes GitHub answer with an authentication challenge, and GCM opens a GUI "Connect to GitHub" window instead of failing. The function's catch never sees it because the process is blocked on the dialog until the user cancels. repoSlug is also passed through unvalidated, so any --source value shaped like a/b reaches git.

We hit the same mechanism this week through a different caller (OpenCode's plugin install, reported at https://github.com/anomalyco/opencode/issues/51943) and noticed this helper has the same latent shape while tracing it.

Suggested fix

  • Validate the slug before spawning: /^[\w.-]+\/[\w.-]+$/, else return null.
  • Spawn git so it can never prompt: git -c credential.helper= ls-remote ... plus GCM_INTERACTIVE: "never" and GIT_ASKPASS: "" in the env. An anonymous read of a public repo never needs a credential helper, so disabling it for this call loses nothing.

Low priority; reported for completeness while the details were fresh.

Ngôn ngữ chính
TypeScript
Star
54.1k
Fork
4.9k
Merge trung bình
7 giờ 29 phút
Pull request đã merge (30 ngày)
778

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của heygen-com/hyperframes

Tất cả issue của heygen-com/hyperframes

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.