Skip to content

Conversation

@rkttu
Copy link
Member

@rkttu rkttu commented Dec 28, 2025

Potential fix for https://github.com/yourtablecloth/TableCloth/security/code-scanning/6

In general, the fix is to define explicit GITHUB_TOKEN permissions at the workflow or job level, granting only the scopes needed. Since this workflow strictly reads repository contents (via actions/checkout) and does local builds/tests, the minimal required permission is contents: read. There is no indication that it needs to write to contents, issues, pull requests, or other resources.

The single best fix, without changing functionality, is to add a root-level permissions: block just under the workflow name: (or under on:), applying to all jobs that do not override it. This should specify contents: read. No job-specific override seems necessary, as neither validate-version nor build needs write access. Concretely, in .github/workflows/build.yml, insert:

permissions:
  contents: read

between the existing name: TableCloth Build Pipeline and the on: block. No other imports, methods, or definitions are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

rkttu and others added 2 commits December 29, 2025 01:03
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Jung Hyun Nam <rkttu@rkttu.com>
@rkttu rkttu marked this pull request as ready for review December 29, 2025 02:12
@rkttu rkttu self-assigned this Dec 29, 2025
@rkttu rkttu merged commit 56f7ce7 into main Dec 29, 2025
9 checks passed
@rkttu rkttu deleted the alert-autofix-6 branch December 29, 2025 02:18
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.

2 participants