Skip to content

Conversation

thpierce
Copy link
Contributor

Potential fix for https://github.com/aws-observability/aws-application-signals-test-framework/security/code-scanning/11

To fix this issue, add a permissions block to the workflow, specifying the least privilege required. Since the workflow includes only read operations (checking out code, running analysis/build steps, and validating jobs), the minimal required permission is contents: read. This means the job and GITHUB_TOKEN will be restricted to read repository contents, preventing accidental or malicious write operations. The best way is to add the following block after the workflow name and before on: in .github/workflows/pr-build.yml:

permissions:
  contents: read

No additional imports, methods, or definitions are required; this is a configuration change in the YAML file. No other code changes 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>
@thpierce thpierce closed this Oct 14, 2025
@thpierce thpierce deleted the alert-autofix-11 branch October 14, 2025 20:14
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.

1 participant