Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#161

Merged
thpierce merged 1 commit intomainfrom
alert-autofix-1
Oct 14, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#161
thpierce merged 1 commit intomainfrom
alert-autofix-1

Conversation

@thpierce
Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/aws-observability/aws-otel-ruby/security/code-scanning/1

To address the issue, add the permissions block at the root of the workflow YAML file. This permissions block should specify only those permissions necessary for the workflow to function correctly. For a standard CI build-and-test workflow such as this (which does not write to the repository, create releases, or modify issues/pull requests), the required permission is typically contents: read. Add the following block just below the workflow name or above/below the on: block for visibility and convention. No imports or other file changes are necessary; only a single YAML block needs to be added to .github/workflows/pr-build-gems.yml.


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:22
@thpierce thpierce requested a review from a team as a code owner October 14, 2025 16:22
@thpierce thpierce merged commit 37a06b4 into main Oct 14, 2025
5 checks passed
@thpierce thpierce deleted the alert-autofix-1 branch October 14, 2025 20:16
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