Skip to content

Conversation

@thread-koder
Copy link
Contributor

No description provided.

@thread-koder thread-koder self-assigned this Dec 16, 2025
Comment on lines 9 to 24
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Schedule Milestones
uses: readmeio/scheduled-milestones@v1.1.1
id: scheduled
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: 'S-'
days: Thursday
count: 4
format: YYYY-MM-DD

- name: Created Milestones
run: echo ${{ steps.scheduled.outputs.milestones }}

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 21 days ago

To fix the issue, you must add a permissions block to the workflow. Since the root of the workflow (.github/workflows/schedule-milestones.yaml) currently has no permissions declaration, you should add it at the top level (right after the name: field, before on:). The strictest safe default is contents: read, unless the action requires more (e.g., issues: write or milestones: write). Based on the action’s apparent behavior (creating/managing milestones), you may want to include issues: write explicitly if that is required. However, as a minimal starting point and as per the CodeQL suggestion, default to contents: read – update as needed if the action fails due to insufficient scopes.

Add after the name: schedule-milestones line:

permissions:
  contents: read

No imports, definitions, or extra methods are needed in a YAML workflow file.


Suggested changeset 1
.github/workflows/schedule-milestones.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/schedule-milestones.yaml b/.github/workflows/schedule-milestones.yaml
--- a/.github/workflows/schedule-milestones.yaml
+++ b/.github/workflows/schedule-milestones.yaml
@@ -1,4 +1,6 @@
 name: schedule-milestones
+permissions:
+  contents: read
 
 on:
   schedule:
EOF
@@ -1,4 +1,6 @@
name: schedule-milestones
permissions:
contents: read

on:
schedule:
Copilot is powered by AI and may make mistakes. Always verify output.
Signed-off-by: Mohamad Berjawi <mohamad.fberjawi@gmail.com>
@thread-koder thread-koder merged commit 3749eaa into main Dec 16, 2025
2 of 3 checks passed
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.

4 participants