Back to skill

Security audit

nextjs-to-tauri

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Tauri desktop-app packaging guide with disclosed update, CI, and installer behavior, though users should review the auto-update and silent WebView2 install choices before applying it.

Install only if you are comfortable letting the agent edit your app's Tauri, frontend, and GitHub Actions files. Review the updater endpoint, signing-key handling, silent WebView2 bootstrapper setting, and release workflow before shipping to users; remove the updater or language-preference pieces if your app does not need them.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (15)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
1. **Verify latest versions first** (they drift — never trust the numbers in templates):
   - npm: `npm view @tauri-apps/cli version` (+ `plugin-opener`, `plugin-updater`)
   - crates: `curl -sA x https://crates.io/api/v1/crates/tauri | node -p "JSON.parse(require('fs').readFileSync(0)).crate.max_stable_version"` (repeat for each `tauri-plugin-*`)
   - actions: `gh api repos/actions/checkout/releases/latest --jq .tag_name` (+ `actions/setup-node`, `Swatinem/rust-cache`, `actions/upload-artifact`; `tauri-apps/tauri-action@v1` is the moving major tag — check its README, not the release list)

2. **Gate static export on Tauri** in `next.config.*`, driven by an EXPLICIT build flag rather than Tauri's auto-injected `TAURI_ENV_PLATFORM` (gotcha #1). Merge into your existing config, keeping the `next-intl` plugin wrapper:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 78)May include surrounding context.

The source must be SQUARE (the CLI says "squared PNG or SVG") and 1024x1024 — the

generated .icns carries a 1024 layer, so a 512 source is upscaled 2x for macOS.

yarn tauri icon public/logo.png rm -r src-tauri/icons/{android,ios} # desktop-only; they are directories, hence -r

text
Then **fix `.gitignore`** — see gotcha #3.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · desktop-build.yml (reported line 54)May include surrounding context.

yaml
- name: Install Linux dependencies
        if: matrix.platform == 'ubuntu-22.04'
        run: |
          sudo apt-get update
          sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libgtk-3-dev wget file

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · SKILL.md (reported line 133)May include surrounding context.

md
args: ${{ matrix.args }}

      # Portable "green" exe (Windows only): the raw self-contained binary tauri
      # builds anyway. No installer; needs the WebView2 runtime; does NOT self-update.
      # Version comes from the action's appVersion output — the version tauri actually
      # built with (tauri.conf.json, written by `yarn update-version`). Re-reading
      # package.json here would name the file and pick the upload tag from a different

Self-Modification

High
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · desktop-build.yml (reported line 129)May include surrounding context.

yaml
args: ${{ matrix.args }}

      # Portable "green" exe (Windows only): the raw self-contained binary tauri
      # builds anyway. No installer; needs the WebView2 runtime; does NOT self-update.
      # Version comes from the action's appVersion output — the version tauri actually
      # built with (tauri.conf.json, written by `yarn update-version`). Re-reading
      # package.json here would name the file and pick the upload tag from a different

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description says the skill 'Triggers on 打包成桌面应用 / 生成 exe', where at least '生成 exe' is a common, broad phrase that could overlap with many unrelated packaging tasks. The file does not provide negative examples or tighter activation constraints, so invocation boundaries are ambiguous.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · desktop-build.yml (reported line 55)May include surrounding context.

yaml
- name: Install Linux dependencies
        if: matrix.platform == 'ubuntu-22.04'
        run: |
          sudo apt-get update
          sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libgtk-3-dev wget file

      - name: Setup Node

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · desktop-build.yml (reported line 56)May include surrounding context.

yaml
- name: Install Linux dependencies
        if: matrix.platform == 'ubuntu-22.04'
        run: |
          sudo apt-get update
          sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libgtk-3-dev wget file

      - name: Setup Node

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown section instructs implementers to use checkForUpdates() and update.download() to automatically contact an update source and download software before the user is asked to install it. While installation is confirmed later, the skill description does not explicitly warn users that update checks and downloads happen automatically and may affect bandwidth, privacy, or system state.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document instructs the app to infer the user's system locale and persist it on first run, then redirect to that locale automatically. This forces a language/locale choice based on system settings rather than explicit user selection, and the text does not present it as an opt-in choice or a narrowly justified regional requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file explicitly recommends webviewInstallMode: downloadBootstrapper/silent, which causes an automatic runtime installation on Windows. Because this affects the user's system and happens silently, the skill description should clearly warn users about the download/install behavior and its impact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file instructs users to keep the updater block unless they do not ship auto-update, and later provides a GitHub releases endpoint for updates. This implies network access and software update behavior that can affect user systems, but the documentation does not include a clear warning or disclosure about remote checks/downloads.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language trigger guidance is presented only in Chinese ('打包成桌面应用 / 生成 exe') with no indication that other languages are supported or that this locale restriction is intentional. That creates a language/locale policy concern because users are not given an explicit language choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The example window URL forces the application to open under /en/, which encodes a specific locale by default. Because the template does not present this as an opt-in language choice or clearly justify it as English-only, it may conflict with language/locale policy expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The documented update-version.js script performs a file write to tauri.conf.json. Although the code logs after writing, the markdown description does not clearly warn users that running the helper mutates project configuration files as part of the build workflow.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.