Back to skill

Security audit

Byted Voice To Text

Security checks for vulnerabilities and agentic risk

Overview

The skill performs legitimate cloud transcription work, but it also claims unsafe instruction priority, can make privileged system changes, and can send audio or credentials to environment-controlled endpoints.

Review this skill before installing. Use it only if you are comfortable sending audio to Volcengine/Bytedance services, avoid sensitive recordings unless you have the right approvals, preinstall ffmpeg yourself instead of allowing autonomous package installation, set only trusted HTTPS endpoints, and avoid providing ARK_SKILL_API_KEY unless you intentionally want the skill to manage and persist speech API keys.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (5)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:21
Finding

Skill instructions override normal agent routing and treat untrusted transcripts as user commands

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api_key.py:94
Finding

ARK bearer credential can be transmitted to an arbitrary environment-controlled endpoint

Content
View full analysis
str: _load_dotenv_if_available(_dotenv_path()) speech_key = os.getenv("MODEL_SPEECH_API_KEY", "").strip() if speech_key: return speech_key ark_key = os.getenv("ARK_SKILL_API_KEY", "").strip() base = os.getenv("ARK_SKILL_API_BASE", "").strip() if not ark_key or not base: return "" headers = { "ServiceName": "speech_saas_prod", "Authorization": f"Bearer {ark_key}", "Content-Type": "application/json", } list_url = _build_action_url(base, "ListAPIKeys") list_data = _post_json( list_url, headers=headers, payload={"ProjectName": project_name, "OnlyAvailable": True}, ) ``` The network sink used by this flow is: ```python def _post_json(url: str, headers: dict, payload: dict, timeout_s: int = 15) -> dict | None: if not url: return None data = json.dumps(payload, ensure_ascii=False).encode("utf-8") req = urllib.request.Request(url, data=data, method="POST") for k, v in (headers or {}).items(): if v is None: continue req.add_header(k, v) try: with urllib.request.urlopen(req, timeout=timeout_s) as resp: body = resp.read().decode("utf-8", errors="replace") return _extract_json(body) ``` ### Technical Analysis `ARK_SKILL_API_BASE` is accepted directly from the environment and used as the destination for HTTP requests carrying `Authorization: Bearer `. The code does not require HTTPS, validate the destination hostname, or restrict the destination to a trusted Volcengine service. Environment-based endpoint customization can be useful for testing, but attaching production cred ...[truncated 1387 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/asr_flash.py:39
Finding

ASR credentials and private audio can be uploaded to arbitrary configured endpoints

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/ensure_ffmpeg.py:52
Finding

Automatic ffmpeg installation performs privileged host-wide package and repository changes

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/api_key.py:64
Finding

Retrieved speech API keys are persisted to a dotenv file without safe file creation

Content
View full analysis
str: return os.path.join(os.path.dirname(os.path.abspath(__file__)), ".env") ``` ```python def _persist_env_to_dotenv_if_available(dotenv_path: str, key: str, value: str) -> None: value = (value or "").strip() if not value: return try: from dotenv import set_key except Exception: return try: os.makedirs(os.path.dirname(dotenv_path) or ".", exist_ok=True) set_key(dotenv_path, key, value, quote_mode="never") try: os.chmod(dotenv_path, 0o600) except Exception: pass except Exception: return ``` The persistence operation is invoked for both returned and newly created keys: ```python if first_key: os.environ["MODEL_SPEECH_API_KEY"] = first_key _persist_env_to_dotenv_if_available( _dotenv_path(), "MODEL_SPEECH_API_KEY", first_key ) return first_key ``` ```python if created_key: os.environ["MODEL_SPEECH_API_KEY"] = created_key _persist_env_to_dotenv_if_available( _dotenv_path(), "MODEL_SPEECH_API_KEY", created_key ) return created_key ``` ### Technical Analysis The helper automatically stores retrieved credentials in `scripts/.env`. The key is persisted in plaintext, and permissions are changed only after `set_key()` performs the write. The function does not verify that the target is a regular file, reject symbolic links, use exclusive creation, or perform an atomic secure replacement. Permission and persistence failures are silently ignored. Consequently, a pre-existing unsafe file, symbolic link, permissive creation mask, shared project directory, backup process, or source-control mistake can expose the credential. Persistence is not required for ...[truncated 1174 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (28)

Tainted flow: 'headers' from os.getenv (line 121, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/asr_flash.py (reported line 85)May include surrounding context.

python
}

    log(f"正在从飞书下载语音文件: file_key={file_key}")
    resp = requests.get(download_url, headers=headers, timeout=30)

    if resp.status_code != 200:
        fail(

Tainted flow: 'ASR_ENDPOINT' from os.getenv (line 39, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The ASR destination is fully overrideable via the MODEL_SPEECH_ASR_API_BASE environment variable, and the request includes authentication headers plus either raw audio content or a supplied audio URL. If an attacker can influence environment variables or runtime configuration, they can redirect requests to an arbitrary endpoint and capture API keys and sensitive audio data.

Content

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

python
}

    log("正在调用火山引擎 ASR...")
    resp = requests.post(ASR_ENDPOINT, json=payload, headers=headers, timeout=60)

    status_code = resp.headers.get("X-Api-Status-Code", "")
    if status_code != "20000000":

Tainted flow: 'ASR_STANDARD_SUBMIT_URL' from os.getenv (line 56, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/asr_standard.py (reported line 193)May include surrounding context.

python
log(f"正在提交标准版识别任务: task_id={task_id}")
    try:
        resp = requests.post(
            ASR_STANDARD_SUBMIT_URL,
            data=json.dumps(request_body),
            headers=headers,

Tainted flow: 'ASR_STANDARD_QUERY_URL' from os.getenv (line 60, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/asr_standard.py (reported line 238)May include surrounding context.

python
headers["X-Tt-Logid"] = x_tt_logid

    try:
        resp = requests.post(
            ASR_STANDARD_QUERY_URL,
            data=json.dumps({}),
            headers=headers,

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as an ASR/transcription tool, but it also instructs automatic system-level installation of ffmpeg/ffprobe, including potential sudo-based package installation and repository enablement. That is materially broader than simple transcription and can modify the host system in security-sensitive ways without a clear consent gate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is described as an ASR/transcription tool, but it also instructs automatic system-level installation of ffmpeg/ffprobe, including potential sudo-based package installation and repository enablement. That is materially broader than simple transcription and can modify the host system in security-sensitive ways without a clear consent gate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is described as an ASR/transcription tool, but it also instructs automatic system-level installation of ffmpeg/ffprobe, including potential sudo-based package installation and repository enablement. That is materially broader than simple transcription and can modify the host system in security-sensitive ways without a clear consent gate.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/api_key.py (reported line 64)May include surrounding context.

python
def _dotenv_path() -> str:
    return os.path.join(os.path.dirname(os.path.abspath(__file__)), ".env")


def _load_dotenv_if_available(dotenv_path: str) -> None:

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script explicitly seeks privilege escalation paths via sudo/root detection so it can perform package installation automatically. For a voice-to-text skill, autonomous privileged system administration is out of scope and dangerous because it can modify the host with elevated permissions, increasing blast radius if the skill is misused or chained with other weaknesses.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares shell, network, and environment-variable dependent behavior but does not constrain or document tool scope via explicit permissions/allowed-tools. That increases the chance an agent executes broader-than-expected commands, especially because the skill instructs running Python scripts, accessing external services, and modifying the local environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill sends user audio or audio URLs to an external ASR provider but does not prominently warn that potentially sensitive voice content will leave the local environment. This can lead to unintentional disclosure of personal, confidential, or regulated data, especially because the skill is triggered automatically for audio inputs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to automatically install ffmpeg/ffprobe when missing, but it does not provide a clear warning that this will change the local system and may require elevated privileges. Silent or implicit system modification is risky in agentic contexts because users may not expect package installations or repository changes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill contains logic to enumerate existing remote API keys and create new ones using a broader privileged token, which is beyond the narrow scope of speech-to-text transcription. This expands the skill from consuming a configured credential to provisioning credentials, increasing blast radius if the skill is invoked unexpectedly or abused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill persists a newly discovered or created API key to a local .env file, creating long-lived plaintext credential storage on disk. Even with a best-effort chmod, this can expose secrets to other local users, backups, logs, packaging workflows, or accidental source inclusion.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code automatically creates a service API key and stores it for future use without an explicit user-facing consent step. In a voice-to-text skill, silent credential provisioning is unnecessary for core functionality and can enable unintended account changes or persistence of access beyond the original session.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language documentation in Chinese and continues with Chinese-only user-facing messages throughout the CLI flow. The policy specifically flags language or locale constraints when a skill forces a specific language without user opt-in, and this script does not offer an alternative locale for its interface text.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script downloads audio from Feishu and then sends audio data or audio URLs to the Volcengine ASR service, which is a network operation involving potentially sensitive user data. Although there are operational log messages, there is no clear user-facing warning or explanatory comment/docstring disclosing that audio content will be sent to third-party services for processing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/asr_flash.py (reported line 168)May include surrounding context.

python
}

    log("正在调用火山引擎 ASR...")
    resp = requests.post(ASR_ENDPOINT, json=payload, headers=headers, timeout=60)

    status_code = resp.headers.get("X-Api-Status-Code", "")
    if status_code != "20000000":

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code uploads user-provided audio or audio URLs to an external third-party ASR service, including full local file contents when --file is used, but does not provide an explicit warning or consent check at the point of transfer. In an agent skill context that may process voice messages automatically, this can expose sensitive speech content to an external provider without the user's clear awareness.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring is entirely in Chinese and presents usage and behavior only in that language, with no indication that the user can choose another language or locale. This can violate language/locale policy when a skill imposes a specific language by default rather than offering an opt-in or documented regional constraint.

Content

No source excerpt is available for this finding.

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/ensure_ffmpeg.py (reported line 45)May include surrounding context.

python
def run_command(command):
    return subprocess.run(
        command,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script can enable additional repositories and install system packages, including fetching an RPM from an external repository URL, which expands system trust and changes host configuration beyond simple ASR logic. In an agent skill context, this creates unnecessary supply-chain and environment-modification risk because using the skill may trigger persistent system administration actions on the host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language policy violations include forcing a specific language without user opt-in. The module description, usage guidance, and comments are presented in Chinese only, and the file does not indicate that this is a region-specific tool or provide an alternative language option.

Content

No source excerpt is available for this finding.

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/inspect_audio.py (reported line 43)May include surrounding context.

python
def run_command(command, timeout_seconds=None):
    try:
        return subprocess.run(
            command,
            check=True,
            stdout=subprocess.PIPE,

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency is specified as requests>=2.28.0, which allows installation of many possible future or currently vulnerable versions and prevents reproducible builds. In a skill that processes audio from local files, URLs, and messaging platforms, a transitive install of an affected requests release could expose the skill to known client-side issues such as credential leakage or request-handling flaws.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
# Voice-to-Text skill dependencies
# Ref: https://www.volcengine.com/docs/6561/1354870
requests>=2.28.0