Skip to content

Conversation

@arpadbarta
Copy link
Collaborator

Potential fix for https://github.com/PlainBytes/PlainBytes.LiteDB/security/code-scanning/4

To resolve this issue in the safest and least-intrusive manner, you should add a top-level permissions block near the top of the workflow file (.github/workflows/publish.yml). This will apply minimal permissions (usually contents: read) to all jobs, unless a specific job needs broader permissions for a legitimate reason (e.g. to create releases or PRs). Since none of the jobs shown require actions such as creating releases or writing to the repo (NuGet publishing uses a secret), it is appropriate to set:

permissions:
  contents: read

If later some jobs require more, you can override at the job level, but this is not currently indicated in the code you provided. This block should be placed immediately after the name: line and before any on: or other sections.

Files/regions/lines to change:

  • Edit file: .github/workflows/publish.yml
  • Insert the recommended permissions block after the name: line (line 3).

No new methods, imports, or 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>
@arpadbarta arpadbarta marked this pull request as ready for review November 25, 2025 20:32
@arpadbarta arpadbarta merged commit 20b9e33 into master Nov 25, 2025
7 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.

2 participants