stack-action
stack-action copied to clipboard
Potential fix for code scanning alert no. 15: Workflow does not contain permissions
Potential fix for https://github.com/freckle/stack-action/security/code-scanning/15
To fix the issue, we will add a permissions block at the root level of the workflow to apply minimal permissions to all jobs. Based on the workflow's operations, the contents: read permission is sufficient for most jobs. If any job requires additional permissions, we will define a specific permissions block for that job.
- Add a
permissionsblock at the root level of the workflow withcontents: read. - Review each job to determine if additional permissions are required. For example:
- Jobs interacting with pull requests or issues might need
pull-requests: writeorissues: write. - Jobs downloading or uploading artifacts might need
actions: readoractions: write.
- Jobs interacting with pull requests or issues might need
Suggested fixes powered by Copilot Autofix. Review carefully before merging.