Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#315

Merged
JavierMatosD merged 2 commits into
mainfrom
alert-autofix-1
Jun 6, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#315
JavierMatosD merged 2 commits into
mainfrom
alert-autofix-1

Conversation

@BillyONeal

Copy link
Copy Markdown
Member

Potential fix for https://github.com/vcpkg/vcpkg.github.io/security/code-scanning/1

To fix the issue, we will add a permissions block at the root level of the workflow file. This block will explicitly set the permissions to the minimum required for the workflow to function. Based on the workflow's steps, it only needs to read the repository contents to validate the website and check for differences. Therefore, we will set contents: read as the permission.


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

BillyONeal and others added 2 commits June 6, 2025 11:16
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@BillyONeal BillyONeal requested a review from Copilot June 6, 2025 18:20

Copilot AI left a comment

Copy link
Copy Markdown

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 addresses a code scanning alert by explicitly setting minimal workflow permissions to contents: read and cleans up an unrelated env block.

  • Add a top-level permissions block with contents: read
  • Remove stray env: Codeql.Enabled: true lines no longer applicable

@BillyONeal BillyONeal marked this pull request as ready for review June 6, 2025 18:21
@JavierMatosD JavierMatosD merged commit b3e1c59 into main Jun 6, 2025
1 check passed
@BillyONeal BillyONeal deleted the alert-autofix-1 branch June 6, 2025 22:22
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.

4 participants