Skip to content

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

Merged
mghibaudi merged 2 commits into
mainfrom
alert-autofix-3
Nov 3, 2025
Merged

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#77
mghibaudi merged 2 commits into
mainfrom
alert-autofix-3

Conversation

@mghibaudi

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/riverlane/QStone/security/code-scanning/3

To fix the issue, we will add a permissions block at the root level of the workflow to define default permissions for all jobs. This ensures that the build job, which currently lacks explicit permissions, will inherit these minimal permissions. The publish job already has its own permissions block, so it will not be affected by the root-level permissions.

The minimal permissions required for the build job are contents: read, as it only needs to read the repository contents to build the distribution. We will add this to the root of the workflow.


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>
@mghibaudi mghibaudi marked this pull request as ready for review November 3, 2025 13:47
@mghibaudi mghibaudi requested a review from Copilot November 3, 2025 13:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds GitHub Actions workflow permissions configuration to restrict the default token permissions for security hardening. The change sets contents: read as an explicit permission, following the principle of least privilege.

Key Changes

  • Added explicit permissions block to limit workflow token access to read-only content access

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/publish.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mghibaudi mghibaudi self-assigned this Nov 3, 2025
@mghibaudi mghibaudi merged commit 807c688 into main Nov 3, 2025
19 checks passed
@mghibaudi mghibaudi deleted the alert-autofix-3 branch November 3, 2025 14:08
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