Skip to content

A local-first personal finance app

Fix some issues caught by zizmor (#7826)

Julian Dominguez-Schatzd3e7c1ee8706
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index c313fa3365..9ecdcf6865 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -10,6 +10,10 @@ inputs:
description: 'Whether to download translations as part of setup, default true'
required: false
default: 'true'
+ cache:
+ description: 'Whether to restore and save dependency and Lage caches, default true'
+ required: false
+ default: 'true'
runs:
using: composite
@@ -18,6 +22,7 @@ runs:
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
+ package-manager-cache: ${{ inputs.cache }}
- name: Install yarn
run: npm install -g yarn
shell: bash
@@ -28,6 +33,7 @@ runs:
shell: bash
- name: Cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
+ if: ${{ inputs.cache == 'true' }}
id: cache
with:
path: ${{ format('{0}/**/node_modules', inputs.working-directory) }}
@@ -37,6 +43,7 @@ runs:
shell: bash
- name: Cache Lage
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
+ if: ${{ inputs.cache == 'true' }}
with:
path: ${{ format('{0}/.lage', inputs.working-directory) }}
key: lage-${{ runner.os }}-${{ github.sha }}
diff --git a/.github/workflows/cut-release-branch.yml b/.github/workflows/cut-release-branch.yml
index ac6f34f26e..e606a8926d 100644
--- a/.github/workflows/cut-release-branch.yml
+++ b/.github/workflows/cut-release-branch.yml
@@ -37,6 +37,8 @@ jobs:
- name: Set up environment
uses: ./.github/actions/setup
with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
download-translations: 'false'
- name: Bump package versions
diff --git a/.github/workflows/docker-edge.yml b/.github/workflows/docker-edge.yml
index 7cedb9248f..d20b448fa7 100644
--- a/.github/workflows/docker-edge.yml
+++ b/.github/workflows/docker-edge.yml
@@ -75,6 +75,9 @@ jobs:
# This is faster and avoids yarn memory issues
- name: Set up environment
uses: ./.github/actions/setup
+ with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
- name: Build Web
run: yarn build:server
diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml
index 6c971ca3a7..7573d5ef8e 100644
--- a/.github/workflows/docker-release.yml
+++ b/.github/workflows/docker-release.yml
@@ -77,6 +77,9 @@ jobs:
# This is faster and avoids yarn memory issues
- name: Set up environment
uses: ./.github/actions/setup
+ with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
- name: Build Web
run: yarn build:server
diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml
index 55e9dcee78..ecf8eda012 100644
--- a/.github/workflows/e2e-test.yml
+++ b/.github/workflows/e2e-test.yml
@@ -199,11 +199,13 @@ jobs:
if: github.event_name == 'pull_request'
run: |
mkdir -p vrt-metadata
- echo "${{ github.event.pull_request.number }}" > vrt-metadata/pr-number.txt
- echo "${{ needs.vrt.result }}" > vrt-metadata/vrt-result.txt
+ echo "${PR_NUMBER}" > vrt-metadata/pr-number.txt
+ echo "${VRT_RESULT}" > vrt-metadata/vrt-result.txt
echo "${STEPS_PLAYWRIGHT_REPORT_VRT_OUTPUTS_ARTIFACT_URL}" > vrt-metadata/artifact-url.txt
env:
+ PR_NUMBER: ${{ github.event.pull_request.number }}
STEPS_PLAYWRIGHT_REPORT_VRT_OUTPUTS_ARTIFACT_URL: ${{ steps.playwright-report-vrt.outputs.artifact-url }}
+ VRT_RESULT: ${{ needs.vrt.result }}
- name: Upload VRT metadata
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
diff --git a/.github/workflows/electron-master.yml b/.github/workflows/electron-master.yml
index 5ccfbc1b68..bd57342c46 100644
--- a/.github/workflows/electron-master.yml
+++ b/.github/workflows/electron-master.yml
@@ -67,6 +67,9 @@ jobs:
STEPS_PROCESS_VERSION_OUTPUTS_VERSION: ${{ steps.process_version.outputs.version }}
- name: Set up environment
uses: ./.github/actions/setup
+ with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
- name: Build Electron for Mac
if: ${{ startsWith(matrix.os, 'macos') }}
run: ./bin/package-electron
diff --git a/.github/workflows/merge-freeze-unfreeze.yml b/.github/workflows/merge-freeze-unfreeze.yml
deleted file mode 100644
index c70a665de6..0000000000
--- a/.github/workflows/merge-freeze-unfreeze.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# When the "unfreeze" label is added to a PR, add that PR to Merge Freeze's unblocked list
-# so it can be merged during a freeze. Uses pull_request_target so the workflow runs in
-# the base repo and has access to MERGEFREEZE_ACCESS_TOKEN for fork PRs; it does not
-# checkout or run any PR code. Requires MERGEFREEZE_ACCESS_TOKEN repo secret
-# (project-specific token from Merge Freeze Web API panel for actualbudget/actual / master).
-# See: https://docs.mergefreeze.com/web-api#post-freeze-status
-
-name: Merge Freeze – add PR to unblocked list
-
-on:
- pull_request_target:
- types: [labeled]
-
-jobs:
- unfreeze:
- if: ${{ github.event.label.name == 'unfreeze' }}
- runs-on: ubuntu-latest
- permissions: {}
- concurrency:
- group: merge-freeze-unfreeze-${{ github.ref }}-labels
- cancel-in-progress: false
- steps:
- - name: POST to Merge Freeze – add PR to unblocked list
- env:
- MERGEFREEZE_ACCESS_TOKEN: ${{ secrets.MERGEFREEZE_ACCESS_TOKEN }}
- PR_NUMBER: ${{ github.event.pull_request.number }}
- USER_NAME: ${{ github.actor }}
- run: |
- set -e
- if [ -z "$MERGEFREEZE_ACCESS_TOKEN" ]; then
- echo "::error::MERGEFREEZE_ACCESS_TOKEN secret is not set"
- exit 1
- fi
- url="https://www.mergefreeze.com/api/branches/actualbudget/actual/master/?access_token=${MERGEFREEZE_ACCESS_TOKEN}"
- payload=$(jq -n --arg user_name "$USER_NAME" --argjson pr "$PR_NUMBER" '{frozen: true, user_name: $user_name, unblocked_prs: [$pr]}')
- curl -sf -X POST "$url" -H "Content-Type: application/json" -d "$payload"
- echo "Merge Freeze updated: PR #$PR_NUMBER added to unblocked list."
diff --git a/.github/workflows/netlify-release.yml b/.github/workflows/netlify-release.yml
index 10d3d40435..a2d4fa2718 100644
--- a/.github/workflows/netlify-release.yml
+++ b/.github/workflows/netlify-release.yml
@@ -28,6 +28,9 @@ jobs:
- name: Set up environment
uses: ./.github/actions/setup
+ with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
- name: Install Netlify
run: npm install [email protected] -g
diff --git a/.github/workflows/publish-crdt.yml b/.github/workflows/publish-crdt.yml
index 09fa9df1b2..e83d8e5dc5 100644
--- a/.github/workflows/publish-crdt.yml
+++ b/.github/workflows/publish-crdt.yml
@@ -63,6 +63,8 @@ jobs:
- name: Set up environment
uses: ./.github/actions/setup
with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
download-translations: 'false'
- name: Build @actual-app/crdt
@@ -76,6 +78,8 @@ jobs:
with:
node-version: 24
check-latest: true
+ # Avoid restoring potentially poisoned caches in release jobs.
+ package-manager-cache: false
registry-url: 'https://registry.npmjs.org'
- name: Publish to npm
diff --git a/.github/workflows/publish-nightly-electron.yml b/.github/workflows/publish-nightly-electron.yml
index 8e363eb2c8..d224bb9f82 100644
--- a/.github/workflows/publish-nightly-electron.yml
+++ b/.github/workflows/publish-nightly-electron.yml
@@ -45,6 +45,9 @@ jobs:
- name: Set up environment
uses: ./.github/actions/setup
+ with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
name: Setup Flatpak dependencies
diff --git a/.github/workflows/publish-npm-packages.yml b/.github/workflows/publish-npm-packages.yml
index bdfe5e78f4..29b98d26e1 100644
--- a/.github/workflows/publish-npm-packages.yml
+++ b/.github/workflows/publish-npm-packages.yml
@@ -9,6 +9,9 @@ on:
- cron: '0 0 * * *'
workflow_dispatch:
+permissions:
+ contents: read
+
jobs:
build-and-pack:
runs-on: ubuntu-latest
@@ -21,6 +24,9 @@ jobs:
- name: Set up environment
uses: ./.github/actions/setup
+ with:
+ # Avoid restoring potentially poisoned caches in release jobs.
+ cache: 'false'
- name: Update package versions
if: github.event_name != 'push'
@@ -105,6 +111,8 @@ jobs:
with:
node-version: 24
check-latest: true
+ # Avoid restoring potentially poisoned caches in release jobs.
+ package-manager-cache: false
registry-url: 'https://registry.npmjs.org'
- name: Publish Core
diff --git a/upcoming-release-notes/7826.md b/upcoming-release-notes/7826.md
new file mode 100644
index 0000000000..4e8ae0208f
--- /dev/null
+++ b/upcoming-release-notes/7826.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [jfdoming]
+---
+
+Fix some issues with GitHub actions caught by zizmor