Skip to content

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

Merged
forketyfork merged 1 commit intomainfrom
forketyfork/fix-workflow-permissions
Jul 21, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#21
forketyfork merged 1 commit intomainfrom
forketyfork/fix-workflow-permissions

Conversation

@forketyfork
Copy link
Owner

Potential fix for https://github.com/forketyfork/obsidian-food-tracker/security/code-scanning/1

To address the issue, we will explicitly define permissions for the workflow at the root level. Since the workflow only reads from the repository (e.g., checking out code with actions/checkout), it requires only contents: read permissions. These permissions will be sufficient for the tasks outlined in the workflow while adhering to the principle of least privilege. We will add the permissions key at the root level of the workflow.

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

…n permissions

Altered the permissions for the workflow to read-only.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@forketyfork forketyfork marked this pull request as ready for review July 21, 2025 07:32
@forketyfork forketyfork merged commit 069f525 into main Jul 21, 2025
4 checks passed
@forketyfork forketyfork deleted the forketyfork/fix-workflow-permissions branch July 21, 2025 07:33
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