Skip to content

Conversation

@lenucksi
Copy link
Member

Potential fix for https://github.com/InnerSourceCommons/InnerSourcePatterns/security/code-scanning/5

To fix the problem, we should add a permissions block to the workflow file .github/workflows/book.yml. The block should be added at the workflow root (top-level, after name: and before jobs:), so the permissions apply to all jobs in the workflow. The least privilege required is contents: write so the job can push changes to the repo (required by the auto-commit step). Other permissions (such as pull-requests: write) are not required for this workflow, as it does not modify pull requests or other resources. The block should be added after the workflow name: and before the jobs: key (best practice is before any uses of the jobs).

No imports or additional methods/definitions are needed; it's a change to the workflow configuration only.

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