Workflows: publish and merge-gate leave a write-scoped token in .git/config while npm install scripts run
Maintainer thường phản hồi trong vòng 1 ngà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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github-actions, typescript
Hướng nghiên cứu
Read .github/workflows/release-cli.yml and .github/workflows/ci.yml, focusing on the publish and merge-gate checkouts and the later npm ci steps. Set persist-credentials: false for both checkouts, then verify neither job relies on the stored credential for a Git operation; pull request #282 is already open against this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Two jobs check out the repository with the default persist-credentials: true while their GITHUB_TOKEN has a write scope, then run npm ci with install scripts enabled:
| Workflow | Job | Token scopes | Later step that runs third-party code |
|---|---|---|---|
release-cli.yml |
publish |
contents: write, id-token: write |
npm ci --no-audit --fund=false in packages/diffci-cli (scripts on) |
ci.yml |
merge-gate |
checks: write |
npm ci --no-audit --fund=false in packages/diffci-cli (scripts on) |
actions/checkout writes the job token into .git/config as an http.https://github.com/.extraheader entry, where every later step in the job can read it, including a dependency's preinstall/postinstall script. In publish that token can push to main, move tags and edit releases.
Neither job needs the stored credential:
publishcreates the GitHub Release, theaction-vtag and the release assets throughgh/the API withGH_TOKEN, andGIT_SSH_COMMANDis already/bin/false. Its only git commands read history (rev-parse), and its checkout hasfetch-depth: 0, so the Action smoke never fetches.merge-gateposts its check run with the Action'sgithub-tokeninput. The Action's--unshallowfetch of a public repository works without credentials.
scorecard.yml, codeql.yml and rust-replay.yml already set persist-credentials: false. credit-contributors.yml needs the stored token because it runs git push.
Reproduce
grep -n -A3 'actions/checkout' .github/workflows/release-cli.yml: the publish job's checkout sets only fetch-depth: 0, and the job has contents: write. The same is true for merge-gate in ci.yml, with checks: write.
Expected: a job whose token can write, and that does not git push, checks out with persist-credentials: false.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 4
- Merge trung bình
- 18 giờ 41 phút
- Pull request đã merge (30 ngày)
- 48
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DiffCI/core
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Planner: splitParts regex is quadratic on a quote followed by many backticks, so the fuzz test fails at randomCó thể đã có người làm @FredApps đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Agent tools: changed_files lists only the new path of a renamed fileCó thể đã có người làm @FredApps đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
DiffCI/core#243 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
adapter good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
agent-ready area: ui-server priority: p3 type: test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
schlessera/brain-kit#4249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation tool triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
can1357/oh-my-pi#19608 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
bcgov/nr-waste-plus#1549 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
blixvip/solana-tx-parse#18 ·