Skip to content

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

Merged
rbenzing merged 1 commit into
mainfrom
alert-autofix-1
Oct 29, 2026
Merged

rbenzing merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@rbenzing

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/rbenzing/LibEmiddle/security/code-scanning/1

Add an explicit root-level permissions block to .github/workflows/dotnet.yml so all jobs default to minimal access (contents: read). Keep the existing job-level override on github-release (contents: write) because that job creates releases and needs write access. This is the safest and cleanest fix: it addresses the CodeQL finding for jobs like build/package without changing workflow logic or step behavior.

File to edit

  • .github/workflows/dotnet.yml

Change to make

  • Insert immediately after the on: trigger block (before jobs:):
    permissions:
      contents: read

No imports/dependencies/methods 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>
@rbenzing
rbenzing marked this pull request as ready for review October 29, 2026 14:18
@rbenzing
rbenzing merged commit 6bd8b9b into main Oct 29, 2026
6 checks passed
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