Skip to content

Conversation

@thorsten
Copy link
Member

Potential fix for https://github.com/phpMyFAQ/www.phpmyfaq.de/security/code-scanning/2

To fix the problem, add a permissions block to the workflow, specifying the minimal permissions required for the job. The least privilege for most CI test jobs is contents: read, which allows steps such as checkout and does not allow the workflow to modify the repo. The Codecov upload already uses an external token, so no extra permissions are needed for that. Add the following block before jobs: (at the workflow root):

permissions:
  contents: read

This limits GITHUB_TOKEN to read-only access to repository contents for all jobs in the workflow.

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>
@thorsten thorsten marked this pull request as ready for review October 10, 2025 16:29
@thorsten thorsten merged commit 421496d into main Oct 11, 2025
4 of 5 checks passed
@thorsten thorsten deleted the alert-autofix-2 branch October 11, 2025 13:55
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