Skip to content

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

Merged
rapatao merged 1 commit into
mainfrom
alert-autofix-1
May 31, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#47
rapatao merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@rapatao

@rapatao rapatao commented May 31, 2026

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/rapatao/ruleset-engine/security/code-scanning/1

Add an explicit permissions block with least privilege to the workflow.
Best fix here: set workflow-level permissions to:

permissions:
  contents: read

This is the minimal documented baseline and is sufficient for actions/checkout in a typical publish workflow that does not write back to the repo. It preserves existing behavior while constraining GITHUB_TOKEN scope.

Change location: .github/workflows/publish.yaml, directly under on: block (before jobs:), so it applies to all jobs unless overridden.

No imports, methods, or additional definitions are required.

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>
@rapatao rapatao marked this pull request as ready for review May 31, 2026 10:25
@rapatao rapatao merged commit 5247094 into main May 31, 2026
4 checks passed
@rapatao rapatao deleted the alert-autofix-1 branch May 31, 2026 10:26
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