Skip to content

Conversation

@dareste
Copy link
Collaborator

@dareste dareste commented Oct 14, 2025

Potential fix for https://github.com/nginx/nginx-supportpkg-for-k8s/security/code-scanning/49

The best way to fix this problem is to explicitly add a permissions block at the top (workflow) level, before jobs:, to restrict the GITHUB_TOKEN to minimal privileges. In most cases where the workflow does not need to write to the repository or PRs, setting permissions: contents: read is considered the least-privilege minimal setting that still allows most basic Actions to function (checkout, etc.). This should be added right after the workflow's name and triggers, and before the jobs: key. No other content 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>
@dareste dareste changed the title Potential fix for code scanning alert no. 49: Workflow does not contain permissions Workflow does not contain permissions Oct 14, 2025
@dareste dareste requested a review from mrajagopal October 14, 2025 11:31
Copy link
Collaborator

@mrajagopal mrajagopal left a comment

Choose a reason for hiding this comment

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

All good.

@dareste dareste marked this pull request as ready for review October 17, 2025 08:18
@dareste dareste merged commit 39e33e7 into main Oct 17, 2025
6 checks passed
@dareste dareste deleted the alert-autofix-49 branch October 17, 2025 08: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.

3 participants