Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,17 @@
with:
linters: mypy
run: uv run mypy --show-column-numbers .

ty:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
version: "0.6.x"
- name: Install dependencies
run: |
uv sync --locked
- run: uvx ty check robot.py
Comment on lines +68 to +79

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

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 8 months ago

To fix the issue, we need to explicitly define the permissions for the ty job in the workflow file. Since the job only performs read operations (e.g., checking out the repository and running type checks), the minimal required permission is contents: read. This ensures that the job has only the necessary access to complete its tasks.

The changes will involve adding a permissions block to the ty job, specifying contents: read.


Suggested changeset 1
.github/workflows/ci.yml

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/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -69,2 +69,4 @@
     timeout-minutes: 5
+    permissions:
+      contents: read
 
EOF
@@ -69,2 +69,4 @@
timeout-minutes: 5
permissions:
contents: read

Copilot is powered by AI and may make mistakes. Always verify output.
Loading