Back to skill

Security audit

SenseAudio-Let-Claw-Talk

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real macOS voice assistant skill, but it needs review because it can keep the microphone active, send speech/text to SenseAudio, and its optional voiceprint service is not well constrained.

Install only if you are comfortable with a long-running macOS microphone workflow that sends captured speech to SenseAudio and stores local state under ~/.audioclaw. Protect the SenseAudio API key file, review SenseAudio data handling, and avoid enabling WeSpeaker until the local service is hardened with authentication, loopback-only binding, path validation, and pinned dependencies.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/local_wespeaker_service.py:39
Finding

Unauthenticated WeSpeaker API Allows Arbitrary File Processing and Profile Path Traversal

Content
View full analysis
Path: return self.profiles_dir / f"{profile_name}.npy" def meta_path(self, profile_name: str) -> Path: return self.profiles_dir / f"{profile_name}.json" ``` ```python def extract_embedding(self, audio_path: str) -> np.ndarray: embedding = self.model.extract_embedding(audio_path) if embedding is None: raise RuntimeError("这段音频里有效人声太少,暂时没法提取声纹。") return embedding.detach().cpu().numpy().astype(np.float32).reshape(1, -1) ``` ```python def do_POST(self): try: payload = self._read_json() if self.path == "/enroll": result = self.runtime.enroll( payload["audio_path"], payload.get("profile_name", "default"), bool(payload.get("reset")), int(payload.get("max_samples", 3)), ) self._send(200, result) return if self.path == "/verify": threshold = float(payload.get("threshold", self.runtime.threshold)) result = self.runtime.verify( payload["audio_path"], payload.get("profile_name", "default"), threshold, ) self._send(200, result) return if self.path == "/clear_profile": name = payload.get("profile_name", "default") self.runtime.store.clear_profile(name) self._send(200, {"ok": True, "profile_name": name}) return if self.path == "/shutdown": self._send(200, {"ok": True}) self.shutdown_event.set() return self._send(404, {"ok": ...[truncated 4442 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/wespeaker_user_setup.md:13
Finding

Unpinned Optional Dependencies and Mutable Git Installation Create Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (73)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

描述把该 skill 定义为一个完整的本机连续语音助手能力,包含监听、录音、ASR、agent 对话、TTS 回放以及可选后台服务;但给出的代码仅是其中一个子组件——上传音频文件到 SenseAudio 云 ASR 接口并获取文本结果。代码没有启动持续监听、没有麦克风采集、没有 Swift 录音器、没有 agent 集成、没有 TTS,也没有任何常驻流程控制。虽然 ASR 是描述中的一部分,但该代码块的实际主功能明显比声明狭窄且资源访问模式也不同(本地助手描述 vs 实际云端上传转写)。因此描述与代码行为存在实质不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个完整的本机连续语音助手能力链路,而提供的代码片段只是一个辅助数据模块,负责维护官方/自定义 voice catalog,并读写本地 JSON 配置。它访问的资源仅限本地文件系统中的音色数据文件,不涉及麦克风、常驻进程、网络代理调用、语音识别或语音合成。两者主用途存在明显差异,因此应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的主要能力是完整的本机语音助手流水线(监听、识别、对话、播报),并称 WeSpeaker 只是可选后台服务。但提供的代码片段实际只围绕 WeSpeaker 服务进行管理和调用,且暴露了明确的声纹相关操作(enroll/verify/clear profile)。这属于与声明主用途明显不一致的功能重心;同时,声纹注册与验证是敏感且独立的能力,声明中未明确说明。虽然声明提到保留可选 WeSpeaker 后台服务,但这不足以覆盖该代码片段实际核心行为,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description describes an end-user desktop voice assistant workflow whose main purpose is always-on listening, speech-to-text, agent interaction, and spoken replies on macOS. This code chunk does not implement that assistant flow. Instead, it implements the optional WeSpeaker component mentioned in the description: a background HTTP service for speaker embedding extraction, enrollment, verification, profile status, and shutdown. While WeSpeaker is referenced as an optional background service in the declared purpose, this chunk’s actual primary behavior is narrowly focused on voiceprint biometric matching and persistence, not the described assistant functionality. That makes the code materially different from the declared primary purpose, and it also exposes undeclared capabilities (speaker-profile management and verification API).

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
## Runtime notes

- 默认会复用 `~/.audioclaw/workspace/state/senseaudio_credentials.json` 里的 `SENSEAUDIO_API_KEY`
- 默认会把已记住的用户偏好保存在 `~/.audioclaw/workspace/state/voiceclaw_preferences.json`
- 默认会把当前运行状态摘要保存在 `~/.audioclaw/workspace/state/voiceclaw_runtime_state.json`
- `run_continuous_voice_assistant.py` 现在自带当前 skill 内部的 SenseAudio ASR、SenseAudio TTS 和常用音色目录,不再依赖其他语音 skill

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `run_continuous_voice_assistant.py` 现在自带当前 skill 内部的 SenseAudio ASR、SenseAudio TTS 和常用音色目录,不再依赖其他语音 skill

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `run_continuous_voice_assistant.py` 现在自带当前 skill 内部的 SenseAudio ASR、SenseAudio TTS 和常用音色目录,不再依赖其他语音 skill

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/launch_senseaudio_let_claw_talk_via_terminal.sh`

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
91% confidence
Finding

Installing directly from a GitHub repository with pip install git+https://... executes unpinned remote code during package build/install, creating a supply-chain risk if the upstream repository, dependency chain, or a referenced branch changes or is compromised. In this skill context, the guide encourages users to bootstrap a speech-processing environment from external code sources, which makes the risk more relevant because the installed code may later handle microphone-derived data and run locally with the user's permissions.

Content

Scanner excerpt · references/wespeaker_user_setup.md (reported line 27)May include surrounding context.

WeSpeaker 及运行依赖

WeSpeaker 在 macOS 上通常还需要补几项额外依赖,下面这组是当前 skill 已验证过的组合。

bash
~/.audioclaw/workspace/tools/wespeaker/.venv/bin/pip install torch torchaudio
~/.audioclaw/workspace/tools/wespeaker/.venv/bin/pip install soundfile PyYAML requests onnxruntime s3prl openai-whisper
~/.audioclaw/workspace/tools/wespeaker/.venv/bin/pip install git+https://github.com/wenet-e2e/wespeaker.git

3. 验证环境

bash
~/.audioclaw/workspace/tools/wespeaker/.venv/bin/python - <<'PY'
import wespeaker
print("wespeaker ok")
PY

如果这里能输出 wespeaker ok,说明环境已经准备好。

4. 告诉 SenseAudio-Let-Claw-Talk 去哪里找环境

默认启动脚本会优先读取:

  • VOICECLAW_WESPEAKER_PYTHON

如果你按上面的推荐目录安装,一般不用再改。

如果你把环境装在别的位置,可以手动指定:

bash
export VOICECLAW_WESPEAKER_PYTHON=/你的路径/bin/python

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/local_wespeaker_client.py (reported line 168)May include surrounding context.

python
raise RuntimeError(f"WeSpeaker service 脚本不存在:{service_script}")

    log_path = get_log_path(args)
    env = os.environ.copy()
    env["WESPEAKER_HOME"] = str((state_dir / "models").resolve())
    env["VIRTUAL_ENV"] = str(python_path.parent.parent)
    env["PATH"] = f"{python_path.parent}:{env.get('PATH', '')}"

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The script uses a plaintext shared credentials file under a workspace state directory to source remote-service API keys. If that file is readable or modifiable by other local users/processes, attackers could steal paid API credentials, redirect service usage, or cause unauthorized transcription/TTS activity.

Content

Scanner excerpt · scripts/run_continuous_voice_assistant.py (reported line 81)May include surrounding context.

python
RUNTIME_STATE_PATH = WORKSPACE_ROOT / "state" / "voiceclaw_runtime_state.json"
CLONE_VOICES_PATH = WORKSPACE_ROOT / "state" / "voiceclaw_clone_voices.json"
TTS_VALIDATION_CACHE_PATH = WORKSPACE_ROOT / "state" / "voiceclaw_tts_validation_cache.json"
SHARED_CREDENTIALS_PATH = WORKSPACE_ROOT / "state" / "senseaudio_credentials.json"
WESPEAKER_GUIDE_PATH = CURRENT_FILE.parent.parent / "references" / "wespeaker_user_setup.md"
DEFAULT_AGENT = Path("/Applications/商汤输入法AudioClaw.app/Contents/Resources/claws/picoclaw/audioclaw-darwin-amd64")
SYSTEM_SOUND_DIR = Path("/System/Library/Sounds")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs execution of shell commands, reads environment variables, accesses local files, and communicates with external services, but it declares no explicit tool scope or permissions. This creates an authorization gap where a caller may not understand the full capability set, increasing the chance of over-privileged or unintended execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill enables continuous microphone capture and sends speech to external SenseAudio services, yet the description does not give a clear privacy warning or informed-consent notice. Users may activate a persistent listening workflow without understanding that audio leaves the device, which raises privacy and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The WeSpeaker enrollment flow stores biometric voice samples and related state on disk, but the instructions do not clearly warn users that biometric data is being retained locally. Biometric data is highly sensitive, and silent retention can create privacy, consent, and regulatory issues if the device is shared or later compromised.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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 203)May include surrounding context.

md
原因:

- 持续监听属于长期麦克风进程
- 不适合用 `exec + nohup + &` 在工具调用后台硬挂
- 更稳的做法是让 skill 直接打开一个 Terminal 窗口承载会话

## Trigger-to-action rule

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file mixes English guidance with commands and instructions that require Chinese, such as the streaming TTS notes and later spoken command examples. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation because users are not offered an alternative locale or explicit choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The runtime tuning guide instructs users to say numerous Chinese phrases for preferences, voice switching, status, and WeSpeaker control, but does not indicate that these are locale-specific examples or provide user choice. This effectively imposes a language requirement in natural-language interaction, which violates the stated policy absent opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation encourages enabling WeSpeaker voiceprint verification and enrolling a user's voice without any warning about biometric data sensitivity, retention, consent, or false accept/reject risks. In a continuously listening desktop assistant, this omission can lead users to enable biometric processing without understanding privacy implications or the possibility of unauthorized use or accidental collection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file uses Chinese throughout and the example invocation phrases are only provided in Chinese, which can amount to forcing a specific language or locale without user opt-in. There is no indication that the skill is intentionally region-specific or that alternative language usage is supported.

Content

No source excerpt is available for this finding.

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 · references/wespeaker_user_setup.md (reported line 15)May include surrounding context.

建议优先用 Python 3.9。

bash
mkdir -p ~/.audioclaw/workspace/tools/wespeaker
/Library/Developer/CommandLineTools/usr/bin/python3 -m venv ~/.audioclaw/workspace/tools/wespeaker/.venv
~/.audioclaw/workspace/tools/wespeaker/.venv/bin/pip install --upgrade pip setuptools wheel

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The code is explicitly configured to transmit user audio to an external internet service, creating a data egress path for potentially sensitive voice content. In this skill's continuous-listening assistant context, that transmission is more security-relevant than in a one-shot transcription utility because the volume and sensitivity of captured speech are higher and users may expect more local processing.

Content

Scanner excerpt · scripts/local_senseaudio_asr.py (reported line 14)May include surrounding context.

python
from typing import Dict, List, Optional, Sequence, Tuple, Union


API_URL = "https://api.senseaudio.cn/v1/audio/transcriptions"
SUPPORTED_SUFFIXES = {".wav", ".mp3", ".ogg", ".opus", ".flac", ".aac", ".m4a", ".mp4"}
VALID_MODELS = {"sense-asr-lite", "sense-asr", "sense-asr-pro", "sense-asr-deepthink"}

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/local_senseaudio_asr.py (reported line 41)May include surrounding context.

python
def detect_duration_seconds(path: Path) -> float:
    try:
        output = subprocess.check_output(["/usr/bin/afinfo", str(path)], stderr=subprocess.STDOUT)
    except (subprocess.CalledProcessError, FileNotFoundError):
        return 0.0
    for raw_line in output.decode("utf-8", "ignore").splitlines():

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This function uploads the full audio file to a third-party ASR endpoint, which can expose sensitive spoken content, background conversations, or regulated data if users assume processing is local. In the context of a continuously listening desktop voice assistant, the privacy risk is elevated because captured audio may be frequent, ambient, and highly personal, yet the code provides no runtime disclosure or consent gate before transmission.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/local_senseaudio_tts.py (reported line 9)May include surrounding context.

python
from typing import Callable, Dict, Optional


API_URL = "https://api.senseaudio.cn/v1/t2a_v2"


class SenseAudioError(RuntimeError):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code sends the input text to https://api.senseaudio.cn along with bearer-token authentication, which is a network operation involving user data and credentials. There is no confirmation prompt, print/log message, or comment/docstring in this file warning that text will be sent to a remote third-party API.

Content

No source excerpt is available for this finding.