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
16 changes: 8 additions & 8 deletions .github/workflows/build-cordova.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest

@cubic-dev-ai cubic-dev-ai Bot Jul 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: actions/checkout@v5 defaults persist-credentials to true, which stores the GitHub token in .git/config for the remainder of the job. Any subsequent step (including third-party actions) can read or exfiltrate that token. Adding persist-credentials: false to each checkout step — and scoping job permissions to contents: read — reduces the blast radius of a compromised or malicious action in the pipeline.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/build-cordova.yml, line 25:

<comment>`actions/checkout@v5` defaults `persist-credentials` to `true`, which stores the GitHub token in `.git/config` for the remainder of the job. Any subsequent step (including third-party actions) can read or exfiltrate that token. Adding `persist-credentials: false` to each checkout step — and scoping job permissions to `contents: read` — reduces the blast radius of a compromised or malicious action in the pipeline.</comment>

<file context>
@@ -22,7 +22,7 @@ jobs:
         environment: ${{ github.event.inputs.environment || 'Local' }}
         steps:
-            - uses: actions/checkout@v3
+            - uses: actions/checkout@v5
             - uses: actions/setup-java@v3
               with:
</file context>
Suggested change
runs-on: ubuntu-latest
- uses: actions/checkout@v5
with:
persist-credentials: false
Fix with cubic

environment: ${{ github.event.inputs.environment || 'Local' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- uses: actions/setup-java@v3
with:
distribution: "adopt"
Expand All @@ -32,8 +32,8 @@ jobs:
candidate: gradle
version: 7.2
- uses: android-actions/setup-android@v2
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
Comment on lines +35 to +36

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '1,140p' .github/workflows/build-cordova.yml
printf '\n--- publish-release ---\n'
sed -n '1,140p' .github/workflows/publish-release.yml

Repository: grigoreo-dev/padloc

Length of output: 10046


🌐 Web query:

actions/setup-node v6 package-manager-cache cache pnpm elevated privileges sensitive information docs

💡 Result:

In GitHub Actions, the actions/setup-node v6 action provides a package-manager-cache input that controls automatic dependency caching [1][2]. By default, this is set to true [1][2]. For workflows that involve elevated privileges or access to sensitive information, official documentation explicitly recommends disabling automatic caching by setting package-manager-cache: false when caching is not strictly required for secure operation [1][2][3]. Regarding pnpm specifically: - Unlike npm, which may trigger automatic caching based on the packageManager field in package.json, caching for pnpm is not automatic [1][2]. - To use caching with pnpm, you must explicitly configure it using the cache input (e.g., cache: 'pnpm') [4][2]. - When using pnpm, ensure you are using a supported version (v6.10+) and generally should use --frozen-lockfile in your install commands to maintain consistency [4]. If you are concerned about sensitive information leakage or security in privileged workflows, the primary mitigation is to explicitly disable the caching feature in your workflow YAML [1][2]: steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: node-version: '24' package-manager-cache: false # Security recommendation for privileged workflows

Citations:


🏁 Script executed:

python3 - <<'PY'
import json, subprocess, textwrap, os, sys, urllib.request
url = "https://raw.githubusercontent.com/actions/setup-node/main/action.yml"
print("fetch", url)
print(urllib.request.urlopen(url, timeout=20).read().decode()[:4000])
PY

Repository: grigoreo-dev/padloc

Length of output: 2826


🏁 Script executed:

python3 - <<'PY'
import urllib.request, re
for url in [
    "https://raw.githubusercontent.com/actions/setup-node/main/action.yml",
    "https://raw.githubusercontent.com/actions/setup-node/main/README.md",
]:
    print(f"--- {url} ---")
    txt = urllib.request.urlopen(url, timeout=20).read().decode()
    for needle in ["package-manager-cache", "cache:", "elevated privileges", "sensitive information"]:
        if needle in txt:
            print(f"found {needle!r}")
    # Print relevant excerpts
    for pat in [r"package-manager-cache.*", r"cache.*", r"elevated privileges.*", r"sensitive information.*"]:
        m = re.search(pat, txt, re.I)
        if m:
            start = max(0, m.start()-300)
            end = min(len(txt), m.end()+700)
            print(txt[start:end])
            print()
PY

Repository: grigoreo-dev/padloc

Length of output: 2828


🌐 Web query:

site:github.com/actions/setup-node package-manager-cache elevated privileges sensitive information cache-poisoning

💡 Result:

In the context of package managers, particularly within CI/CD environments like GitHub Actions, using automatic caching features in workflows with elevated privileges or access to sensitive information introduces a risk of cache poisoning [1][2]. When a package manager cache is automatically enabled, the system restores dependency data from a shared or persistent cache to speed up builds [3][4]. If an attacker can influence the workflow execution—for example, by submitting a pull request that alters dependency definitions or environment configurations—they may be able to poison the cache [5][2]. In a privileged environment (such as a workflow with access to secrets, OIDC tokens, or deployment credentials), this poisoned cache can be used to inject malicious code or exfiltrate sensitive information [5][2]. Because the package manager or the CI/CD action cannot reliably determine if a specific workflow context is inherently "privileged," official guidance recommends the following mitigations: 1. Explicitly Disable Caching: For workflows handling sensitive credentials, secrets, or those running in highly privileged environments, disable automatic caching by setting package-manager-cache: false in your configuration [6][5][7]. 2. Use Explicit Cache Keys: When caching is necessary, avoid implicit or automatic behavior. Use explicit, immutable cache keys that you control and verify [2]. 3. Monitor Logs: Ensure that your workflow logs are configured to explicitly indicate when caching operations occur, allowing you to audit whether caching is happening in sensitive steps [2]. By disabling automatic caching in sensitive workflows, you prevent the risk of attackers using the cache as a persistence or exfiltration vector for privileged data [5][2].

Citations:


🏁 Script executed:

python3 - <<'PY'
import urllib.request, re
txt = urllib.request.urlopen("https://raw.githubusercontent.com/actions/setup-node/main/README.md", timeout=20).read().decode()
for term in ["package-manager-cache", "cache: 'pnpm'", "cache: \"pnpm\"", "elevated privileges", "sensitive information"]:
    print(f"== {term} ==")
    for m in re.finditer(term, txt, re.I):
        start = max(0, m.start()-250)
        end = min(len(txt), m.end()+600)
        print(txt[start:end])
        print("---")
        break
PY

Repository: grigoreo-dev/padloc

Length of output: 2751


🏁 Script executed:

python3 - <<'PY'
import urllib.request, ssl, re
urls = {
    "README": "https://raw.githubusercontent.com/actions/setup-node/main/README.md",
    "action": "https://raw.githubusercontent.com/actions/setup-node/main/action.yml",
}
ctx = ssl._create_unverified_context()
for name, url in urls.items():
    print(f"--- {name} ---")
    txt = urllib.request.urlopen(url, context=ctx, timeout=20).read().decode()
    for needle in ["package-manager-cache", "cache:", "elevated privileges", "sensitive information"]:
        idx = txt.lower().find(needle.lower())
        if idx >= 0:
            print(txt[max(0, idx-220):min(len(txt), idx+900)])
            print("\n---\n")
PY

Repository: grigoreo-dev/padloc

Length of output: 6951


🏁 Script executed:

python3 - <<'PY'
import urllib.request, ssl, re

ctx = ssl._create_unverified_context()
txt = urllib.request.urlopen("https://raw.githubusercontent.com/actions/setup-node/main/README.md", context=ctx, timeout=20).read().decode()

for needle in ["package-manager-cache", "cache:", "elevated privileges", "sensitive information"]:
    print(f"\n== {needle} ==")
    for m in re.finditer(needle, txt, re.I):
        start = max(0, m.start()-250)
        end = min(len(txt), m.end()+700)
        print(txt[start:end])
        print("\n---")
        break
PY

Repository: grigoreo-dev/padloc

Length of output: 4149


🏁 Script executed:

python3 - <<'PY'
import urllib.request, ssl, re

ctx = ssl._create_unverified_context()
txt = urllib.request.urlopen("https://raw.githubusercontent.com/actions/setup-node/main/README.md", context=ctx, timeout=20).read().decode()

# Print only the relevant sections near cache-related inputs and recommendations
patterns = [
    r"package-manager-cache",
    r"cache\s*input",
    r"elevated privileges",
    r"sensitive information",
]
for pat in patterns:
    m = re.search(pat, txt, re.I)
    print(f"\n== {pat} ==")
    if m:
        start = max(0, m.start()-300)
        end = min(len(txt), m.end()+1000)
        print(txt[start:end])
    else:
        print("not found")
PY

Repository: grigoreo-dev/padloc

Length of output: 5541


Remove cache: "pnpm" from these secret-bearing jobs. package-manager-cache: false only disables automatic caching, so this explicit pnpm cache still leaves the Android/iOS workflows exposed to cache-poisoning risk.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build-cordova.yml around lines 35 - 36, Remove the
explicit pnpm cache configuration from the secret-bearing Android/iOS workflow
setup, including any cache: "pnpm" input associated with actions/setup-node@v6
or pnpm/action-setup@v6; retain package-manager-cache: false and leave the setup
steps otherwise unchanged.

@cubic-dev-ai cubic-dev-ai Bot Jul 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This release workflow has access to secrets for publishing yet still enables cache: "pnpm" on the setup-node step. Because GitHub Actions cache keys are shared across the repository, a lower-privileged workflow (e.g., a PR build) could poison the pnpm cache and have it restored here during a release, potentially exfiltrating secrets. Consider removing cache: "pnpm" from privileged release jobs (or moving caching to non-privileged workflows only).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/build-cordova.yml, line 36:

<comment>This release workflow has access to secrets for publishing yet still enables `cache: "pnpm"` on the `setup-node` step. Because GitHub Actions cache keys are shared across the repository, a lower-privileged workflow (e.g., a PR build) could poison the pnpm cache and have it restored here during a release, potentially exfiltrating secrets. Consider removing `cache: "pnpm"` from privileged release jobs (or moving caching to non-privileged workflows only).</comment>

<file context>
@@ -32,8 +32,8 @@ jobs:
-            - uses: pnpm/action-setup@v4
-            - uses: actions/setup-node@v3
+            - uses: pnpm/action-setup@v6
+            - uses: actions/setup-node@v6
               with:
                   node-version-file: ".nvmrc"
</file context>
Fix with cubic

with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -53,7 +53,7 @@ jobs:
PL_ANDROID_KEYSTORE_ALIAS: ${{ secrets.PL_ANDROID_KEYSTORE_ALIAS }}
run: npm run cordova:build:android:signed
- name: Archive Signed APK (Android)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-android-${{ github.sha }}-signed.apk
path: packages/cordova/platforms/android/app/build/outputs/apk/release/app-release.apk
Expand All @@ -66,9 +66,9 @@ jobs:
runs-on: macos-11
environment: ${{ github.event.inputs.environment || 'Local' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
Comment on lines +69 to +71

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

iOS job uses a retired macOS runner image
runs-on: macos-11 points to an unsupported GitHub-hosted image, so this job won’t start. Switch it to a supported macOS runner such as macos-latest.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 69-69: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build-cordova.yml around lines 69 - 71, The iOS job
targets the retired macos-11 runner and must use a supported image. Update the
job’s runs-on value to macos-latest (or another currently supported macOS
runner) while leaving the checkout, pnpm setup, and Node setup steps unchanged.

with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -80,7 +80,7 @@ jobs:
PL_SERVER_URL: ${{ secrets.PL_SERVER_URL }}
run: npm run cordova:build:ios
- name: Archive Unsigned App (iOS)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-ios-${{ github.sha }}-unsigned.app
path: packages/cordova/platforms/ios/build/emulator/Padloc.app
Expand Down
40 changes: 20 additions & 20 deletions .github/workflows/build-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment || 'Local' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -47,31 +47,31 @@ jobs:
env:
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
- name: Archive AppImage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-linux-${{ github.sha }}-unsigned.AppImage
path: packages/electron/dist/*.AppImage
if-no-files-found: error
- name: Archive deb
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-linux-${{ github.sha }}-unsigned.deb
path: packages/electron/dist/*.deb
if-no-files-found: error
- name: Archive snap
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-linux-${{ github.sha }}-unsigned.snap
path: packages/electron/dist/*.snap
if-no-files-found: error
- name: Archive flatpak
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-linux-${{ github.sha }}-unsigned.flatpak
path: packages/electron/dist/*.flatpak
if-no-files-found: error
- name: Archive Unpacked
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-linux-${{ github.sha }}-unpacked
path: packages/electron/dist/linux-unpacked
Expand All @@ -81,9 +81,9 @@ jobs:
runs-on: macos-11
environment: ${{ github.event.inputs.environment || 'Local' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
Comment on lines +84 to +86

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files .github/workflows/build-electron.yml
wc -l .github/workflows/build-electron.yml
cat -n .github/workflows/build-electron.yml | sed -n '70,140p'

printf '\n---\n'

rg -n 'runs-on: macos-11|actions/checkout@v5|pnpm/action-setup@v6|actions/setup-node@v6|actions/upload-artifact@v6' .github/workflows/build-electron.yml

Repository: grigoreo-dev/padloc

Length of output: 4825


🌐 Web query:

GitHub Actions macos-11 retired runner image June 28 2024

💡 Result:

GitHub officially retired the macos-11 runner image for GitHub Actions on June 28, 2024 [1][2]. Following its initial announcement of the deprecation in January 2024 [3], GitHub confirmed the specific retirement date of June 28, 2024, in a May 2024 update [1]. Users who continue to reference macos-11 in their workflow files will experience build failures, as the environment is no longer supported or available [2][4]. Users are advised to migrate to newer, supported macOS runner versions, such as macos-12, macos-13, or macos-14 [3][4].

Citations:


🌐 Web query:

actions/checkout v5 minimum runner version 2.327.1

💡 Result:

Yes, actions/checkout v5 requires a minimum GitHub Actions Runner version of v2.327.1 [1][2][3]. This requirement exists because actions/checkout v5 was updated to the Node.js 24 runtime, and runner version v2.327.1 is the minimum version necessary to support Node.js 24-based actions [2][4]. If you are using self-hosted runners, they must be updated to at least this version to run checkout v5 [4].

Citations:


🌐 Web query:

actions/setup-node v6 minimum runner version

💡 Result:

The actions/setup-node v6 action requires the GitHub runner to be version v2.327.1 or later to ensure compatibility [1][2]. Using an older runner version may result in issues when utilizing this major version release [3][4].

Citations:


🌐 Web query:

actions/upload-artifact v6 minimum runner version

💡 Result:

The actions/upload-artifact version 6 action requires a minimum Actions Runner version of 2.327.1 [1][2][3]. This version of the action runs on Node.js 24 (runs.using: node24) [1][4]. If you are using self-hosted runners, you must ensure they are updated to at least version 2.327.1 before upgrading to v6 to maintain compatibility [1][5].

Citations:


🌐 Web query:

pnpm/action-setup v6 minimum runner version

💡 Result:

The pnpm/action-setup v6 action requires a runner capable of executing Node.js 24 [1][2][3]. Because the action is built to run on Node.js 24, it requires a GitHub Actions runner environment that supports this runtime [1][2]. Specifically, internal configuration for v6 specifies a minimum runner version of 2.327.1 [2]. This version upgrade was driven by the deprecation of the Node 20 runtime on GitHub Actions runners, necessitating a transition to Node 24 [2]. Users are encouraged to ensure their self-hosted runners or environment settings meet these requirements to maintain compatibility [2].

Citations:


macOS jobs need a supported runner image. Both macos_unsigned and macos_signed still use runs-on: macos-11, which GitHub removed on 2024-06-28. Update them to a supported macOS image or these jobs will not start.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 84-84: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build-electron.yml around lines 84 - 86, Update the
runs-on values for both macOS jobs, macos_unsigned and macos_signed, from the
removed macos-11 image to a currently supported GitHub macOS runner image.

with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -97,7 +97,7 @@ jobs:
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
CSC_IDENTITY_AUTO_DISCOVERY: false
- name: Archive dmg
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-macos-${{ github.sha }}-unsigned.dmg
path: packages/electron/dist/*.dmg
Expand All @@ -107,9 +107,9 @@ jobs:
runs-on: macos-11
environment: ${{ github.event.inputs.environment || 'Local' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -124,7 +124,7 @@ jobs:
CSC_KEY_PASSWORD: ${{ secrets.PL_MACOS_SIGNING_CERT_PASSWORD }}
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
- name: Archive dmg
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-macos-${{ github.sha }}-signed.dmg
path: packages/electron/dist/*.dmg
Expand All @@ -134,9 +134,9 @@ jobs:
runs-on: windows-2019
environment: ${{ github.event.inputs.environment || 'Local' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
Comment on lines +137 to +139

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '120,170p' .github/workflows/build-electron.yml

Repository: grigoreo-dev/padloc

Length of output: 1730


🌐 Web query:

GitHub Actions windows-2019 retired 2025-06-30 official announcement

💡 Result:

The GitHub Actions windows-2019 runner image was officially retired and reached end-of-support on June 30, 2025 [1][2][3]. GitHub announced the deprecation of the windows-2019 image on April 15, 2025, citing its N-1 OS support policy [3][4]. Following the announcement, the deprecation process began on June 1, 2025 [1][2]. To encourage users to migrate to newer images like windows-2022 or windows-2025, GitHub implemented a series of "brownout" periods throughout June 2025, during which jobs using the windows-2019 label were configured to fail [4]. Since June 30, 2025, the image is no longer supported [2][5].

Citations:


Update the Windows job runner

.github/workflows/build-electron.yml still uses windows-2019 for the Windows job, which is retired and should be moved to a supported image such as windows-latest.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 137-137: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build-electron.yml around lines 137 - 139, Update the
Windows job’s runner configuration in the workflow from the retired windows-2019
image to a supported image such as windows-latest, locating the job by its
runs-on setting near the checkout, pnpm/action-setup, and setup-node steps.

with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -149,7 +149,7 @@ jobs:
env:
PL_PWA_URL: ${{ secrets.PL_PWA_URL }}
- name: Archive exe
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-windows-${{ github.sha }}-unsigned.exe
path: packages/electron/dist/*.exe
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:

runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down Expand Up @@ -66,35 +66,35 @@ jobs:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
- name: Archive AppImage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
if: matrix.config.os == 'ubuntu-latest'
with:
name: padloc-linux-${{ github.sha }}-unsigned.AppImage
path: packages/tauri/src-tauri/target/debug/bundle/appimage/padloc*.AppImage
if-no-files-found: error
- name: Archive deb
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
if: matrix.config.os == 'ubuntu-latest'
with:
name: padloc-linux-${{ github.sha }}-unsigned.deb
path: packages/tauri/src-tauri/target/debug/bundle/deb/*.deb
if-no-files-found: error
- name: Archive dmg
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
if: matrix.config.os == 'macos-latest'
with:
name: padloc-macos-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.dmg
path: packages/tauri/src-tauri/target/debug/bundle/dmg/*.dmg
if-no-files-found: error
- name: Archive app
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
if: matrix.config.os == 'macos-latest'
with:
name: padloc-macos-${{ matrix.config.arch }}-${{ github.sha }}-unsigned.app
path: packages/tauri/src-tauri/target/debug/bundle/macos/*.app
if-no-files-found: error
- name: Archive msi
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
if: matrix.config.os == 'windows-latest'
with:
name: padloc-windows-${{ github.sha }}-unsigned.msi
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build-web-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment || 'Local' }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v3
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -50,13 +50,13 @@ jobs:
# run: cd packages/extension/dist && web-ext sign --id="${{ secrets.PL_WEB_EXTENSION_FIREFOX_ID }}" --channel=unlisted --api-key=${{ secrets.PL_WEB_EXTENSION_FIREFOX_API_KEY }} --api-secret=${{ secrets.PL_WEB_EXTENSION_FIREFOX_API_SECRET }}
# - name: Archive Signed Web Extension (Firefox)
# if: github.event.inputs.environment == 'Beta' || github.event.inputs.environment == 'Production'
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v6
# with:
# name: padloc-web-extension-${{ github.sha }}-signed.xpi
# path: packages/extension/dist/web-ext-artifacts/*.xpi
# if-no-files-found: error
- name: Archive Unsigned Web Extension (Chrome/Edge/Firefox)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-web-extension-${{ github.sha }}-unsigned
path: |
Expand All @@ -77,7 +77,7 @@ jobs:
crxFilePath: packages/extension/padloc-signed.crx
privateKey: ${{ secrets.PL_WEB_EXTENSION_CHROME_CRX_PRIVATE_KEY }}
- name: Archive Signed Web Extension (Chrome/Edge)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v6
with:
name: padloc-web-extension-${{ github.sha }}-signed.crx
path: packages/extension/padloc-signed.crx
Expand Down
63 changes: 54 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
Comment on lines +18 to +20

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Checkout steps persist credentials to disk across all four jobs.

None of the actions/checkout steps (lint, build, unit, e2e) set persist-credentials: false, so the GitHub token remains available in the git config for the rest of each job. This was already flagged for the e2e job specifically in a prior review; it also applies unchanged to lint/build/unit. Add persist-credentials: false to each checkout step and scope jobs to permissions: contents: read (add write only where a step genuinely needs it).

🔒 Proposed fix (repeat per job)
     lint:
         name: lint
         runs-on: ubuntu-latest
+        permissions:
+            contents: read
         steps:
-            - uses: actions/checkout@v5
+            - uses: actions/checkout@v5
+              with:
+                  persist-credentials: false

Also applies to: 40-42, 61-67, 76-78

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 18-18: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 18 - 20, Add persist-credentials:
false to every actions/checkout step in the lint, build, unit, and e2e jobs, and
set each job’s permissions to contents: read, granting additional write
permissions only where explicitly required. Locate the jobs and checkout steps
in the workflow rather than changing unrelated actions.

Source: Linters/SAST tools

with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -37,9 +37,9 @@ jobs:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand All @@ -58,13 +58,58 @@ jobs:
name: unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run unit tests
run: pnpm test

e2e:
name: e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Playwright Chromium
run: pnpm exec playwright install --with-deps chromium
- name: Start maildev
run: |
docker run -d --name padloc-e2e-maildev \
-p 1025:1025 -p 1080:1080 \
maildev/maildev:2.1.0
for i in $(seq 1 60); do
body="$(curl -sf http://localhost:1080/email 2>/dev/null || true)"
if [[ "$body" == \[* ]]; then
echo "maildev ready"
exit 0
fi
sleep 0.5
done
echo "maildev failed to start" >&2
docker logs padloc-e2e-maildev || true
exit 1
- name: Run E2E tests
env:
E2E_MAILDEV_URL: http://localhost:1080
run: pnpm run test:e2e:ci
- name: Upload Playwright artifacts
if: always()
uses: actions/upload-artifact@v6
with:
name: playwright-artifacts
path: |
playwright-report/
test-results/
if-no-files-found: ignore
retention-days: 7
33 changes: 0 additions & 33 deletions .github/workflows/e2e.yml

This file was deleted.

Loading
Loading