Back to skill

Security audit

Fn Ime Voice Switch

Security checks for vulnerabilities and agentic risk

Overview

The skill’s stated goal is coherent, but it asks users to grant Hammerspoon broad keyboard/accessibility permissions and install a persistent config whose referenced Lua template is missing from the reviewed artifact.

Install only if you are comfortable granting Hammerspoon Accessibility and Input Monitoring permissions and running a persistent Hammerspoon config. Before enabling it, obtain and inspect the missing templates/init.lua from a trusted source, and avoid replacing an existing ~/.hammerspoon/init.lua without understanding what will change.

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
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 20)May include surrounding context.

方式 1:作为 Claude Code skill 使用(推荐)

bash
mkdir -p ~/.claude/skills/fn-ime-voice-switch
git clone https://github.com/I501579/fn-ime-voice-switch.git /tmp/fn-ime-voice-switch
cp -r /tmp/fn-ime-voice-switch/* ~/.claude/skills/fn-ime-voice-switch/

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 20)May include surrounding context.

方式 1:作为 Claude Code skill 使用(推荐)

bash
mkdir -p ~/.claude/skills/fn-ime-voice-switch
git clone https://github.com/I501579/fn-ime-voice-switch.git /tmp/fn-ime-voice-switch
cp -r /tmp/fn-ime-voice-switch/* ~/.claude/skills/fn-ime-voice-switch/

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 44)May include surrounding context.

md
2. **微信输入法用户必须先关它的 Fn 快捷键**:微信输入法在系统底层装钩子把 Fn 事件全部吃掉,任何用户态 eventtap 都收不到。搜狗等其他输入法实测不抢,可以跳过这步。

3. **输入法 source ID 别信 `defaults read`**:那份 plist 是缓存,与系统不实时同步,列表里可能根本没有刚装的输入法但实际能用。用 `hs -c "hs.keycodes.methods(true)"` 走系统 API 拿真实可用列表。

## 文件结构

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
2. **微信输入法用户必须先关它的 Fn 快捷键**:微信输入法在系统底层装钩子把 Fn 事件全部吃掉,任何用户态 eventtap 都收不到。搜狗等其他输入法实测不抢,可以跳过这步。

3. **输入法 source ID 别信 `defaults read`**:那份 plist 是缓存,与系统不实时同步,列表里可能根本没有刚装的输入法但实际能用。用 `hs -c "hs.keycodes.methods(true)"` 走系统 API 拿真实可用列表。

## 文件结构

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 · SKILL.md (reported line 56)May include surrounding context.

open ~/Applications/Hammerspoon.app

text

说明:`--appdir=$HOME/Applications` 把 app 装到用户目录。brew cask 默认要 sudo 拷到 `/Applications`,没法弹密码的环境会失败。装到 `~/Applications` 一样能用,菜单栏有图标,brew 一样能升级。

3. **授权 TCC 权限**

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The README instructs users to invoke the skill with Chinese phrases only: "设置 Fn 切换输入法" or "Fn 切到豆包语音". This is a natural-language locale constraint, and the document does not indicate that Chinese is optional or that the skill is intentionally limited to Chinese-speaking users.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.