Back to skill

Security audit

EastMoney Roadshow Digest (Transcript + Summary)|东方财富路演纪要生成

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for summarizing public EastMoney roadshows, but it needs Review because it can automatically send transcript text to external LLM providers and runs FFmpeg on upstream media URLs without tight bounds.

Install only if you are comfortable with public roadshow transcript text being sent to an external LLM whenever matching API keys are present in the environment. Run it in a constrained environment, unset provider API keys for local/rule-based output, and prefer network/process limits around FFmpeg until media URL validation, extraction timeouts, and pinned dependencies are added.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
providers/eastmoney.py:113
Finding

Unvalidated Upstream Media URL Passed to FFmpeg

Content
View full analysis
List[Dict[str, Any]]: out: List[Dict[str, Any]] = [] chapters = data.get("playback_chapter") or [] for idx, chapter in enumerate(chapters): for group in chapter.get("media_group") or []: media = group.get("media") or {} url = media.get("url") if not url: continue out.append( { "source": "playback_chapter", "chapter_index": idx, "format": media.get("format") or group.get("format"), "av_type": group.get("av_type"), "duration_seconds": media.get("duration"), "size_bytes": media.get("size"), "width": media.get("width"), "height": media.get("height"), "url": url.replace("http://", "https://", 1), } ) return out ``` `main.py:453-456`: ```python if page.media_candidates: report["steps"].append("media discovery: ok") media_url = page.media_candidates[0]["url"] try: audio_path = extract_audio(media_url, OUT) ``` `providers/asr.py:19-40`: ```python def extract_audio(media_url: str, out_dir: Path) -> Path: ffmpeg = shutil.which("ffmpeg") if not ffmpeg: raise ASRUnavailable("ffmpeg is not installed") out_dir.mkdir(parents=True, exist_ok=True) audio_path = out_dir / "audio.mp3" cmd = [ ffmpeg, "-y", "-i", media_url, "-vn", "-ac", "1", "-ar", "16000", str(audio_path), ] pr ...[truncated 2600 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
providers/asr.py:19
Finding

Unbounded FFmpeg Media Extraction Can Exhaust Host Resources

Content
View full analysis
Path: ffmpeg = shutil.which("ffmpeg") if not ffmpeg: raise ASRUnavailable("ffmpeg is not installed") out_dir.mkdir(parents=True, exist_ok=True) audio_path = out_dir / "audio.mp3" cmd = [ ffmpeg, "-y", "-i", media_url, "-vn", "-ac", "1", "-ar", "16000", str(audio_path), ] proc = subprocess.run(cmd, capture_output=True, text=True) if proc.returncode != 0: raise ASRError(f"ffmpeg extract failed: {proc.stderr[-600:]}") return audio_path ``` ### Technical Analysis The FFmpeg extraction subprocess has no timeout, input-size limit, media-duration limit, network transfer limit, output quota, or process resource limit. The `subprocess.run` call waits indefinitely for FFmpeg to exit. The later ASR stage has a nominal total timeout, but that limit does not cover this initial media retrieval and audio extraction. Consequently, the manifest's description of “bounded media+ASR” does not fully match the implementation. A slow, endless, malformed, or very large media source can keep FFmpeg active for an extended period. Audio is written under the fixed project `outputs/` directory and can continue consuming disk space. Capturing FFmpeg output in memory also creates an additional resource-consumption path if FFmpeg emits unusually large diagnostics. ### Attack Path 1. The upstream media candidate resolves to an oversized, extremely long, slow, endless, or deliberately malformed stream. 2. The Skill invokes FFmpeg without a subprocess deadline or media limit. 3. FFmpeg continues reading, decoding, and writing `outputs/audio.mp3`. 4. The worker remains occupied while CPU, bandwidth, memory, file descriptor ...[truncated 770 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Open-Ended Dependency Versions Prevent Reproducible Trusted Builds

Content
View full analysis
=2.31.0 faster-whisper>=1.1.0 av>=12.0.0 ``` Equivalent open-ended version declarations also appear in `manifest.json:23-27`, and `README.md:57-64` instructs users to install them: ```bash python3 -m pip install -r requirements.txt ``` ```bash python3 -m pip install requests>=2.31.0 faster-whisper>=1.1.0 av>=12.0.0 ``` ### Technical Analysis The dependency declarations define only minimum versions. A future installation can therefore resolve to package releases and transitive dependency versions that were not present during this audit. No malicious or typosquatted package was identified in the reviewed files; the package names are consistent with the declared functionality. The risk arises from non-reproducible resolution and the absence of integrity hashes, a lock file, or a documented trusted package index. Python package installation and later import can execute package-controlled code. Native-heavy dependencies such as `av` and `faster-whisper` also expand the supply-chain and binary attack surface. ### Attack Path 1. A user follows the documented installation command. 2. The package resolver selects the newest versions satisfying each lower bound, including transitive dependencies. 3. A selected future release, compromised package artifact, or dependency from an untrusted configured index contains malicious or vulnerable code. 4. The code executes during installation, import, model initialization, or normal Skill operation with the permissions of the user running the Skill. This is a supply-chain hardening weakness rather than evidence that any currently named dependency is malicious. ### Impact Assessment If dependency resolution is compromised, malicious package code could execute with the same operating-system and network privileges as the Skill instal ...[truncated 350 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 (22)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Keep `README.md`, `SKILL.md`, and `manifest.json` aligned on scope, inputs, outputs, and dependency expectations

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 69)May include surrounding context.

md
Install ffmpeg separately (examples):
- macOS: `brew install ffmpeg`
- Ubuntu/Debian: `sudo apt-get install ffmpeg`

## Run

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill declares behavior that uses environment variables, network access, shell execution, and file writes, but it does not declare an explicit tool/permission scope. That creates an under-specified trust boundary: a caller may invoke the skill without understanding that it can access provider keys, call external services, and execute local commands such as ffmpeg. In a skill package, missing scope disclosure is dangerous because it weakens review, sandboxing, and least-privilege enforcement.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly states that transcript or intermediate cleaned text may be sent to an external model service when LLM capability exists. Because this transmission is automatic and based on ambient environment capability rather than a per-run approval gate, sensitive or regulated transcript content could leave the local environment unexpectedly. Even if the source is a public roadshow, transcripts can include analyst names, contact details, or other content a host may not want exfiltrated to third-party providers.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill auto-detects a broad set of provider API keys and enables external model enhancement without an explicit approval step. This creates a data disclosure path triggered by ambient secrets in the runtime, so merely having unrelated API keys present can change behavior and cause transcript content to be transmitted externally. That is a real confidentiality and governance risk because execution becomes environment-dependent and non-obvious to operators.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill can transmit replay-derived transcript content to external LLM providers whenever matching API keys are present, despite being described as a bounded EastMoney replay transcript/summary tool. This creates a data-flow expansion beyond the apparent core purpose and can leak fetched content, metadata, and derived transcripts to third parties without an explicit opt-in gate in this file.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code opportunistically reads multiple environment API keys unrelated to EastMoney fetching or ASR and silently enables external LLM integrations. In shared agent environments, ambient credentials can activate network exfiltration behavior unexpectedly, violating least surprise and least privilege.

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 · main.py (reported line 154)May include surrounding context.

python
if os.getenv("OPENAI_API_KEY"):
        return {
            "provider": "openai",
            "base_url": "https://api.openai.com/v1",
            "api_key": os.getenv("OPENAI_API_KEY") or "",
            "model": "gpt-4o-mini",
        }

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 · main.py (reported line 169)May include surrounding context.

python
if moonshot_key:
        return {
            "provider": "moonshot",
            "base_url": "https://api.moonshot.cn/v1",
            "api_key": moonshot_key,
            "model": os.getenv("MOONSHOT_MODEL", "moonshot-v1-8k"),
        }

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This outbound POST sends transcript and prompt content to a third-party chat completions endpoint. In the skill context, that means replay-derived content leaves the local environment and is exposed to external providers whenever ambient credentials exist, which is a real external transmission risk.

Content

Scanner excerpt · main.py (reported line 199)May include surrounding context.

python
],
    }

    resp = requests.post(
        f"{cfg['base_url']}/chat/completions",
        headers={
            "Authorization": f"Bearer {cfg['api_key']}",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The LLM request sends user/content-derived transcript text to external APIs, but this file does not present a mandatory warning or consent check before doing so. Even if EastMoney content is public, the resulting transcript and processing context may still be subject to organizational restrictions, compliance requirements, or user expectations of local processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language prompts explicitly instruct the model to act as a Chinese financial audio/roadshow assistant and generate Chinese output, but the file does not offer a user opt-in or alternative locale. Under the policy, forcing a specific language without user choice is a locale-policy violation unless clearly justified and documented.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest emphasizes transcript generation for public replay content, but in the no-ASR path the code synthesizes transcript.md from title, intro, guest bios, and agenda metadata. Although the report notes the fallback, the produced transcript artifact is not an actual transcript of replay speech, which diverges from the claimed transcript-focused behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest frames the skill as a reliability-first transcript and summary tool for validated public EastMoney replay URLs, but this module achieves media handling by spawning the external ffmpeg binary through subprocess.run. While audio extraction/transcoding is related to transcription, arbitrary subprocess execution is a broader host capability than the manifest describes and is not explicitly justified in the stated scope.

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 · providers/asr.py (reported line 37)May include surrounding context.

python
"16000",
        str(audio_path),
    ]
    proc = subprocess.run(cmd, capture_output=True, text=True)
    if proc.returncode != 0:
        raise ASRError(f"ffmpeg extract failed: {proc.stderr[-600:]}")
    return audio_path

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 · providers/asr.py (reported line 63)May include surrounding context.

python
"16000",
        str(audio_path),
    ]
    proc = subprocess.run(cmd, capture_output=True, text=True)
    if proc.returncode != 0:
        raise ASRError(f"ffmpeg extract failed: {proc.stderr[-600:]}")
    return audio_path

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code forces language="zh" for all transcriptions, which imposes a specific language/locale behavior regardless of user intent. This matches the policy-violation category because there is no visible opt-in, fallback, or documented justification for restricting transcription to Chinese.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The function fetch_page issues HTTP requests to the supplied page URL and to the EastMoney detail API, transmitting the user-provided roadshow URL context and derived channel ID. In this code file there is no confirmation prompt, user-facing log/print, or comment/docstring warning that remote network access will occur.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a lower bound only, which allows future installs to resolve to different versions over time. This weakens build reproducibility and can unintentionally introduce vulnerable or incompatible releases into the skill's environment.

Content

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

text
requests>=2.31.0
faster-whisper>=1.1.0
av>=12.0.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

requests has multiple known advisories across its release history, and because the manifest does not pin a specific version, there is no way to verify that deployments avoid affected releases. In a skill that likely fetches public replay URLs over HTTP(S), a vulnerable requests version could expose network-handling weaknesses such as credential leakage or TLS/verification issues.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

Using faster-whisper>=1.1.0 permits uncontrolled upgrades to any newer release, making installations non-deterministic. In a transcription skill that relies on native/model-related packages, this can increase supply-chain and stability risk if a bad or compromised release is pulled.

Content

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

text
requests>=2.31.0
faster-whisper>=1.1.0
av>=12.0.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The av package is also unpinned, so builds may silently consume newer versions with different behavior or newly introduced flaws. Because multimedia parsing libraries often handle complex inputs, version drift can expand attack surface unexpectedly.

Content

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

text
requests>=2.31.0
faster-whisper>=1.1.0
av>=12.0.0