Back to skill

Security audit

研究生组会录音智能总结助手。和老师讨论/组会汇报的录音,调用skill可以有针对性的识别出学生和老师的内容,同时以老师的内容为重点进行内容总结,根据用户指令,自定义选择以文本展示或者音频展示。

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it handles sensitive recordings with under-scoped network and runtime-install behavior that users should review carefully.

Install only if you are comfortable uploading recordings and generated summaries to SenseAudio and storing raw transcripts locally. Use it with non-confidential material or approved recordings, avoid setting SENSEAUDIO_API_BASE except to a trusted official endpoint, and prefer an environment where dependencies are preinstalled rather than allowing runtime pip installation.

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

Error
Location
scripts/main.py:96
Finding
Arbitrary API endpoint can receive the bearer token and sensitive academic content<![CDATA[ ## Vulnerability Details **File Location**: `scripts/main.py:96-100`, `scripts/main.py:157-164`, `scripts/main.py:209-215`, `scripts/main.py:540-541` **Vulnerability Type**: Unrestricted sensitive-data transmission to a configurable network endpoint **Risk Level**: High ### Vulnerable Code ```python class SenseAudioClient: def __init__(self, api_key: Optional[str] = None, api_base: Optional[str] = None): self.api_key = (api_key or os.getenv("SENSEAUDIO_API_KEY", "")).strip() self.api_base = (api_base or os.getenv("SENSEAUDIO_API_BASE", DEFAULT_API_BASE)).rstrip("/") ``` ```python with audio_path.open("rb") as audio_file: files = {"file": (audio_path.name, audio_file, guess_mime_type(audio_path))} response = requests.post( f"{self.api_base}{ASR_API_PATH}", headers=self.headers_auth_only, data=data, files=files, timeout=600, ) ``` ```python response = requests.post( f"{self.api_base}{TTS_API_PATH}", headers=self.headers_json, json=payload, timeout=300, ) ``` ```python parser.add_argument("--api-key", help="Override the API key from the environment") parser.add_argument("--api-base", help="Override the API base from the environment") ``` ### Technical Analysis The client obtains its API destination from either the `--api-base` command-line argument or the `SENSEAUDIO_API_BASE` environment variable. The value is only normalized by removing trailing slashes. It is not restricted to HTTPS and is not checked against the official SenseAudio hostname. Both network operations attach the SenseAudio bearer token to requests sent to this configurable destination: - The ASR operation transmits the authorization token and the complete user-selected recording. - The TTS operation transmits the authorization token and the complete summary text. - An HTTP endpoint would expose these values to network interception. - An attacker-controlled HTTPS endpoint would receive them d ...[truncated 1562 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict the default destination to the documented official endpoint: - Scheme: `https` - Hostname: `api.senseaudio.cn` - Expected port: `443` 2. Parse the destination with `urllib.parse.urlparse` and reject: - Plain HTTP URLs. - URLs containing user information. - Unexpected ports. - Unapproved hostnames. - Malformed URLs or URL fragments. 3. Do not attach the authorization header until the parsed destination has passed validation. 4. If private or enterprise endpoints must be supported, use an explicit administrator-managed hostname allowlist rather than accepting arbitrary user input. 5. Consider removing `--api-base` from ordinary user-facing commands. Place alternate endpoint configuration in trusted deployment configuration instead. 6. Add clear consent messaging before uploading recordings, stating that audio and summary text will be transferred to SenseAudio. 7. Add automated tests proving that HTTP, loopback, link-local, private-network, and unapproved public destinations are rejected. 8. Ensure error messages and diagnostic logs never include bearer tokens or full sensitive payloads. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/main.py:22
Finding
Unpinned dependency is installed automatically during program startup<![CDATA[ ## Vulnerability Details **File Location**: `scripts/main.py:22-50` **Vulnerability Type**: Automatic installation of an unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```python def ensure_python_package(import_name: str, pip_name: Optional[str] = None) -> None: pip_name = pip_name or import_name try: importlib.import_module(import_name) return except ImportError: pass result = subprocess.run( [sys.executable, "-m", "pip", "install", pip_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, ) if result.returncode != 0: raise RuntimeError(result.stderr.strip()) importlib.import_module(import_name) ensure_python_package("requests") import requests ``` ### Technical Analysis When `requests` is unavailable, importing or starting the script automatically executes pip and installs the package without: - A pinned version. - A lockfile. - Package hash verification. - A trusted package-index restriction in the command. - An explicit setup phase or user confirmation. Python package installation can execute package build or installation logic with the privileges of the current process. The installed version and source also depend on the active pip configuration, environment variables, and configured package indexes. Although `requests` is a legitimate package, resolving an unconstrained dependency dynamically at runtime creates a supply-chain trust boundary that is unnecessary for the Skill's ASR/TTS operation. ### Attack Path 1. The runtime environment does not already contain an importable `requests` package. 2. An attacker controls or influences pip configuration, package-index settings, a package mirror, DNS/network resolution, or the environment used for installation. 3. The Skill starts and calls `ensure_python_package("requests")`. 4. The script invokes `python -m pip install requests` without a version or hash c ...[truncated 991 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic package installation from module import and runtime command execution. 2. Declare `requests` as an explicit project dependency in a standard dependency manifest. 3. Pin the package to a reviewed version or tightly controlled compatible range. 4. Generate a lockfile and verify package hashes during installation. 5. Perform dependency installation in a separate, explicit build or deployment phase. 6. Configure installation to use a trusted package index and authenticated internal mirror where appropriate. 7. Run the Skill in a dedicated virtual environment or container under a minimally privileged account. 8. Fail safely with a concise setup instruction if the dependency is missing rather than modifying the environment automatically. 9. Add dependency vulnerability scanning and periodic controlled update review to the release process. ]]>
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
14. 不要绕到其他 TTS skill 或手工拼路径回复。会议摘要语音必须通过本 skill 的 `scripts/main.py tts` 或 `scripts/main.py run` 生成。
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill invokes shell commands, reads/writes local files, uses environment variables, and makes network calls, but it does not declare any tool scope restrictions such as allowed-tools or permissions. That creates an overly broad execution surface where the agent may use more capabilities than users expect, increasing the chance of unintended command execution, file exposure, or external data transmission.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This skill processes potentially sensitive academic discussion recordings and writes transcripts, diarized text, LLM input files, and audio summaries to local storage, but it does not prominently warn the user about that data handling. Users may unknowingly expose unpublished research, advisor feedback, personal data, or confidential institutional information through persistent local artifacts and external API submission.

Ssd 3

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs the agent to persist raw transcripts, diarized transcripts, verbose ASR JSON, and `llm_meeting_input.txt`, all of which may contain highly sensitive meeting content. Persisting these artifacts by default increases the risk of local disclosure, accidental reuse by other tools, and retention of more data than is necessary for the user’s immediate task.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The instructions prescribe `--language zh` in the standard execution flow and repeatedly describe the workflow as producing a final Chinese summary text, without offering a user choice of language or documenting a justified region-specific limitation. This is a natural-language locale policy issue because the skill effectively forces a specific language by default.

Ssd 3

Medium
Confidence
93% confidence
Finding
The default delivery instructions tell the agent to return paths to raw transcript files, encouraging disclosure and continued access to sensitive discussion content beyond the summarized result. Even if the path is only local, surfacing it normalizes retention and may expose confidential research discussions to anyone with filesystem access or later tool runs.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The default prompt is written in English and directs a specific output behavior even though the skill metadata and intended users are Chinese-speaking. This mismatch can cause the skill to respond in the wrong language or apply role/summary assumptions without user opt-in, which may distort academic content and reduce user awareness of what processing is being performed.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill enables implicit invocation without any trigger constraints, so the agent may auto-select it in contexts the user did not clearly intend. Because this skill processes recordings and produces summaries, unintended invocation could cause privacy-sensitive academic discussions to be transcribed or summarized without sufficiently explicit user consent.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The prompt explicitly requires the final spoken summary to be in Chinese and gives Chinese-only phrasing conventions. This is a natural-language locale constraint, and the file does not offer opt-in, fallback, or user choice for language.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
Auto-installing Python packages at runtime is a real supply-chain risk and is unrelated to the stated purpose of meeting transcription and summary packaging. It allows the skill to modify the host environment and fetch executable code from external infrastructure without prior approval, which is especially risky in agent or shared execution contexts.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
except ImportError:
        print(f"缺少 {pip_name},正在自动安装...", file=sys.stderr)

    result = subprocess.run(
        [sys.executable, "-m", "pip", "install", pip_name],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
Confidence
93% confidence
Finding
The script automatically executes `pip install` at runtime when `requests` is missing. Although it does not invoke a shell, it still causes code from an external package index to be fetched and installed during execution, which expands the trust boundary and can lead to arbitrary code execution through dependency confusion, malicious mirrors, or compromised package distribution. In a skill that processes academic recordings, this behavior is not necessary for core functionality and makes the environment materially less safe.

External Transmission

Medium
Category
Data Exfiltration
Content
},
        }
        try:
            response = requests.post(
                f"{self.api_base}{TTS_API_PATH}",
                headers=self.headers_json,
                json=payload,
Confidence
80% 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
95% confidence
Finding
The transcribe and run commands default `--language` to `zh`, and the file-level instructions and prompts are written to process content in Chinese-specific meeting contexts. This imposes a language/locale choice by default rather than offering a neutral default or explicit user opt-in, which matches the language/locale policy violation category.

Description-Behavior Mismatch

Low
Confidence
79% confidence
Finding
The stated scope is converting small academic discussions into minutes and extracting role-specific discussion points. The implementation additionally requests `enable_sentiment` from the ASR service and injects sentiment labels into diarized output, which expands behavior beyond the manifest's described outputs.

Static analysis

No suspicious patterns detected.