Skip to content

Conversation

@icemac
Copy link
Member

@icemac icemac commented Jan 22, 2026

Potential fix for https://github.com/zopefoundation/groktoolkit/security/code-scanning/2

To fix the problem, explicitly define the minimal required GITHUB_TOKEN permissions for this workflow. Since the job only checks out code and commits changes to files in the repository, it needs repository contents write access, but does not require broader scopes such as actions, issues, or pull-requests.

The best fix without changing existing functionality is to add a permissions block at the workflow root (so it applies to all jobs) with contents: write. Place this block after the on: section and before concurrency:. This keeps the workflow’s behavior the same (it can still commit via EndBug/add-and-commit@v9) while avoiding reliance on potentially broad repository defaults.

No imports or external libraries are needed; this is a pure YAML configuration change inside .github/workflows/sync.yml.

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>
@icemac icemac marked this pull request as ready for review January 22, 2026 08:48
@icemac icemac enabled auto-merge (squash) January 23, 2026 07:36
@icemac icemac merged commit 20d3ad1 into master Jan 23, 2026
13 checks passed
@icemac icemac deleted the alert-autofix-2 branch January 23, 2026 11:15
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