Skip to content

Conversation

@shreemaan-abhishek
Copy link
Contributor

Description

This PR explicitly defines the permissions block for several GitHub Actions workflows that were previously relying on the default (potentially permissive) settings.

By setting permissions: contents: read (and pull-requests: read where necessary), we ensure that the GITHUB_TOKEN used in these workflows follows the principle of least privilege. this acts as a security measure to limit the impact of a compromised workflow step.

With a compromised github token, a bad actor can:

  • Push malicious code directly to the master branch.
  • Create or delete releases and tags.
  • Modify repository settings or secrets (if applicable).

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

Signed-off-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. github_actions Pull requests that update GitHub Actions code labels Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants