Skip to content

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

Merged
danmarshall merged 1 commit into
mainfrom
alert-autofix-25
Jul 25, 2025
Merged

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

Conversation

@danmarshall

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/microsoft/chartifact/security/code-scanning/25

To fix the issue, add a permissions block to the workflow file. Since the workflow primarily interacts with repository contents (e.g., checking out code), the contents: read permission is sufficient. This ensures the workflow adheres to the principle of least privilege while maintaining its functionality.

The permissions block should be added at the root level of the workflow file, applying to all jobs in the workflow. No additional dependencies or changes to the workflow steps are required.


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

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@danmarshall
danmarshall marked this pull request as ready for review July 25, 2025 01:02
@danmarshall
danmarshall merged commit 0132dc6 into main Jul 25, 2025
5 checks passed
@danmarshall
danmarshall deleted the alert-autofix-25 branch July 25, 2025 01:02
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