Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jeffpatton1971
Copy link
Contributor

Potential fix for https://github.com/mod-posh/xml2doc/security/code-scanning/2

To fix this, add a permissions key explicitly defining the least privilege permissions needed for this workflow. For this workflow’s tasks (listing releases and posting to external webhooks), minimal GitHub token permissions are required. The only required permission is contents: read to allow the gh release list to function. This should be set at either the workflow root level (applying to all jobs) or on the job itself. The most future-proof and clear fix is to add the following at the top level (after name: and before/after on:) so it applies to all jobs unless otherwise specified:

permissions:
  contents: read

No other changes to steps, jobs, or secrets are needed.


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>
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