Skip to content

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

Merged
andreas-valtech merged 1 commit into
mainfrom
alert-autofix-1
Jul 4, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#1
andreas-valtech merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@andreas-valtech
Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/valtech/OptimizelyTestContainers/security/code-scanning/1

To fix the issue, we need to add a permissions block to the workflow. This block should specify the least privileges required for the workflow to function correctly. Since the workflow performs build and test operations, it likely only needs read access to the repository contents. We will add the following permissions block at the root of the workflow:

permissions:
  contents: read

This ensures that the workflow has read-only access to the repository contents, adhering to the principle of least privilege.

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>
@andreas-valtech andreas-valtech self-assigned this Jul 4, 2025
@andreas-valtech andreas-valtech marked this pull request as ready for review July 4, 2025 08:47
@andreas-valtech andreas-valtech merged commit 406eae4 into main Jul 4, 2025
4 checks passed
@andreas-valtech andreas-valtech deleted the alert-autofix-1 branch July 7, 2025 09:59
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.

1 participant