Skip to content

Commit d88e264

Browse files
Document Shelly permission baseline
Distinguish the GitHub App installation permissions from caller github.token permissions and document the Dependabot private-key trust boundary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent a605ffe commit d88e264

2 files changed

Lines changed: 33 additions & 6 deletions

File tree

docs/content/guides/github-app-authentication.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,30 @@ jobs:
3333
The root reusable workflow forwards these two values to the Plan, Build-Module, and Publish-Module reusable jobs.
3434
Do not use `secrets: inherit` as a substitute for this mapping.
3535

36-
For Dependabot pull requests, create `SHELLY_CLIENT_ID` and `SHELLY_PRIVATE_KEY` as Dependabot secrets as well as
37-
Actions secrets. Dependabot-triggered workflows cannot read regular Actions secrets, so the GitHub App token cannot
38-
be minted without separate Dependabot secret values.
36+
Dependabot-triggered workflows cannot read regular Actions secrets. Do not duplicate Shelly's private key into
37+
Dependabot secrets by default: a compromised dependency update could alter workflow code that receives the key before
38+
human review. If an organization requires the Process-PSModule workflow to run on Dependabot pull requests, its
39+
security owners must explicitly accept that trust boundary and provision separate Dependabot secrets. Otherwise,
40+
skip token-consuming jobs for Dependabot pull requests and run the full workflow after review or merge.
3941

40-
## Token scope
42+
## GitHub App installation permissions
43+
44+
Install Shelly only on repositories that the process must manage. The complete permission baseline for the current
45+
Process-PSModule GitHub App path is:
46+
47+
| Repository permission | Access | Why it is needed |
48+
| --- | --- | --- |
49+
| Contents | Write | Read releases during version resolution; create, upload to, and delete releases during publish and cleanup. |
50+
| Pull requests | Write | Read pull-request files and labels; add process and release comments to pull requests. |
51+
| Metadata | Read | Read repository description, topics, and URL while building the module manifest. This permission is granted automatically to GitHub Apps. |
52+
53+
Do not grant Shelly Actions, Issues, Statuses, Pages, Workflows, or administration permissions for the current
54+
Process-PSModule GitHub App path. Those permissions are not used by installation tokens minted here.
55+
56+
The caller workflow's `permissions:` block is separate: it scopes only `github.token` for non-App operations such as
57+
artifact handling, linting, and Pages deployment. It cannot expand or restrict Shelly's installation token.
58+
59+
## Per-workflow token scope
4160

4261
Each job mints its own token with the repository that triggered the workflow:
4362
`${{ github.event.repository.name }}`.

docs/content/reference/workflow-inputs.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ credentials that are exposed. `secrets: inherit` is intentionally not required.
3535

3636
See [passing test data](../guides/calling-the-workflow.md#passing-test-data) for how to build the `TestData` value.
3737

38-
## Permissions
38+
## Workflow `github.token` permissions
3939

40-
The following permissions are needed for the workflow to be able to perform all tasks.
40+
The following permissions are needed by the caller workflow's default `github.token` for operations that do not use
41+
Shelly, such as linting and GitHub Pages deployment:
4142

4243
```yaml
4344
permissions:
@@ -49,3 +50,10 @@ permissions:
4950
```
5051
5152
For more info, see [Deploy GitHub Pages site](https://github.com/marketplace/actions/deploy-github-pages-site).
53+
54+
## GitHub App permissions
55+
56+
The `permissions:` block above does not apply to Shelly's installation tokens. Shelly needs only the repository
57+
permissions documented in [GitHub App authentication](../guides/github-app-authentication.md#github-app-installation-permissions):
58+
Contents: write, Pull requests: write, and automatically granted Metadata: read. Each job requests a smaller,
59+
repository-scoped subset when it mints its token.

0 commit comments

Comments
 (0)