Skip to content

Conversation

@thpierce
Copy link
Contributor

Potential fix for https://github.com/aws/aws-xray-sdk-java/security/code-scanning/1

To fix this issue, we should add the permissions key at the job or workflow level to explicitly set the minimum required permissions for the workflow. In this case, the workflow creates a GitHub release (for which the contents: write permission is needed) and potentially commits/tags, but there is no evidence it needs further permissions like issues or pull-requests. The best fix is to add:

permissions:
  contents: write

at the root of the workflow (just before or after on:), so that all jobs inherit these minimal permissions unless further permissions are required later. This will ensure the GITHUB_TOKEN used in actions has only the required contents: write scope, in line with GitHub security best practices.

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>
@thpierce thpierce marked this pull request as ready for review October 14, 2025 16:41
@thpierce thpierce requested a review from a team as a code owner October 14, 2025 16:41
@thpierce thpierce merged commit 00e5041 into master Oct 14, 2025
8 checks passed
@thpierce thpierce deleted the alert-autofix-1 branch October 14, 2025 20:18
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