Skip to content

[Security] Multiple workflows — No permissions block, inheriting default read-write token scope #589

@Christophe-Rogiers

Description

@Christophe-Rogiers

Severity: Warning

Files: publish.yml, test.yml, build.yml, dotnet-reflection.yml, winget.yml

Description:
These workflows have no permissions: key, meaning they inherit the repository's default GITHUB_TOKEN permissions (typically read/write on contents). Per SLSA/OSSF best practice, all workflows should declare minimal permissions and elevate only where needed.

Suggested fix:
Add permissions: contents: read at the workflow level and grant additional scopes per-job only where required (e.g., contents: write for push-back jobs).

Metadata

Metadata

Assignees

Labels

ciCI/CD

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions