Skip to content

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

Merged
sjentoft merged 1 commit intomasterfrom
alert-autofix-2
Dec 16, 2025
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#60
sjentoft merged 1 commit intomasterfrom
alert-autofix-2

Conversation

@sjentoft
Copy link
Collaborator

Potential fix for https://github.com/statisticsnorway/ssb-metodebiblioteket/security/code-scanning/2

To fix this issue, add a permissions block specifying the minimum required permissions for the GITHUB_TOKEN. Since the job only needs to perform read operations, set permissions: contents: read at the root level, making it apply to all jobs unless overridden. This change should be inserted near the top of the .github/workflows/R-CMD-check.yaml file, directly below the name key and above the jobs block. No imports or additional dependencies are needed for this change.

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>
@sjentoft sjentoft marked this pull request as ready for review December 16, 2025 11:59
@sjentoft sjentoft merged commit 7268f62 into master Dec 16, 2025
8 checks passed
@sjentoft sjentoft deleted the alert-autofix-2 branch December 16, 2025 11: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