Back to skill

Security audit

experience-extraction-course-pro

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Chinese-language course-development assistant with a disclosed local file-reading helper and no evidence of hidden access, persistence, exfiltration, or destructive behavior.

Install this if you want a Chinese-language course-development workflow and are comfortable letting it read course files you explicitly point it at. Use a virtual environment, review documents before parsing untrusted PDFs or DOCX files, and prefer hash-verified dependency installation if your environment has stricter supply-chain requirements.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:18
Finding

Third-Party Dependencies Installed Without Integrity Verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:18-27
Vulnerability Type: Supply-chain risk from unverified package installation
Risk Level: Medium

Vulnerable Code

markdown
## Dependency Notes

`scripts/file_reader.py` is used to read `.docx` and `.pdf` materials and depends on the following Python packages:

- `python-docx==0.8.11`
- `PyPDF2==3.0.1`

Installation command:

```bash
pip install python-docx==0.8.11 PyPDF2==3.0.1
text

The dependencies are subsequently imported to parse user-controlled documents in `scripts/file_reader.py:29-54`:

```python
def read_docx(path: Path) -> str:
    try:
        from docx import Document
    except ImportError as exc:
        raise RuntimeError("Missing dependency: python-docx==0.8.11") from exc

    document = Document(str(path))
    paragraphs = [p.text.strip() for p in document.paragraphs if p.text.strip()]

    table_lines: list[str] = []
    for table in document.tables:
        for row in table.rows:
            cells = [cell.text.strip() for cell in row.cells]
            if any(cells):
                table_lines.append(" | ".join(cells))

    return "\n".join(paragraphs + table_lines)


def read_pdf(path: Path) -> str:
    try:
        from PyPDF2 import PdfReader
    except ImportError as exc:
        raise RuntimeError("Missing dependency: PyPDF2==3.0.1") from exc

    reader = PdfReader(str(path))

Technical Analysis

The installation instructions retrieve packages through pip without cryptographic hashes, a reviewed lockfile, an explicitly trusted package index, or artifact-integrity verification. Version pinning improves reproducibility but does not prove that the downloaded artifacts are authentic or approved.

Exploitation requires a supply-chain precondition, such as compromise of a configured package index, a malicious private mirror, dependency substitution caused by pip configuration, or ...[truncated 1709 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed requirements file containing exact versions and SHA-256 hashes for every direct and transitive dependency.
  2. Require hash verification during installation, for example:
    bash
    python -m pip install --require-hashes -r requirements.txt
    
  3. Generate the lock data from a controlled environment and retain reviewed artifacts or hashes in version control.
  4. Document the approved package index and avoid silently inheriting untrusted extra indexes or user-level pip configuration.
  5. Install dependencies in an isolated virtual environment under a non-administrative account.
  6. Establish a dependency-update process that checks vulnerability advisories, reviews release changes, regenerates hashes, and runs the test suite before adoption.
  7. Consider sandboxing document parsing when files may originate from untrusted users, limiting filesystem access, network access, memory, and execution time.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个复杂的企业培训课程生产/萃取技能,核心应包括内容分析、课程设计、教学产物生成以及可能的外部信息扩展与多轮交互。实际代码只是一个命令行脚本,用于从本地课程资料文件中提取文本,支持 txt/md/docx/pdf,且无任何课程生成、分析、结构化设计、外网访问或交互逻辑。虽然“读取课程资料文本”可以算是上游支持步骤,但该代码块本身的主要目的与声明的主要功能相差过大,因此属于明显不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个复杂的企业培训课程生成技能,核心能力应围绕知识提炼、课程设计和教学材料生成。但代码片段仅是 tests/test_file_reader.py 的测试代码,调用 scripts/file_reader.py 并检查其文件读取、Unicode输出、长文本不截断、中文帮助信息和文件不存在时报错等行为。这说明实际功能是文件内容读取/文本提取工具的测试,而不是培训课程生成系统。两者主目的和能力范围明显不一致,属于实质性描述与行为不匹配。

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_file_reader.py (reported line 19)May include surrounding context.

python
source = Path(temp_dir) / "source.md"
            source.write_text("中文资料\n⚠️ 风险提示\n🟢 可直接复用", encoding="utf-8")

            env = os.environ.copy()
            env["PYTHONIOENCODING"] = "cp936"

            result = subprocess.run(

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises or instructs use of code-capable operations such as shell execution and local file access, but does not declare any explicit tool scope or permission boundaries. This creates an overbroad-trust situation where an agent may invoke powerful capabilities without clear least-privilege constraints, increasing the risk of unauthorized file access, command execution, or abuse if the skill is used in a sensitive environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction '所有面向使用者的规则、解释、问题、模板字段、提示和报错使用中文' forces a specific language for all user-facing content. This is a natural-language policy concern because it removes user language choice and does not present the language restriction as an opt-in or clearly justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring, dependency/error strings, page markers, and argparse description/help are all written only in Chinese, which effectively constrains interaction to a specific language. The file does not offer any opt-in, locale selection, or justification that this is a region-specific tool, so it fits the language/locale policy-violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Line L91 states that all rules, explanations, prompts, and template fields must be in Chinese. This is a natural-language locale requirement that appears mandatory and does not provide opt-in, alternatives, or a documented region-specific justification.

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 · tests/test_file_reader.py (reported line 22)May include surrounding context.

python
env = os.environ.copy()
            env["PYTHONIOENCODING"] = "cp936"

            result = subprocess.run(
                [sys.executable, str(SCRIPT), "--file_path", str(source)],
                env=env,
                stdout=subprocess.PIPE,

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

python
content = "课程资料" * 5000
            source.write_text(content, encoding="utf-8")

            result = subprocess.run(
                [sys.executable, str(SCRIPT), "--file_path", str(source)],
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This test explicitly requires the script's help text and error messages to be in Chinese, which semantically enforces a fixed language behavior. The provided file does not indicate any user choice or documented region-specific justification, so this appears to violate the language/locale policy criterion.

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 · tests/test_file_reader.py (reported line 56)May include surrounding context.

python
self.assertEqual(result.stdout.rstrip("\r\n"), content)

    def test_help_and_errors_are_chinese(self) -> None:
        help_result = subprocess.run(
            [sys.executable, str(SCRIPT), "--help"],
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,

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 · tests/test_file_reader.py (reported line 69)May include surrounding context.

python
self.assertNotIn("max_pages", help_result.stdout)
        self.assertNotIn("max_chars", help_result.stdout)

        missing_result = subprocess.run(
            [
                sys.executable,
                str(SCRIPT),

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This test rejects English user-facing labels by asserting they must not appear anywhere in the skill or references, which semantically enforces a specific language for user-visible content. The file does not show any user opt-in or language-choice mechanism, so this appears to violate the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains natural-language instructions that are exclusively in Chinese, beginning with the title and usage guidance. Under the language/locale policy rule, forcing a specific language without user choice can be a policy violation when no opt-in or alternative is provided.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.