Skip to content

Conversation

@jeffpatton1971
Copy link
Contributor

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

To fix this problem, we need to add a permissions block limiting the workflow's access to the least necessary. Since the workflow only requires reading the contents of the repository (for actions/checkout), and no steps involve writing pull requests, issues, etc., we can safely restrict permissions to contents: read. The best practice is to place the permissions block at the workflow root (top level), just after the name: and before on:, so it applies to all jobs in the workflow unless individually overridden. No other methods, imports, or code definitions are required.


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