Skip to content

Conversation

@ulrihaa
Copy link
Contributor

@ulrihaa ulrihaa commented Dec 9, 2025

The ubuntu-20.04 label has been deprecated and is no longer supported. Proof -
https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories

What this PR does?
Switch runner to ubuntu-22.04

How was it tested?

Comment on lines 25 to 56

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium test

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 23 days ago

To fix the problem, the workflow should explicitly set the minimum required permissions for the GITHUB_TOKEN used by the workflow. The recommended approach is to add a permissions: { contents: read } block, which grants the workflow read-only access to the repository contents—sufficient for fetching code and not for performing any write operations. Since the workflow only performs actions like checkout, setup, tidying, building, linting, and testing, and does not push changes or interact with pull requests/write APIs, contents: read is the minimum necessary. The permissions key can be placed at the top level of the workflow, so it applies to all jobs in the workflow. The block should be added after the name: or on: key on line 16 or 22.

Suggested changeset 1
.github/workflows/test.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -14,6 +14,9 @@
 
 name: Run tests
 
+permissions:
+  contents: read
+
 on:
   pull_request: {}
   push:
EOF
@@ -14,6 +14,9 @@

name: Run tests

permissions:
contents: read

on:
pull_request: {}
push:
Copilot is powered by AI and may make mistakes. Always verify output.
@ulrihaa ulrihaa requested a review from matancev December 9, 2025 16:06
@matancev matancev merged commit 6b47bcc into master Dec 12, 2025
4 checks passed
ulrihaa added a commit that referenced this pull request Dec 12, 2025
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