Skip to content

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

Draft
johnteee wants to merge 1 commit into
mainfrom
alert-autofix-4
Draft

Potential fix for code scanning alert no. 4: Workflow does not contain permissions#7
johnteee wants to merge 1 commit into
mainfrom
alert-autofix-4

Conversation

@johnteee
Copy link
Copy Markdown
Member

Potential fix for https://github.com/TeaEntityLab/teaAgent/security/code-scanning/4

Add an explicit workflow-level permissions block in .github/workflows/ci.yml so all jobs inherit minimal token access unless overridden.
Best fix without changing behavior: add

permissions:
  contents: read

directly under the on: trigger section (before jobs:). This preserves all current functionality (checkout/build/test/lint/package) while explicitly constraining GITHUB_TOKEN scope.

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>
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