Website previews for fork PRs need a workflow_run deployment on a trusted branch
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, typescript
- Lĩnh vực
- ci-cd
Hướng nghiên cứu
Start by reading deploy-website-preview.yml and the related constraints in #888 and #889. Resolve the artifact-lifetime, PR-commenting, and fork-preview questions before choosing the pull_request/workflow_run design. Done means a safe, documented decision and a preview path that never executes fork code with deployment secrets.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A pull_request run from a fork receives no repository secrets — GitHub withholds them from code the PR author controls, regardless of the permissions: block or the environment configuration. So deploy-website-preview.yml cannot deploy a preview for a fork PR at all, and #888 makes it skip with a notice rather than fail at wrangler deploy.
That leaves fork contributors — the more likely contributor in an open-source relay — with no preview, which is exactly the case a site change most needs one for.
What it needs
The standard shape is a two-workflow split:
pull_request(unprivileged) builds the site, uploads the built tree as an artifact, and writes nothing else.workflow_runon a trusted branch reads that artifact and deploys it with the secrets available tomain.
The security-critical property is that the deploying job never executes fork code: it unpacks a static build, which is data, rather than checking out and running the PR's package.json, build scripts or wrangler config. Even then, the deployed content is attacker-controlled — which is precisely why previews must stay on their own domain and out of the production one (#889 enforces that host boundary in the router).
Open questions worth settling before building it
- does the artifact path survive PR deletion between the two runs
- how to comment on the PR from a
workflow_runcontext, which has nopull_requestpayload (the run'sassociated_pull_requestsis the route, and it can be empty) - whether a preview worker should be created for a fork at all, or the build published as an artifact link only
Found while fixing review findings on #888; not attempted there, because improvising a privileged deploy path inside a bug fix is how a supply-chain hole gets shipped.
- Ngôn ngữ chính
- TypeScript
- Star
- 829
- Fork
- 234
- Merge trung bình
- 18 giờ 43 phút
- Pull request đã merge (30 ngày)
- 67
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- 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 cameri/nostream
-
Website
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Replace the community relay-setup guides with a first-party step-by-step guide on the websiteĐang mởdocumentation Website
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(website): update operator console film with fresh notifications screenshotCó thể đã có người làm @Ferryx349 đã nhận 1 ngày trước. Đang mởbug Website
cameri/nostream#893 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cameri/nostream
Issue tương tự
-
[测试] 等待仓库加载后再记录多仓库排序基线Có thể đã có người làm @myot233 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:arcade p3-medium ready-for-agent testing type:docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
fderuiter/deruiter.dev#2369 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:devenv origin:agent type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
overengineeringstudio/effect-utils#1949 ·
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 76/100
ccch1mneyyy/dsh-TUI#1631 ·
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 78/100
MiniMax-AI/minimax-code#507 ·
Maintainer thường phản hồi trong vòng 1 ngày