Skip to content

Conversation

@teolemon
Copy link
Member

@teolemon teolemon commented Nov 4, 2025

Potential fix for https://github.com/openfoodfacts/openfoodfacts-web/security/code-scanning/28

To address this, add a permissions block to the workflow, ensuring that the minimal required GitHub token permissions are set. Since the Crowdin action opens pull requests, we need pull-requests: write and, since it interacts with repository contents, contents: read. From best practices, it's recommended to add permissions at the workflow root to cover all jobs unless specific jobs need elevating. Insert the following block after the name: line (before on:):

permissions:
  contents: read
  pull-requests: write

No imports, methods, or further definitions are necessary. The relevant code region to change is before the on: key.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

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

Projects

Status: To Discuss & Validate

Development

Successfully merging this pull request may close these issues.

2 participants