Skip to content

Potential fix for code scanning alert no. 37: Workflow does not contain permissions#1482

Closed
rocketstack-matt wants to merge 1 commit intomainfrom
alert-autofix-37
Closed

Potential fix for code scanning alert no. 37: Workflow does not contain permissions#1482
rocketstack-matt wants to merge 1 commit intomainfrom
alert-autofix-37

Conversation

@rocketstack-matt
Copy link
Member

Potential fix for https://github.com/finos/architecture-as-code/security/code-scanning/37

To fix the problem, add a permissions block to the workflow or the specific job to explicitly set the minimal required permissions for the GITHUB_TOKEN. In this case, the workflow only needs to check out code and interact with AWS (using secrets), but does not need to write to the repository or interact with issues, pull requests, or other resources. Therefore, setting contents: read is sufficient and recommended. The best place to add this is at the top level of the workflow file, just after the name field, so it applies to all jobs in the workflow. No additional imports or definitions are needed.


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>
@rocketstack-matt rocketstack-matt marked this pull request as ready for review August 6, 2025 11:41
Copilot AI review requested due to automatic review settings August 6, 2025 11:41
@rocketstack-matt rocketstack-matt requested a review from a team as a code owner August 6, 2025 11:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a code scanning security alert by adding explicit permissions to the GitHub workflow. The change sets minimal required permissions for the GITHUB_TOKEN to follow security best practices.

  • Adds permissions block with contents: read to restrict GITHUB_TOKEN permissions
  • Follows the principle of least privilege for workflow security

@rocketstack-matt rocketstack-matt deleted the alert-autofix-37 branch August 6, 2025 14: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.

2 participants