Skip to content

Conversation

@SachaMorard
Copy link
Member

Potential fix for https://github.com/edgee-cloud/segment-component/security/code-scanning/1

In general, fix this by explicitly setting a permissions block to limit the GITHUB_TOKEN to the minimum required scopes. You can do this at the workflow level (applies to all jobs that don’t override it) or per job.

For this workflow, the simplest change without altering behavior is:

  • Add a workflow-level permissions block near the top, setting contents: read as a default for all jobs.
  • Keep the existing per-job permissions blocks for clippy and coverage so they continue to have the access they need (checks: write for clippy, contents: read for coverage).

This directly addresses the CodeQL finding for the check job (and also secures fmt, build, and test) by ensuring they all use contents: read rather than inheriting potentially broader defaults. No additional imports, methods, or definitions are needed, since this is only a YAML configuration change in .github/workflows/check.yml.

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>
@SachaMorard SachaMorard marked this pull request as ready for review January 2, 2026 10:31
@SachaMorard SachaMorard merged commit 017c5b2 into main Jan 2, 2026
9 checks passed
@SachaMorard SachaMorard deleted the alert-autofix-1 branch January 2, 2026 10:32
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20655974145

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.952%

Totals Coverage Status
Change from base Build 20655812122: 0.0%
Covered Lines: 661
Relevant Lines: 668

💛 - Coveralls

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.

3 participants