Skip to content

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

Merged
ajbtech merged 1 commit into
mainfrom
alert-autofix-2
Sep 19, 2026
Merged

ajbtech merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@ajbtech

@ajbtech ajbtech commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/ajbtech/EQ-XP-Calculator/security/code-scanning/2

Add an explicit permissions block to .github/workflows/test.yml to enforce least privilege for GITHUB_TOKEN.
Best fix without changing behavior: define workflow-level permissions as:

  • contents: read

This is sufficient for actions/checkout and typical read-only CI steps, and it applies to all jobs unless overridden. Place it at the top level (after on: or before jobs:) so future jobs inherit safe defaults automatically. No new imports, methods, or dependencies are needed.

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>
@ajbtech
ajbtech marked this pull request as ready for review September 19, 2026 02:50
@ajbtech
ajbtech merged commit fe2535a into main Sep 19, 2026
5 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