Skip to content

Potential fix for code scanning alert no. 3: Workflow does not contain permissions - #52

Merged
sirdeggen merged 1 commit into
masterfrom
alert-autofix-3
Jun 17, 2026
Merged

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#52
sirdeggen merged 1 commit into
masterfrom
alert-autofix-3

Conversation

@oskarszoon

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/bsv-blockchain/bsv-desktop/security/code-scanning/3

Add an explicit permissions block in .github/workflows/push.yaml at the workflow root level (top-level keys), so it applies to all jobs unless overridden. For this workflow, the minimal required permission is:

  • contents: read

This preserves current functionality (actions/checkout, dependency install, lint, tests) while enforcing least privilege for GITHUB_TOKEN.

Concretely, insert the block directly after name (or after on) near the top of the file:

permissions:
  contents: read

No imports, methods, or additional definitions are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@oskarszoon
oskarszoon marked this pull request as ready for review June 17, 2026 15:10
@oskarszoon
oskarszoon requested a review from sirdeggen June 17, 2026 15:10
@sirdeggen
sirdeggen merged commit 1219233 into master Jun 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants