Skip to content

Default GHA permissions to contents: read#148346

Open
hugovk wants to merge 1 commit intopython:mainfrom
hugovk:3.15-gha-contents-read
Open

Default GHA permissions to contents: read#148346
hugovk wants to merge 1 commit intopython:mainfrom
hugovk:3.15-gha-contents-read

Conversation

@hugovk
Copy link
Copy Markdown
Member

@hugovk hugovk commented Apr 10, 2026

Follow on from #148114, so GitHub Actions can run in private forks:

#148114 (comment)

@hugovk hugovk added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 10, 2026
@hugovk hugovk added skip issue skip news infra CI, GitHub Actions, buildbots, Dependabot, etc. labels Apr 10, 2026
@hugovk
Copy link
Copy Markdown
Member Author

hugovk commented Apr 10, 2026

build.yml failed in my fork:

Invalid workflow file: .github/workflows/build.yml#L608 The workflow is not valid. .github/workflows/build.yml (Line: 608, Col: 3): Error calling workflow 'hugovk/cpython/.github/workflows/reusable-cifuzz.yml@a959dde4ca2a991f711a79b2c94f0cf2bf127b0a'. The workflow is requesting 'contents: read', but is only allowed 'contents: none'.

https://github.com/hugovk/cpython/actions/runs/24252340106

I think this will pass when merged, because it won't have the mismatch between main and the branch?

@webknjaz
Copy link
Copy Markdown
Member

@hugovk you may want to adjust line 616

@hugovk
Copy link
Copy Markdown
Member Author

hugovk commented Apr 10, 2026

@webknjaz
Copy link
Copy Markdown
Member

Yep, add contents: read there. The calling workflow sets contents: none but the reusable one wants higher privileges, which is what that error is about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge infra CI, GitHub Actions, buildbots, Dependabot, etc. needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants