Skip to content

Add explicit permission - #59

Merged
rthellend merged 1 commit into
mainfrom
alert-autofix-1
Aug 20, 2026
Merged

Add explicit permission#59
rthellend merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@rthellend

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/c2FmZQ/sshterm/security/code-scanning/1

Add an explicit permissions block to the workflow so all jobs inherit least-privilege token access.
Best fix here: add at workflow root (near name / on) with:

  • contents: read

This preserves existing functionality (actions/checkout and read-only build/test actions continue to work) while preventing unintended write scopes if defaults are permissive.
Only .github/workflows/pr.yml needs editing; no imports, methods, or external definitions are needed.

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@rthellend rthellend changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions Add explicit permission Aug 20, 2026
@rthellend
rthellend marked this pull request as ready for review August 20, 2026 16:12
@rthellend
rthellend merged commit 6007151 into main Aug 20, 2026
5 checks passed
@rthellend
rthellend deleted the alert-autofix-1 branch August 20, 2026 16:13
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.

1 participant