Skip to content

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

Merged
lifeofguenter merged 1 commit into
mainfrom
alert-autofix-2
May 20, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#11
lifeofguenter merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@lifeofguenter
Copy link
Copy Markdown
Member

Potential fix for https://github.com/DigitalTolk/ex-mobile/security/code-scanning/2

Add an explicit permissions block to the workflow so GITHUB_TOKEN is least-privileged by default.
Best fix here: add workflow-level permissions immediately under on: (or under name:) with contents: read, which is the minimal required scope for checkout and typical CI reads. This preserves existing behavior while ensuring token scope cannot silently become broader due to org/repo default changes.

File to change: .github/workflows/lint-test.yml
Change: insert:

permissions:
  contents: read

No imports, methods, or new definitions 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>
Signed-off-by: Günter Grodotzki <gunter@grodotzki.com>
@lifeofguenter lifeofguenter marked this pull request as ready for review May 20, 2026 11:11
@lifeofguenter lifeofguenter merged commit 8cd3766 into main May 20, 2026
12 checks passed
@lifeofguenter lifeofguenter deleted the alert-autofix-2 branch May 20, 2026 11:11
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