Skip to content

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

Draft
rnckp wants to merge 1 commit into
mainfrom
alert-autofix-2
Draft

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#5
rnckp wants to merge 1 commit into
mainfrom
alert-autofix-2

Conversation

@rnckp

@rnckp rnckp commented May 31, 2026

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/machinelearningZH/semantic-search-eval/security/code-scanning/2

Add an explicit permissions block to .github/workflows/test.yml so GITHUB_TOKEN is least-privileged.
Best fix here: define permissions at the workflow root (applies to all jobs unless overridden), using:

  • contents: read

This workflow only checks out code and runs Python tests, so contents: read is the minimal required permission and should not change behavior.

Change region: near the top of .github/workflows/test.yml, directly after name: Test and before on:.

No new imports, methods, or dependencies 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>
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