Skip to content

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

Merged
keroxp merged 1 commit intomainfrom
alert-autofix-1
Jan 6, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#55
keroxp merged 1 commit intomainfrom
alert-autofix-1

Conversation

@keroxp
Copy link
Member

@keroxp keroxp commented Jan 6, 2026

Potential fix for https://github.com/loilo-inc/exql/security/code-scanning/1

In general, the fix is to explicitly declare a permissions: block for the workflow or specific jobs so that the GITHUB_TOKEN has only the minimal rights required. For this workflow, all steps only need to read repository contents and use external services via their own tokens, so we can safely restrict GITHUB_TOKEN to contents: read.

The best low‑impact fix is to add a top‑level permissions: block (applies to all jobs) right after name: CI and before on:. This avoids changing any job behavior and doesn’t require editing individual steps. We don’t need any additional imports or changes to steps, and we do not need to alter how GITHUB_TOKEN is referenced in env. The exact change is in .github/workflows/push.yml, lines 1–3: keep the existing keys and insert a permissions: section with contents: read between name: and on:.

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>
@keroxp keroxp marked this pull request as ready for review January 6, 2026 10:58
@keroxp keroxp merged commit 5f04f80 into main Jan 6, 2026
4 checks passed
@keroxp keroxp deleted the alert-autofix-1 branch January 6, 2026 10:59
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