InnerSourcePatterns icon indicating copy to clipboard operation
InnerSourcePatterns copied to clipboard

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

Open lenucksi opened this issue 2 weeks ago • 0 comments

Potential fix for https://github.com/InnerSourceCommons/InnerSourcePatterns/security/code-scanning/9

To fix this problem, add an explicit permissions block as recommended to the workflow (either at the root level for all jobs, or at the job level for just this job). Since the workflow only needs to read repository contents (it does not create issues, pull requests, releases, or modify anything), grant only contents: read permission. The best way is to add this block just before jobs: at the top level of the YAML file, so every job inherits it (and it is easy to edit later if needed). No new imports or complex configuration is required.


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

lenucksi avatar Nov 25 '25 14:11 lenucksi