Skip to content

Conversation

@ervcz
Copy link
Collaborator

@ervcz ervcz commented Oct 8, 2025

Potential fix for https://github.com/flatcar/nebraska/security/code-scanning/59

To resolve the problem, add an explicit permissions block to restrict the permissions granted to the GITHUB_TOKEN during workflow execution. The best practice is to assign the least privileges necessary. For workflows that only need to check out code and build/test, setting contents: read at the workflow root or job level is sufficient.

Since there is only one job, it's most effective to add permissions: contents: read at the root level (directly after name: or after on:), which will apply to all jobs by default.

Edit needed:

  • In .github/workflows/backend.yml, add
    permissions:
      contents: read
    after the name and before the on block (line 2).

No other imports, methods, or definitions are required.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Ervin Rácz <[email protected]>
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