Skip to content

Potential fix for code scanning alert no. 6: Workflow does not contain permissions#7

Merged
eywalker merged 1 commit into
mainfrom
alert-autofix-6
Jun 20, 2026
Merged

Potential fix for code scanning alert no. 6: Workflow does not contain permissions#7
eywalker merged 1 commit into
mainfrom
alert-autofix-6

Conversation

@eywalker

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/nauticalab/starfix-python/security/code-scanning/6

Add an explicit permissions block at the workflow root in .github/workflows/ci.yml so all jobs inherit restricted token scope by default.

Best single fix without changing behavior:

  • Insert at top-level (after on: block, before jobs:):
    • permissions:
    • contents: read

Why this is best here:

  • All shown jobs can operate with read access to repository contents.
  • It satisfies CodeQL’s minimum recommendation and documents intended token scope.
  • It avoids unnecessary per-job duplication while keeping behavior unchanged.

No imports, methods, or dependency additions are needed (YAML workflow only).

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>
@eywalker eywalker marked this pull request as ready for review June 20, 2026 01:53
@eywalker eywalker merged commit 099c71c into main Jun 20, 2026
8 checks passed
@eywalker eywalker deleted the alert-autofix-6 branch June 20, 2026 01:57
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