Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions #16813

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sebastiaanspeck
Copy link
Member

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

To fix the issue, add a permissions block at the root level of the workflow file. This block will explicitly limit the permissions of the GITHUB_TOKEN to contents: read, which is sufficient for the workflow's operations. The change should be made at the top of the file, immediately after the name field, to apply the permissions to 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>
@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

@kbdharun kbdharun left a comment

Choose a reason for hiding this comment

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

LGTM, but we need to check if PR annotations of spelling errors (in files changed tab) work fine after merging this PR.

@sebastiaanspeck
Copy link
Member Author

I can demonstrate it by creating a typo right?

@github-actions github-actions bot added the page edit Changes to an existing page(s). label Jun 16, 2025
@sebastiaanspeck
Copy link
Member Author

https://github.com/tldr-pages/tldr/pull/16813/files#annotation_35715843155 - not the one I expected but it’s okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
page edit Changes to an existing page(s). tooling Helper tools, scripts and automated processes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants