Back to skill

Security audit

Elderly Voice Assistant

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for a voice assistant, but it handles sensitive voice and family-care actions without enough consent, confirmation, or data-retention controls.

Review this carefully before installing. It should require explicit setup for family contacts, inactivity monitoring, and message sending; read back messages before sending; disclose that voice recordings and generated speech text go to SenseAudio; and clean up temporary audio files after playback.

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

Warning
Location
SKILL.md:251
Finding
Synthesized Audio Remains in Persistent Temporary Files<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 251–259 **Vulnerability Type**: Sensitive-data retention through unsafe temporary-file lifecycle **Risk Level**: Medium ### Vulnerable Code ```python with tempfile.NamedTemporaryFile(suffix=".mp3", delete=False) as f: f.write(audio_bytes) tmp = f.name for cmd in [["afplay", tmp], ["play", tmp], ["mpg123", tmp]]: try: subprocess.run(cmd, check=True, capture_output=True) return except (FileNotFoundError, subprocess.CalledProcessError): continue ``` ### Technical Analysis The synthesized MP3 is created with `delete=False`, but the function does not remove it after successful playback or after all playback attempts fail. Every invocation can therefore leave an audio file in the operating system's temporary directory. The audio may contain private message contents, health or medication reminders, family information, weather locations, or AI conversation responses. Although `NamedTemporaryFile` normally creates files with restrictive permissions, the data remains available to processes operating under the same account, privileged local users, forensic tools, backup systems, or later compromise of the host account. The fixed command arrays do not introduce command injection because no shell is used and the executable names are not derived from user input. The vulnerability is specifically the failure to manage the temporary file's lifecycle. ### Attack Path 1. A user submits speech containing private or health-related information. 2. The assistant generates a response that repeats or references that information. 3. The response is sent to the TTS service, and the returned audio is written to a temporary MP3 with `delete=False`. 4. Playback succeeds and the function returns, or all playback commands fail. 5. No cleanup operation removes the MP3. 6. A process with access to the same account, a privileged local user, or an attacker who later compromises ...[truncated 562 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Place playback inside a `try` block and remove the temporary file in a `finally` block so cleanup occurs on success, failure, and unexpected exceptions. ```python tmp = None try: with tempfile.NamedTemporaryFile(suffix=".mp3", delete=False) as f: f.write(audio_bytes) tmp = f.name for cmd in [["afplay", tmp], ["play", tmp], ["mpg123", tmp]]: try: subprocess.run(cmd, check=True, capture_output=True) return except (FileNotFoundError, subprocess.CalledProcessError): continue finally: if tmp: try: os.remove(tmp) except FileNotFoundError: pass ``` Additional hardening measures: - Prefer streaming audio directly from memory or standard input when supported by the playback tool. - Explicitly retain restrictive owner-only file permissions. - Avoid logging temporary paths or synthesized private content. - Add a startup cleanup routine for stale files created by earlier crashes. - Define and document a minimal retention policy for voice data. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:11
Finding
Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 11–15 **Vulnerability Type**: Mutable and unverifiable dependency resolution **Risk Level**: Low ### Vulnerable Code ```yaml install: - kind: uv package: requests ``` ### Technical Analysis The installation configuration requests `requests` without specifying an audited version, lockfile, package hash, or trusted artifact source. Each installation may therefore resolve a different version and transitive dependency graph. The package name is legitimate and no typosquatting or dependency-confusion name is present. Nevertheless, unconstrained resolution increases supply-chain exposure. If the package registry, a future release, a transitive dependency, or the resolution channel is compromised, hostile code could enter the Skill's runtime without any change to the reviewed `SKILL.md`. A compromised dependency could execute when imported by the implementation. This behavior is not required for the Skill's declared functionality: the Skill needs an HTTP client, but it does not need an arbitrary future version. ### Attack Path 1. An attacker compromises a future package release, transitive dependency, package registry account, or dependency distribution channel. 2. A user installs the Skill after the compromised artifact becomes the version selected by the unconstrained resolver. 3. The installer retrieves the altered package or dependency. 4. The implementation imports `requests`, loading attacker-controlled Python code in the Skill's process. 5. The malicious dependency acts with the permissions of that process and may access available environment variables, including `SENSEAUDIO_API_KEY`, local files accessible to the user, and network resources. This exploitation path requires an upstream supply-chain compromise; the reviewed project does not itself host or retrieve a known malicious package. ### Impact Assessment Successful exploitation could execute code with the same privil ...[truncated 386 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin `requests` to a reviewed exact version rather than resolving an arbitrary current release. - Use a lockfile that records all transitive dependency versions. - Require cryptographic hashes for downloaded artifacts. - Configure installation to use an explicitly trusted package index over authenticated TLS. - Regularly scan pinned dependencies for known vulnerabilities and update them through a controlled review process. - Where the platform permits, install dependencies in an isolated environment with minimal filesystem, environment-variable, and network access. - Ensure the API credential is exposed only to the runtime component that requires it. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The skill can send messages on the user's behalf based on speech interpretation, but there is no warning or confirmation requirement before communications are sent. Misrecognition or ambiguous intent could cause unauthorized messages to family contacts, creating privacy, social, or safety consequences.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The description advertises notifying children when the user is inactive, but provides no privacy notice, consent flow, or explanation of what information will be shared. For an elderly-focused assistant, silent escalation of behavioral data to family members can undermine privacy expectations and user autonomy.

External Transmission

Medium
Category
Data Exfiltration
Content
### 语音识别(ASR)

```bash
curl https://api.senseaudio.cn/v1/audio/transcriptions \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -F file="@recording.wav" \
  -F model="sense-asr" \
Confidence
90% confidence
Finding
The ASR API uploads raw voice recordings to an external service, which can contain highly sensitive personal, health, and family information. Because this assistant is designed for elderly users and supports message sending and care workflows, the transmitted audio may reveal especially private data and should be treated as sensitive.

External Transmission

Medium
Category
Data Exfiltration
Content
### 语音识别(ASR)

```bash
curl https://api.senseaudio.cn/v1/audio/transcriptions \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -F file="@recording.wav" \
  -F model="sense-asr" \
Confidence
90% confidence
Finding
The ASR API uploads raw voice recordings to an external service, which can contain highly sensitive personal, health, and family information. Because this assistant is designed for elderly users and supports message sending and care workflows, the transmitted audio may reveal especially private data and should be treated as sensitive.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The ASR example hard-codes `language="zh"`, and the rest of the skill content and prompts assume Chinese-only interaction. This is a language-policy concern because the skill enforces a specific language/locale without documenting opt-in or offering a choice.

External Transmission

Medium
Category
Data Exfiltration
Content
### 语音合成(TTS)— 适老化参数

```bash
curl -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### 语音合成(TTS)— 适老化参数

```bash
curl -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### 语音合成(TTS)— 适老化参数

```bash
curl -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The code sends `language: zh` to ASR, and other requests also use `lang=zh`, making Chinese the mandatory language behavior. The file does not present this as a user-selected or region-justified constraint, so it constitutes a natural-language locale policy issue.

Context-Inappropriate Capability

Medium
Confidence
82% confidence
Finding
The manifest describes a phone-based elderly voice assistant, but the implementation invokes host binaries ('afplay', 'play', 'mpg123') via subprocess to play audio. Executing local programs is a broader host-control capability than the stated assistant purpose requires and is especially unjustified when the manifest does not mention shelling out or local binary execution.

External Transmission

Medium
Category
Data Exfiltration
Content
def tts_speak(text: str) -> None:
    """TTS 合成并播放,适老化参数"""
    payload = {**ELDERLY_TTS_PARAMS, "text": text}
    resp = requests.post(
        TTS_URL,
        headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
        json=payload,
Confidence
90% confidence
Finding
The TTS function transmits synthesized response text to an external provider, and those responses may contain sensitive content such as private messages, reminders, health-related prompts, or conversational data. In this skill's elderly-care context, externalizing potentially sensitive personal data without minimization or explicit disclosure increases privacy risk.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The scheduler performs inactivity monitoring and can notify family members without any visible consent, authorization model, or confirmation from the elderly user. This creates a privacy and autonomy risk because usage metadata and inferred welfare status are disclosed proactively to third parties, which is especially sensitive in a caregiving context.

Static analysis

No suspicious patterns detected.