Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/crowdin-download-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Crowdin Download Action

on:
workflow_call:
workflow_dispatch:
inputs:
target_branch:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/crowdin-manual-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Crowdin Manual Upload and Download

on:
workflow_dispatch:

jobs:
trigger-upload:
uses: ./.github/workflows/crowdin-upload-workflow.yml

trigger-download:
Comment on lines +8 to +10

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 about 2 months ago

The fix involves specifying a permissions block at either the root of the workflow or for each job (here, setting it at the root is recommended as both jobs are simple triggers of reusable workflows and likely need very few permissions). Ordinarily, workflows that trigger other workflows do not require write permissions; they only need minimal contents: read, unless the downstream workflow needs more. Adding the following block right after the workflow name sets the least-privilege permissions for all jobs in the workflow:

permissions:
  contents: read

This change should be added after the name: field and before the on: block to match typical GitHub Actions conventions.

Suggested changeset 1
.github/workflows/crowdin-manual-workflow.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/crowdin-manual-workflow.yml b/.github/workflows/crowdin-manual-workflow.yml
--- a/.github/workflows/crowdin-manual-workflow.yml
+++ b/.github/workflows/crowdin-manual-workflow.yml
@@ -1,4 +1,6 @@
 name: Crowdin Manual Upload and Download
+permissions:
+  contents: read
 
 on:
   workflow_dispatch:
EOF
@@ -1,4 +1,6 @@
name: Crowdin Manual Upload and Download
permissions:
contents: read

on:
workflow_dispatch:
Copilot is powered by AI and may make mistakes. Always verify output.
needs: [ trigger-upload ]
uses: ./.github/workflows/crowdin-download-workflow.yml
Comment on lines +11 to +12

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 about 2 months ago

The fix is to add a permissions key at the root of your workflow file .github/workflows/crowdin-manual-workflow.yml. Since this workflow primarily coordinates uploads and downloads through reusable workflows, and likely does not itself require write-level repository permissions, you should explicitly set minimal privileges. Unless the workflow directly creates pull requests, pushes changes, or interacts with issues, contents: read is a safe default permission. If later you discover that more granular permission (e.g., pull-requests: write) is necessary for these jobs, you can add it, but starting with a root-level read-only permission is best. Insert the following block under the name line (after line 1).

Suggested changeset 1
.github/workflows/crowdin-manual-workflow.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/crowdin-manual-workflow.yml b/.github/workflows/crowdin-manual-workflow.yml
--- a/.github/workflows/crowdin-manual-workflow.yml
+++ b/.github/workflows/crowdin-manual-workflow.yml
@@ -1,4 +1,6 @@
 name: Crowdin Manual Upload and Download
+permissions:
+  contents: read
 
 on:
   workflow_dispatch:
EOF
@@ -1,4 +1,6 @@
name: Crowdin Manual Upload and Download
permissions:
contents: read

on:
workflow_dispatch:
Copilot is powered by AI and may make mistakes. Always verify output.
1 change: 1 addition & 0 deletions .github/workflows/crowdin-upload-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Crowdin Upload Action

on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "5 0,2,4,6,8,10,12,14,16,18,20,22 * * *" # Runs every even hour at 5 minutes past
Expand Down