Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions #16811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

sebastiaanspeck
Copy link
Member

Potential fix for https://github.com/tldr-pages/tldr/security/code-scanning/2

To fix the issue, we will add a permissions block at the root of the workflow to define the minimal permissions required. Based on the workflow's operations, the following permissions are necessary:

  • contents: read for accessing repository files.
  • issues: write for creating and updating issues.
  • pull-requests: read for reading pull request data (if applicable).
  • actions: read for interacting with GitHub Actions artifacts (if needed).

The permissions block will be added at the top level of the workflow, ensuring it applies to all jobs unless overridden by job-specific permissions.


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>
@sebastiaanspeck sebastiaanspeck marked this pull request as ready for review June 10, 2025 04:18
@github-actions github-actions bot added the tooling Helper tools, scripts and automated processes. label Jun 10, 2025
Copy link
Member

@spageektti spageektti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tested if this or the other PR fixes the issue?

@sebastiaanspeck
Copy link
Member Author

Yes

@sebastiaanspeck sebastiaanspeck merged commit c5915dd into main Jun 16, 2025
10 checks passed
@sebastiaanspeck sebastiaanspeck deleted the alert-autofix-2 branch June 16, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Helper tools, scripts and automated processes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants