Skip to content

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

Merged
CrazyBoy49z merged 1 commit into
mainfrom
alert-autofix-1
Sep 16, 2026
Merged

CrazyBoy49z merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@CrazyBoy49z

Copy link
Copy Markdown
Member

Potential fix for https://github.com/step2dev/lazy-setting/security/code-scanning/1

Add an explicit permissions block to the workflow so the GITHUB_TOKEN is minimally scoped.
Best fix here: set workflow-level permissions right after on: (or before jobs:) as:

  • contents: read

This preserves existing functionality (checkout and test execution) while documenting and enforcing least privilege for all jobs in this workflow.

File to edit:

  • .github/workflows/run-tests.yml

Change:

  • Insert a root-level permissions: block before jobs:.

No imports, methods, or dependencies are needed.

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>
@CrazyBoy49z
CrazyBoy49z marked this pull request as ready for review September 16, 2026 07:59
@CrazyBoy49z
CrazyBoy49z merged commit f7adb46 into main Sep 16, 2026
3 of 19 checks passed
@CrazyBoy49z
CrazyBoy49z deleted the alert-autofix-1 branch September 16, 2026 08:01
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