T02 · Agent Memory Poisoning
- Location
scripts/douyin.py:33- Finding
Untrusted transcription content is silently written to persistent Agent memory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Douyin transcription skill is mostly purpose-aligned, but it automatically sends media to remote/cloud transcription integrations and writes transcript excerpts into persistent memory without clear per-run consent or controls.
Review this skill carefully before installing. Use it only if you are comfortable with audio/video content being processed by qwen-asr or Tencent Cloud when available, and with transcript excerpts being stored in a local memory-manager skill. Avoid sensitive meetings, private conversations, credentials, or regulated data unless remote ASR and memory storage are disabled or removed. Prefer pinned dependencies and an isolated environment for setup.
scripts/douyin.py:33Untrusted transcription content is silently written to persistent Agent memory
scripts/douyin.py:63Local audio may be delegated to remote ASR integrations without per-file consent
setup.sh:27Installer resolves unpinned third-party dependencies in the active Python environment
scripts/douyin.py:157Insufficient validation of MCP-provided download URLs permits requests to unintended hosts
The skill claims 'zero paid dependencies' and presents reassuring safety language, yet the documented behavior includes optional remote/cloud services (qwen-asr, Tencent Cloud, mcporter/MCP) and possible persistent storage via memory-manager. This mismatch is dangerous because users may provide Douyin links, audio, and transcript data under false assumptions about locality, cost, and retention, increasing the risk of privacy exposure and unauthorized external data transfer.
The README advertises remote/cloud ASR engines such as qwen-asr and Tencent Cloud as part of the automatic fallback chain, but it does not clearly disclose that user audio or derived text may be transmitted off-device. This creates a meaningful privacy risk because users may unknowingly send potentially sensitive voice content to third-party services during normal operation or automatic downgrade behavior.
The skill documents shell execution and file writes (setup.sh, Python subprocess calls to curl, ffmpeg, uv, mcporter, and writes to ~/Desktop/...) but does not declare any explicit tool scope such as permissions or allowed-tools. This creates a transparency and consent gap: a host or user may treat the skill as lower-risk than it is, even though it can execute commands and persist files locally.
The skill's advertised purpose is Douyin processing, but it also persists transcript content into a separate memory-manager skill. That is a scope expansion and hidden data flow that users would not reasonably expect, especially because transcripts may contain personal or sensitive information.
The skill silently forwards transcript excerpts into a separate memory subsystem, creating undisclosed secondary use of derived user data. Even if truncated, transcripts can contain names, credentials, or other sensitive content that should not be retained without consent.
The code stores transcribed content in plain language through a memory manager without consent, minimization, or visible retention controls. Because transcripts can contain sensitive or regulated data, persistent storage materially increases confidentiality and compliance risk if the memory store is accessed, reused, or leaked.
The skill automatically sends transcript snippets to a separate memory-manager subprocess for persistent storage without explicit user consent. This creates an unexpected data-retention channel for potentially sensitive audio/video content and expands exposure beyond the stated Douyin-processing function.
def memory_add(content, cat='knowledge'):
try:
subprocess.run(
['python3', MEMORY_CORE, 'add', content[:200], cat],
capture_output=True, text=True, timeout=5,
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run_cmd(cmd, timeout=60):
"""执行命令,返回 (returncode, stdout, stderr)"""
try:
r = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
return r.returncode, r.stdout, r.stderr
except Exception as e:
return -1, '', str(e)
The description emphasizes 'zero paid dependencies' and implies local tooling, but the normal ASR path prioritizes a remote qwen-asr service and may fall back to Tencent Cloud. This mismatch can mislead users about privacy, network use, and cost exposure.
Audio content is sent to remote/cloud ASR services in the normal processing path without a clear warning at the operation point. Since spoken content can include sensitive personal, business, or copyrighted material, undisclosed transmission to external services materially increases privacy and compliance risk.
The local Whisper transcription call hard-codes language='zh', which imposes a specific locale/language behavior regardless of user preference. The file does not present this as an optional or justified region-specific constraint, so it violates the language-choice policy.
Tencent Cloud ASR is included as a fallback, but that third-party data transfer is not clearly reflected in the skill's stated scope. Undisclosed cloud processing of user media can expose sensitive content and violate user expectations or organizational policy.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
vid, title, dl_url = douyin_parse(url)
if dl_url:
log('直链下载...')
rc = subprocess.run([
'curl', '-sL', '-o', save_path,
'-H', 'User-Agent: Mozilla/5.0',
'-H', 'Referer: https://www.douyin.com/',
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"""ffmpeg 提取音频"""
base = Path(video_path).stem
audio_path = os.path.join(OUTPUT_DIR, f'{base}.mp3')
rc = subprocess.run([
'ffmpeg', '-y', '-i', video_path, '-vn',
'-acodec', 'libmp3lame', '-ab', '128k',
'-ar', '16000', '-ac', '1', audio_path,
After video transcription, the skill automatically logs transcript content into memory as 'knowledge', persisting user-derived data beyond the immediate task. In the context of media processing, this is especially risky because users expect transformation of content, not secondary retention in another subsystem.
Audio transcription results are also automatically retained in memory, extending the same privacy issue to standalone audio processing. This broadens the exposure surface because any local audio file processed by the tool may be silently copied into another persistent store.
This shell script presents its title, status messages, error guidance, and usage instructions entirely in Chinese, which imposes a specific language on all users. The file contains no option to select another language and no explanation that the skill is intended only for a Chinese-speaking or region-specific audience.
All user-facing instructions and descriptions in this file are written in Chinese, and there is no indication that the user can choose another language or that the skill is intentionally restricted to a Chinese-speaking audience for a documented reason. This can conflict with a language/locale policy that requires user opt-in or explicit justification for forced language use.
The README explicitly says results are automatically saved to the Desktop and that setup creates an output directory, but it does not clearly warn users that running the skill will write files to the local filesystem. This is a transparency and consent issue: unexpected file creation can surprise users, overwrite expectations about where data is stored, and expose sensitive transcripts on a shared machine.
The dependency is specified with a lower bound only, which allows future installs to pull any newer release, including versions with breaking changes or newly introduced vulnerabilities. In a security-sensitive automation skill that handles media processing and network access, this weakens build reproducibility and increases supply-chain risk over time.
faster-whisper>=1.0.0
ffmpeg-python>=0.2.0
edge-tts>=6.1.0
requests>=2.31.0
Using an unpinned ffmpeg-python version permits installation of arbitrary later releases, making builds non-reproducible and increasing exposure to upstream compromise or unsafe changes. Because this skill processes untrusted media content, dependency drift in media tooling can meaningfully expand attack surface.
faster-whisper>=1.0.0
ffmpeg-python>=0.2.0
edge-tts>=6.1.0
requests>=2.31.0
The edge-tts dependency is not pinned, so deployments may resolve to different versions over time with different security properties. This creates avoidable supply-chain and stability risk, especially for an automation tool that may run unattended and process externally sourced content.
faster-whisper>=1.0.0
ffmpeg-python>=0.2.0
edge-tts>=6.1.0
requests>=2.31.0
An unpinned requests dependency is more concerning because the package has a history of published advisories, and a lower-bound constraint does not ensure a safe version is installed. Since this skill likely performs network operations, resolving to a vulnerable or unexpected requests release could expose credential leakage, TLS/verification issues, or other client-side security flaws depending on usage.
faster-whisper>=1.0.0
ffmpeg-python>=0.2.0
edge-tts>=6.1.0
requests>=2.31.0
The manifest does not pin requests to a version, so it is impossible to verify from this file whether the installed release avoids known advisories. In a tool that likely makes outbound HTTP requests, this uncertainty is operationally dangerous because vulnerable client behavior may be introduced silently during installation or redeployment.
The code claims local Whisper processing but may trigger automatic model downloads on first use. This is not a severe exploit by itself, but it is a trust and supply-chain transparency issue because network access and large external artifacts are introduced without prominent warning.