Skip to content

Commit 5ffec40

Browse files
Allow restricted fork validation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 859d274 commit 5ffec40

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

docs/content/reference/process-workflow-fleet-standard.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ decisions before canonical guides, templates, or consumer workflows adopt it:
136136
| Pull-request activities | Keep all six listed activity types. | Reduce the activity list if a v8 behavior is intentionally unsupported. |
137137
| Concurrency | Use the workflow plus PR-number-or-full-ref key and cancel only pull-request runs. | Selected for the candidate: PR reconciliation must be resumable; non-PR runs serialize by full ref. |
138138
| Permissions | Default deny at workflow level, then grant the caller job `contents: read`, `pages: write`, and `id-token: write`. | Selected for the candidate: use `GITHUB_TOKEN` for repository-local, non-user-facing platform operations and App tokens for user-facing or otherwise unsupported operations. |
139-
| Fork behavior | Keep the caller unconditional; gate unsupported fork events in the reusable workflow's Plan job. | Selected for the candidate; execution policy belongs to Process-PSModule rather than every consumer. |
139+
| Fork behavior | Keep the caller unconditional; classify fork pull requests as restricted read-only validation in `Plan`. | Selected for the candidate; execution policy belongs to Process-PSModule rather than every consumer. |
140140
| Credentials | Explicitly map the three v8 credentials. | Define a narrower credential profile for repositories that cannot publish. |
141141
| Optional surface | Permit only documented `TestData`, workflow inputs, schedule timing, and presentation metadata. | Allow additional extension points after naming and compatibility rules are agreed. |
142142

@@ -171,7 +171,7 @@ fleet campaign. Branch names, `latest`, floating minor tags, and unqualified tar
171171
| Schedule | Keep a scheduled health run. | Exercises current dependencies even when repository code is unchanged. |
172172
| Concurrency | Use the PR-number-or-ref key and cancel only pull-request runs. | New PR events supersede older declarative reconciliation runs; same-ref push, dispatch, and schedule runs serialize without cancellation. |
173173
| Permissions | Set top-level `permissions: {}` and grant only `contents: read`, `pages: write`, and `id-token: write` to the caller job. | Checkout and Pages remain repository-local built-in capabilities; user-facing interactions and operations outside the built-in token boundary use scoped GitHub App tokens. |
174-
| Event gate | Keep the caller unconditional and gate unsupported events in `Plan`. | The reusable workflow owns execution policy; every downstream job must require a successful authorized plan. |
174+
| Event gate | Keep the caller unconditional and authorize capabilities in `Plan`. | The reusable workflow owns execution policy; fork pull requests may validate but cannot obtain App credentials, publish, deploy, clean up, or mutate repository state. |
175175
| Reference | Use the intended internal floating major tag (`v8`) after tag governance is enforced. | Compatible owned releases roll out centrally; breaking releases require a new major and campaign. |
176176
| Credentials | Explicitly map the three required secrets. | Satisfies the `v7+` contract and prevents unrelated secret inheritance. |
177177
| Scope | Keep the caller as a single delegation job. | Repository-specific automation remains independently understandable and maintainable. |
@@ -212,9 +212,13 @@ interactions such as pull-request comments, labels, statuses, releases, and rele
212212
token cannot provide the required repository or cross-repository access. Tokens remain step-scoped and must not fall
213213
back silently from App authorization to broader built-in-token authority.
214214

215-
The reusable workflow's Plan job rejects unsupported fork-originated pull requests before any credentialed or
216-
repository-defined work runs. Every downstream job must depend on a successful authorized Plan result, including jobs
217-
using `always()`. Supporting fork CI requires a separate, secret-free read-only workflow under this candidate.
215+
The reusable workflow's Plan job classifies fork-originated `pull_request` events as restricted read-only validation.
216+
It may allow repository-local checkout, build, lint, and test with least-privilege built-in access, but must explicitly
217+
deny App-token creation, Gallery access, publication, Pages deployment, cleanup, and repository or user-facing
218+
mutations. Every downstream job, including jobs using `always()`, must require a successful valid Plan and the planned
219+
capability for its operation before running or evaluating Settings. Privileged-context events such as
220+
`pull_request_target` remain unsupported unless separately designed to prevent untrusted code from crossing the
221+
credential boundary.
218222

219223
The candidate keeps repository-specific automation in a separate workflow file. That keeps the Process-PSModule wrapper
220224
identical enough for automated comparison while allowing modules to own unrelated schedules, generation, or integration

0 commit comments

Comments
 (0)