You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/reference/process-workflow-fleet-standard.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,7 @@ decisions before canonical guides, templates, or consumer workflows adopt it:
137
137
| Concurrency | Use the PR-number-or-ref key and cancel only superseded pull-request runs. | Use separate groups per event class or disable cancellation for all runs. |
138
138
| Permissions | Set top-level permissions to empty and grant only `contents: read`, `pages: write`, and `id-token: write` to the caller job. | Define a narrower profile for repositories that do not publish Pages. |
139
139
| Fork behavior | Invoke the reusable workflow unconditionally; Plan classifies normal fork `pull_request` events into restricted read-only validation and rejects `pull_request_target` until separately designed. | Omit fork validation or design a separate `pull_request_target` trust boundary. |
140
-
| Credentials | Explicitly map the three v8 credentials. | Define a narrower credential profile for repositories that cannot publish. |
140
+
| Credentials | Explicitly map `PSGALLERY_API_KEY`, `GitHubAppClientId`, and `GitHubAppPrivateKey`; `secrets: inherit` is nonconforming. | Define a narrower profile only for repositories with an approved non-publication contract. |
141
141
| Optional surface | Permit only documented `TestData`, workflow inputs, schedule timing, and presentation metadata. | Allow additional extension points after naming and compatibility rules are agreed. |
142
142
143
143
The `v8` reference is the controlled moving major tag for this PSModule-owned workflow. On 2026-08-15, `v8`, `v8.0`,
@@ -173,7 +173,7 @@ fleet campaign. Branch names, `latest`, floating minor tags, and unqualified tar
173
173
| Permissions | Use empty top-level permissions and the three caller-job permissions shown above. | Repository-local reads and Pages/OIDC stay narrow; App tokens provide broader authority. |
174
174
| Fork authorization | Leave the caller job unconditional. | Plan grants normal fork `pull_request` events only restricted read-only validation capabilities and rejects `pull_request_target` before credentials or repository-defined code run. |
175
175
| 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. |
176
-
| Credentials | Explicitly map the three required secrets. | Satisfies the `v7+` contract and prevents unrelated secret inheritance. |
176
+
| Credentials | Explicitly map `PSGALLERY_API_KEY`, `GitHubAppClientId`, and `GitHubAppPrivateKey`; do not use `secrets: inherit`. | Satisfies the `v7+` contract and prevents unrelated secret inheritance. |
177
177
| Scope | Keep the caller as a single delegation job. | Repository-specific automation remains independently understandable and maintainable. |
178
178
179
179
## Candidate optional elements
@@ -182,20 +182,20 @@ These are evidence-based candidate variations, not approved policy.
182
182
183
183
| Option | When it is appropriate | Constraint |
184
184
| --- | --- | --- |
185
-
| `TestData` secret | Module-local tests need caller-defined secrets or variables. | Use the documented compact single-line JSON object and expose only required values. |
185
+
| `TestData` secret mapping | Module-local tests need caller-defined secrets or variables. | Map `TestData: ${{ secrets.TestData }}` only when used. Its value is a JSON object with separate `secrets` and `variables` maps; omit the mapping when unused. |
186
186
| `with.SettingsPath` | The settings file is not `.github/PSModule.yml`. | Prefer the standard path for normal module repositories. |
187
187
| `with.WorkingDirectory` | The module is intentionally rooted below the repository root. | Keep the default `.` for the standard layout. |
188
188
| `with.ImportantFilePatterns` | A caller must override change detection at the workflow boundary. | Prefer stable configuration in `.github/PSModule.yml`; the supplied list replaces all defaults. |
189
-
| `with.Debug`, `Verbose`, `Version`, or `Prerelease` | A deliberate diagnostic or dependency-selection scenario needs it. | Do not hard-code temporary diagnostics into the fleet baseline. |
189
+
| `with.Verbose`, `Version`, or `Prerelease` | A deliberate diagnostic or dependency-selection scenario needs it. | Do not hard-code temporary diagnostics into the fleet baseline. |
190
190
| Schedule time | Health runs need staggering or a repository-specific maintenance window. | Keep at least one documented schedule unless the repository records why health runs are unnecessary. |
191
191
| `run-name` | A repository needs clearer run presentation. | Presentation must not change job names or routing behavior. |
192
192
193
193
## Variations requiring a decision
194
194
195
-
The following differ from the candidate. They are inventory classifications, not policy violations, until #514 records
196
-
an approved structure:
195
+
The following are nonconforming with locked candidate decisions. They remain inventory classifications rather than
196
+
approved organization policy until #514 records an approved structure:
197
197
198
-
- `secrets: inherit`;
198
+
- `secrets: inherit`, which is nonconforming because the candidate requires the three explicit baseline mappings;
199
199
- `APIKey`or `APIKEY` mappings from the pre-`v7` contract;
200
200
- any Process-PSModule reference other than the intended major tag (`v8`), including a branch, `latest`, minor tag,
201
201
exact patch tag, or full commit SHA;
@@ -204,6 +204,22 @@ an approved structure:
204
204
- trigger-level path filters that bypass Process-PSModule important-file evaluation;
205
205
- unrelated additional jobs in the caller wrapper;
206
206
- omitted documented permissions without a verified settings-based least-privilege profile.
207
+
- `with.Debug: true`, which is nonconforming because the reusable workflow default remains `false`.
208
+
209
+
When required, the optional test-data mapping extends the candidate baseline without broadening it:
These three explicit mappings are the required caller baseline; `secrets: inherit` is nonconforming. The only optional
106
+
secret mapping is `TestData` for module-local tests:
107
+
108
+
```yaml
109
+
TestData: ${{ secrets.TestData }}
110
+
```
111
+
112
+
When present, `TestData` contains a JSON object with separate `secrets` and `variables` maps. It is omitted when
113
+
unused. A conforming caller does not set `with.Debug: true`; the reusable workflow default remains `false`.
114
+
101
115
Built-in `GITHUB_TOKEN` authorization is permitted for checkout, repository-local reads, and standard Pages/OIDC deployment within that job boundary. GitHub App installation tokens are step-scoped and authorize every user-facing interaction and every operation that needs broader reach or permissions: pull-request comments and labels, commit statuses and check-facing reporting, releases, tags, assets, and cleanup.
102
116
103
117
Each App-token step requests only the installation permissions required for its operation. A missing App token is an authorization failure for App-required work: that operation stops before its API request or mutation, without silently falling back to the built-in workflow token. Built-in-token reads and Pages deployment remain available only within the explicit caller job permissions.
@@ -186,6 +200,7 @@ The lifecycle contract is exercised with event payload fixtures and publication
186
200
| Gallery immutability | Deterministic pull-request identity, existing-version detection, supported-unlist, and retained-version fixtures across the cancellation boundary. |
187
201
| Stable aggregation | Bursts of main-push, manual-dispatch, and scheduled fixtures that replace an intermediate pending run and prove the later stable target aggregates all unreleased merged pull requests. |
188
202
| Scoped caller permissions | Empty caller top-level permissions, the three job grants, built-in-token checkout/read, and standard Pages/OIDC verification. |
203
+
| Caller credential contract | Explicit baseline mappings for `PSGALLERY_API_KEY`, `GitHubAppClientId`, and `GitHubAppPrivateKey`; rejected `secrets: inherit`; optional `TestData` JSON with separate `secrets` and `variables` maps; and no `with.Debug: true`. |
189
204
| App authorization failure | Missing-App-token fixtures that prove user-facing operations fail closed without built-in token fallback. |
190
205
| Token boundary | Fixtures that prove App tokens are step-scoped and built-in-token operations remain within the caller job's boundary. |
191
206
| Event authorization | Normal-fork `pull_request` fixtures that prove the controlled upstream Plan derives restricted capabilities from immutable fork/base/head metadata before it consumes settings or checked-out code, then permits only checkout/build/lint/test with a green/red outcome and no configured secrets; `pull_request_target` fixtures prove Plan rejects before credentialed or repository-defined code, including for downstream `always()` jobs. |
Copy file name to clipboardExpand all lines: docs/content/reference/process-workflow-lifecycle-specification.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,7 +211,9 @@ Scenario: Recover a range of unreleased merged pull requests
211
211
212
212
### FR11 — Repository operations MUST use scoped authorization {#fr11}
213
213
214
-
The caller MUST declare top-level `permissions: {}`. Its Process-PSModule job MUST grant only `contents: read`, `pages: write`, and `id-token: write`. Built-in `GITHUB_TOKEN` MAY authorize repository-local, non-user-facing work when those permissions are sufficient, including checkout, reads, and standard Pages/OIDC deployment. GitHub App installation tokens MUST authorize all user-facing interactions and any operation that exceeds the built-in token's reach or permissions, including pull-request comments and labels, commit statuses and check-facing reporting, releases, tags, assets, and cleanup. Tokens MUST remain scoped to the steps that require them.
214
+
The caller MUST declare top-level `permissions: {}`. Its Process-PSModule job MUST grant only `contents: read`, `pages: write`, and `id-token: write`. It MUST explicitly map `PSGALLERY_API_KEY`, `GitHubAppClientId`, and `GitHubAppPrivateKey`; `secrets: inherit` is nonconforming. It MAY additionally map `TestData` only for module-local tests. When present, `TestData` MUST contain a JSON object with separate `secrets` and `variables` maps; callers MUST omit it when unused. No conforming caller MAY set `with.Debug: true`; the reusable workflow default remains `false`.
215
+
216
+
Built-in `GITHUB_TOKEN` MAY authorize repository-local, non-user-facing work when those permissions are sufficient, including checkout, reads, and standard Pages/OIDC deployment. GitHub App installation tokens MUST authorize all user-facing interactions and any operation that exceeds the built-in token's reach or permissions, including pull-request comments and labels, commit statuses and check-facing reporting, releases, tags, assets, and cleanup. Tokens MUST remain scoped to the steps that require them.
215
217
216
218
#### Behavioral scenarios {#fr11-scenarios}
217
219
@@ -222,6 +224,24 @@ Scenario: Run with the caller's minimum permissions
222
224
When the reusable workflow performs checkout or standard Pages deployment
223
225
Then it may use the built-in workflow token within that granted boundary
224
226
227
+
Scenario: Provide the required caller credentials explicitly
228
+
Given a conforming caller invokes the reusable workflow
229
+
When it maps credentials to the Process-PSModule job
230
+
Then it maps PSGALLERY_API_KEY, GitHubAppClientId, and GitHubAppPrivateKey explicitly
231
+
And it does not use secrets inherit
232
+
233
+
Scenario: Provide optional module-local test data
234
+
Given module-local tests require caller-provided data
235
+
When the caller maps TestData
236
+
Then its secret value is a JSON object with separate secrets and variables maps
237
+
And the caller omits TestData when tests do not require it
238
+
239
+
Scenario: Keep caller debug disabled
240
+
Given a conforming caller invokes the reusable workflow
241
+
When it sets workflow inputs
242
+
Then it does not set Debug to true
243
+
And the reusable workflow uses its false default
244
+
225
245
Scenario: Perform a user-facing repository operation
226
246
Given the reusable workflow must create a pull-request comment or release
227
247
When the operation requires authority beyond the built-in token boundary
0 commit comments