T09 · Insecure Skill Coding Practices
- Location
SKILL.md:29- Finding
SenseAudio API Key Disclosed by Documented Environment Check
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears to perform its stated audio/video auditing function, but it uploads potentially sensitive media to an external transcription service and has avoidable API-key exposure risks.
Install only if you are comfortable sending selected audio or video content to SenseAudio and storing generated transcripts and audit reports locally. Avoid using command-line API-key arguments or printing the key; prefer an environment variable or credential store, and rotate the key if it has appeared in logs. Use a controlled output directory, delete transcripts when no longer needed, and avoid processing confidential or regulated recordings without appropriate consent and policy review.
SKILL.md:29SenseAudio API Key Disclosed by Documented Environment Check
scripts/audio_audit.py:442API Key Exposed Through Command-Line Arguments and Echoed Interactive Input
USAGE.md:8Unpinned Third-Party Dependency Installation
The README promotes enterprise meeting auditing, batch processing, and structured report generation for audio/video content, but it does not warn that these inputs and outputs may contain sensitive personal, confidential, or regulated data. In this context, omission of privacy and retention guidance can lead users to process or store transcripts and reports insecurely, increasing risk of unauthorized disclosure or compliance violations.
The skill instructs the agent to access environment variables, read and write local files, invoke shell commands, and call an external network service, but it declares no explicit tool or permission scope. That mismatch makes it easier for the skill to be over-privileged at runtime and increases the chance of unintended file access, secret exposure, or command execution beyond the user’s expectation.
The trigger phrases are very broad, everyday requests like auditing an audio or checking a video, without clear constraints on what files, locations, or confirmation steps are in scope. This can cause the skill to activate in situations where the user did not intend shell execution, file processing, or external upload of media content, especially because the workflow sends content to a third-party ASR service.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
pip install requests
# 系统依赖
sudo apt install ffmpeg # 视频音频提取
# 配置环境变量(添加到 ~/.bashrc 或 ~/.zshrc)
export SENSEAUDIO_API_KEY="你的 SenseAudio API 密钥"
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
pip install requests
# 系统依赖
sudo apt install ffmpeg # 视频音频提取
# 配置环境变量(添加到 ~/.bashrc 或 ~/.zshrc)
export SENSEAUDIO_API_KEY="你的 SenseAudio API 密钥"
The guide says transcripts are automatically produced and then used for deeper semantic review, and it documents saving full transcript files locally, but it does not clearly warn users that highly sensitive spoken content may be transmitted to external services and persisted on disk. For an audio/video auditing tool, transcripts can contain PII, confidential business discussions, health data, or regulated content, so missing disclosure and retention guidance creates a real privacy and data-handling risk.
The script is hardwired to transmit media to an external endpoint, creating a real data egress path for potentially sensitive recordings. In the context of an audio/video audit tool, this is more dangerous than generic telemetry because users may run it on confidential meetings, customer calls, or regulated content, and the transmission occurs as part of core functionality rather than an optional clearly disclosed add-on.
# ============== 配置 ==============
SENSEAUDIO_API_KEY = os.environ.get("SENSEAUDIO_API_KEY", "")
ASR_API_URL = "https://api.senseaudio.cn/v1/audio/transcriptions"
MAX_FILE_SIZE = 10 * 1024 * 1024 # 10MB
ASR_MODELS = {
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"-vn", "-acodec", "pcm_s16le", "-ar", "16000", "-ac", "1",
output_path,
]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"ffmpeg 提取音频失败:\n{result.stderr}")
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def split_audio(audio_path: str, output_dir: str, chunk_duration: int = 55) -> list:
cmd = ["ffprobe", "-v", "error", "-show_entries", "format=duration",
"-of", "default=noprint_wrappers=1:nokey=1", audio_path]
duration = float(subprocess.run(cmd, capture_output=True, text=True, check=True).stdout.strip())
if os.path.getsize(audio_path) <= MAX_FILE_SIZE:
return [(audio_path, 0.0, duration)]
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
cmd = ["ffmpeg", "-y", "-i", audio_path,
"-ss", str(start), "-t", str(chunk_duration),
"-c", "copy", chunk_path]
subprocess.run(cmd, capture_output=True, text=True)
chunk_end = min(start + chunk_duration, duration)
if os.path.exists(chunk_path) and os.path.getsize(chunk_path) > 0:
chunks.append((chunk_path, start, chunk_end))
The function uploads user-provided audio to a third-party ASR service and receives derived transcript data without presenting a clear, contextual privacy warning or explicit consent step at the point of transmission. Because this skill is specifically designed for auditing potentially sensitive audio/video content, the transmitted material may contain personal data, confidential speech, or regulated content, making silent external transfer materially risky.
The README is entirely in Chinese and presents the skill as a Chinese-language experience, but it does not indicate that language choice is optional or that the locale restriction is required for a region-specific use case. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.
The natural-language instructions and usage guidance are presented entirely in Chinese, and the file does not indicate that users may choose another language or locale. This can violate language-choice policy when the skill is not clearly documented as region-specific or opt-in for Chinese-only use.
A language or locale policy issue applies to all file types when the skill effectively forces a specific language without user opt-in. This document presents all instructions and examples only in Chinese, with no note about multilingual support or language choice.
The module docstring and CLI descriptions are presented only in Chinese, which effectively forces a specific language for user interaction. Under the language/locale policy, this is a natural-language constraint unless the skill offers an explicit language choice or documents that the locale restriction is required.