Website previews for fork PRs need a workflow_run deployment on a trusted branch
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- github-actions, typescript
- Domaine
- ci-cd
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 829
- Forks
- 234
- Merge moyen
- 18 h 18 min
- PR mergées (30 j)
- 69
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de cameri/nostream
-
rust.sh shares one CARGO_TARGET_DIR across worktrees, so a scratch-copy build poisons the next runOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Website
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
feat(payments): subscription lifecycle, renewal invoices and plan-based write accessPeut-être pris @Priyanshubhartistm l’a pris aujourd’hui. Ouverteenhancement
cameri/nostream#908 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de cameri/nostream
Issues similaires
-
e2e-failure ready-to-code
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
redhat-developer/rhdh-plugin-export-overlays#4460 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour
-
docs(api): openapi.yaml still documents gif-tools optimize colors as 2-256 instead of 2, 4, 16, 256Ouvertearea: backend documentation priority: low
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
snapotter-hq/SnapOtter#2919 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
obsidianmd/pele#39 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
biomejs/biome#12475 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour