A local-first personal finance app
Add explicit permissions to GitHub Actions workflows (#7846)
Matiss Janis Aboltins872a40f8293d
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex a1adddafc2..7388ad4892 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -14,6 +14,9 @@ on:pull_request:merge_group:+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}diff --git a/.github/workflows/check.yml b/.github/workflows/check.ymlindex 0dd92f15b6..4f1642b502 100644--- a/.github/workflows/check.yml+++ b/.github/workflows/check.yml@@ -7,6 +7,9 @@ on:pull_request:merge_group:+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}diff --git a/.github/workflows/count-points.yml b/.github/workflows/count-points.ymlindex bd5c9dd7c9..7c9bd87489 100644--- a/.github/workflows/count-points.yml+++ b/.github/workflows/count-points.yml@@ -11,6 +11,11 @@ on:required: truetype: string+permissions:+ contents: read+ issues: read+ pull-requests: read+jobs:count-points:runs-on: ubuntu-latestdiff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.ymlindex 7573d5ef8e..eb46302c06 100644--- a/.github/workflows/docker-release.yml+++ b/.github/workflows/docker-release.yml@@ -23,6 +23,10 @@ env:TAGS: |type=semver,pattern={{version}}+permissions:+ contents: read+ packages: write+jobs:build:name: Build Docker imagediff --git a/.github/workflows/electron-pr.yml b/.github/workflows/electron-pr.ymlindex 611fe8f870..04088e8a9d 100644--- a/.github/workflows/electron-pr.yml+++ b/.github/workflows/electron-pr.yml@@ -19,6 +19,9 @@ on:- '!packages/docs/**' # Docs changes don't affect Electron- '!packages/eslint-plugin-actual/**' # Eslint plugin changes don't affect Electron+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number }}cancel-in-progress: truediff --git a/.github/workflows/i18n-string-extract-master.yml b/.github/workflows/i18n-string-extract-master.ymlindex c727ca9d3d..c9acaa434e 100644--- a/.github/workflows/i18n-string-extract-master.yml+++ b/.github/workflows/i18n-string-extract-master.yml@@ -6,6 +6,9 @@ on:- cron: '0 4 * * *'workflow_dispatch:+permissions:+ contents: read+jobs:extract-and-upload-i18n-strings:runs-on: ubuntu-latestdiff --git a/.github/workflows/issues-close-feature-requests.yml b/.github/workflows/issues-close-feature-requests.ymlindex ea8fea43c0..ab57cb4852 100644--- a/.github/workflows/issues-close-feature-requests.yml+++ b/.github/workflows/issues-close-feature-requests.yml@@ -4,6 +4,9 @@ on:issues:types: [labeled]+permissions:+ issues: write+jobs:needs-votes:if: ${{ github.event.label.name == 'feature' }}diff --git a/.github/workflows/issues-close-tech-support.yml b/.github/workflows/issues-close-tech-support.ymlindex 3eb0425d8b..a92bbf41b5 100644--- a/.github/workflows/issues-close-tech-support.yml+++ b/.github/workflows/issues-close-tech-support.yml@@ -4,6 +4,9 @@ on:issues:types: [labeled]+permissions:+ issues: write+jobs:tech-support:if: ${{ github.event.label.name == 'tech-support' }}diff --git a/.github/workflows/issues-remove-help-wanted.yml b/.github/workflows/issues-remove-help-wanted.ymlindex 2902e33e03..3945bdd6c0 100644--- a/.github/workflows/issues-remove-help-wanted.yml+++ b/.github/workflows/issues-remove-help-wanted.yml@@ -4,6 +4,9 @@ on:issues:types: [closed]+permissions:+ issues: write+jobs:remove-help-wanted:if: ${{ !contains(github.event.issue.labels.*.name, 'feature') && contains(github.event.issue.labels.*.name, 'help wanted') }}diff --git a/.github/workflows/netlify-release.yml b/.github/workflows/netlify-release.ymlindex a2d4fa2718..114ecfd998 100644--- a/.github/workflows/netlify-release.yml+++ b/.github/workflows/netlify-release.yml@@ -12,6 +12,9 @@ on:tags:- v**+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: falsediff --git a/.github/workflows/publish-flathub.yml b/.github/workflows/publish-flathub.ymlindex d55437f855..44aa153364 100644--- a/.github/workflows/publish-flathub.yml+++ b/.github/workflows/publish-flathub.yml@@ -18,6 +18,9 @@ concurrency:group: publish-flathubcancel-in-progress: false+permissions:+ contents: read+jobs:publish-flathub:runs-on: ubuntu-22.04diff --git a/.github/workflows/publish-microsoft-store.yml b/.github/workflows/publish-microsoft-store.ymlindex c2e2e4d3b7..79c4fed7d4 100644--- a/.github/workflows/publish-microsoft-store.yml+++ b/.github/workflows/publish-microsoft-store.yml@@ -18,6 +18,9 @@ concurrency:group: publish-microsoft-storecancel-in-progress: false+permissions:+ contents: read+jobs:publish-microsoft-store:runs-on: windows-latestdiff --git a/.github/workflows/publish-nightly-electron.yml b/.github/workflows/publish-nightly-electron.ymlindex d224bb9f82..93090d7515 100644--- a/.github/workflows/publish-nightly-electron.yml+++ b/.github/workflows/publish-nightly-electron.yml@@ -13,6 +13,9 @@ defaults:env:CI: true+permissions:+ contents: read+concurrency:group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: falsediff --git a/upcoming-release-notes/7846.md b/upcoming-release-notes/7846.mdnew file mode 100644index 0000000000..3ef582271d--- /dev/null+++ b/upcoming-release-notes/7846.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [MatissJanis]+---++Add explicit permissions to GitHub Actions workflows for enhanced security and token scope control.