Skip to content
Open
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
20 changes: 20 additions & 0 deletions .github/workflows/trigger-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Trigger sync

description:
'Trigger external sync workflow.'

on:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Trigger sync
shell: sh
run: |
echo "Sync signal sent!"

Comment on lines +14 to +20

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: {}

Copilot Autofix

AI 7 days ago

The best way to fix this problem is to explicitly add a permissions key to the workflow, either at the root or for the specific job. Since this workflow appears to only run a shell that echoes a message and does not interact with the repository in any way, it is safe and desirable to set the permissions to the minimal possible setting, which is contents: read. This can be set at the workflow root, applying to all jobs. The change involves inserting the following block near the top level of the YAML file, immediately after the name and description blocks, and before on::

permissions:
  contents: read

No imports or other definitions are required. The only required action is to update the YAML file to add this configuration block.

Suggested changeset 1
.github/workflows/trigger-sync.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/trigger-sync.yml b/.github/workflows/trigger-sync.yml
--- a/.github/workflows/trigger-sync.yml
+++ b/.github/workflows/trigger-sync.yml
@@ -3,6 +3,9 @@
 description:
     'Trigger external sync workflow.'
 
+permissions:
+    contents: read
+
 on:
     workflow_dispatch:
     pull_request:
EOF
@@ -3,6 +3,9 @@
description:
'Trigger external sync workflow.'

permissions:
contents: read

on:
workflow_dispatch:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.