Back to skill

Security audit

Cache Migration

Security checks for vulnerabilities and agentic risk

Overview

This skill has a clear cache-migration purpose, but its scripts perform high-impact filesystem deletion and persistent launcher/config changes without enough safety controls.

Review carefully before installing or running. Use only with explicit source and destination paths, close affected apps first, make a backup or restore point, avoid administrator PowerShell unless required, and do not use the VS Code launcher-editing path with untrusted or unusual destination strings. Prefer safer app-supported cache settings where available.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/migrate-vscode.ps1:59
Finding

Source Data Is Deleted After Copy Failures Are Suppressed

Content
View full analysis
&1 | Out-Null ``` `scripts/migrate-npm.ps1:28-30`: ```powershell Copy-Item -Path "$npmCachePath\*" -Destination $DstPath -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path $npmCachePath -Recurse -Force -ErrorAction Stop cmd /c "mklink /J `"$npmCachePath`" `"$DstPath`"" 2>&1 | Out-Null ``` `scripts/migrate-yarn.ps1:39-41`: ```powershell Copy-Item -Path "$yarnCachePath\*" -Destination $dstFull -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path $yarnCachePath -Recurse -Force -ErrorAction Stop cmd /c "mklink /J `"$yarnCachePath`" `"$dstFull`"" 2>&1 | Out-Null ``` `SKILL.md:148-150`: ```powershell Copy-Item "$Src\*" $Dst -Recurse -Force -ErrorAction SilentlyContinue Remove-Item $Src -Recurse -Force cmd /c "mklink /J `"$Src`" `"$Dst`"" 2>&1 | Out-Null ``` ### Technical Analysis The migration sequence suppresses all non-terminating errors raised by `Copy-Item` and then unconditionally removes the original directory. Copy operations may fail because of locked files, access-control restrictions, insufficient destination space, path-length limitations, storage disconnection, or other I/O errors. Because `-ErrorAction SilentlyContinue` hides these failures, the scripts do not establish that the destination is a complete copy before executing recursive deletion. They also do not compare source and destination file counts, sizes, or hashes. Junction creation occurs only after deletion, and failure to create ...[truncated 1428 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/migrate-any.ps1:19
Finding

PowerShell Expression Injection Through Dynamic Path Expansion

Content
View full analysis
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/migrate-vscode.ps1:105
Finding

Untrusted Extension Path Is Persisted in VS Code Launcher Scripts

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs users to delete original directories as part of migration but does not prominently require backup, application shutdown, and explicit confirmation immediately before destructive steps. If copy operations are incomplete, files are locked, or paths are misidentified, the user could suffer irreversible data loss or application breakage.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger is overly broad and can activate on generic requests like freeing disk space, causing the skill to engage in invasive filesystem operations when the user may not have explicitly asked for junction-based migration. Because the skill performs admin-level, destructive directory manipulation, broad intent matching increases the chance of accidental invocation and unintended system changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill recommends modifying persistent environment variables and application launch scripts, which can alter system behavior beyond the immediate migration task and may be difficult for users to diagnose or roll back. In particular, editing launcher scripts and setting user-level variables can break developer tooling, redirect future writes unexpectedly, or introduce long-lived configuration drift.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language comments, usage instructions, and runtime messages exclusively in Chinese, which effectively forces a specific language for users. The policy allows locale constraints only when documented and justified or when users are given a choice, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script's comments and all user-facing Write-Host messages are in Chinese, which imposes a specific language on users. Under the policy, forcing a language or locale without user opt-in or a documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

All comments, prompts, headings, and usage text in the script are written in Chinese, including the operational output shown to users. This imposes a specific language/locale on all users without any opt-in or documented region-specific justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This PowerShell script uses Chinese for its title, usage comments, and user-facing output, which can impose a language requirement on users without opt-in. Under the policy, forcing a specific language is a natural-language locale violation unless the constraint is explicitly justified or optional.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.