Back to skill

Security audit

Student AI Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is a broad homework automation package that creates submission-style academic work and tells the agent to install packages and run generated code without clear safety controls.

Install only if you intentionally want this exact academic-project automation and can review its outputs ethically. Before using it, run dependency installs in an isolated environment, require confirmation before file writes or code execution, inspect generated Python before running it, restrict report/PPT input paths to the project output folders, and do not rely on the bundled runner as proof that work was actually completed or validated.

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

Error
Location
SKILL.md:104
Finding

Untrusted Generated Code Is Executed Without Isolation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 104-134
Vulnerability Type: Unsafe execution of assignment-derived generated code
Risk Level: High

Vulnerable instructions:

markdown
### Step 3: 写代码

**AI 任务**:
1. 根据方案设计编写完整可运行的 Python 代码
2. 自带 mock 数据(不依赖外部 API 或付费数据集)
3. 代码必须能生成图表(matplotlib/seaborn)
4. 包含清晰注释和 docstring
5. 写 `requirements.txt`

**输出**:
- `output/code/main.py` — 主程序
- `output/code/requirements.txt` — 依赖

**约束**:
- 代码必须能 `python main.py` 一键运行
- 图片输出到 `output/figures/`
- 不使用需要 API key 的服务

---

### Step 4: 验证运行

**AI 任务**:
1. 实际运行 `output/code/main.py`
2. 确认无报错
3. 确认图片已生成到 `output/figures/`
4. 如果报错:修复代码 → 重跑,最多 3 次

Technical Analysis

The Skill treats assignment material as the specification for generating a Python program and subsequently directs the agent to execute that program. Assignment content is externally controlled and may contain adversarial requirements or prompt-injection text designed to make the generated program perform operations unrelated to the academic task.

The instructions do not require a security review, user confirmation, sandbox, filesystem allowlist, network restriction, process timeout, resource limit, or reduced-privilege execution environment. The prohibition on services requiring API keys does not prevent ordinary outbound connections, local file access, subprocess creation, or destructive filesystem operations.

The bundled scripts/workflow_runner.py only writes a template and does not execute it. The vulnerable execution path arises from the agent workflow mandated by SKILL.md, rather than an automatic subprocess call in the bundled runner.

Attack Path

  1. An attacker supplies an assignment document containing malicious or disguised implementation requirements.
  2. The agent processes those requirements during analysis and solution design.
  3. In Step 3, the agent incorporates attacker-influenced be ...[truncated 913 chars]
Remediation
View remediation

Remediation Suggestions

  • Explicitly classify all assignment documents and user-provided project requirements as untrusted data.
  • Add a non-overridable instruction stating that assignment content cannot redefine workflow rules, request unrelated system operations, or weaken security controls.
  • Require a security review of generated code before execution. Review file operations, process creation, dynamic imports, deserialization, network activity, and access to environment variables.
  • Require explicit user approval before running generated programs.
  • Execute generated code in an ephemeral sandbox or container with:
    • No mounted credentials or host secrets.
    • Read-only access to required inputs.
    • Write access limited to a dedicated output directory.
    • Outbound network access disabled by default.
    • No access to host process or administrative interfaces.
    • CPU, memory, file-size, process-count, and execution-time limits.
    • A non-privileged user identity.
  • Maintain an allowlist of permitted libraries and capabilities for generated programs.
  • Do not automatically retry code that triggers security-policy violations.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_report.py:84
Finding

Report Configuration Allows Unrestricted Local File Inclusion

Content
View full analysis

Vulnerability Details

File Location: scripts/generate_report.py, lines 84-105
Vulnerability Type: Arbitrary local file read and inclusion in generated documents
Risk Level: Medium

Vulnerable code:

python
# ---- Figures ----
if figures:
    doc.add_heading('Figures', level=1)
    for i, fig_path in enumerate(figures, 1):
        fig_path = Path(fig_path)
        if fig_path.exists():
            doc.add_picture(str(fig_path), width=Inches(5.5))
            caption = doc.add_paragraph(f'Figure {i}: {fig_path.stem}')
            caption.alignment = WD_ALIGN_PARAGRAPH.CENTER
            caption.runs[0].font.size = Pt(10)
            caption.runs[0].italic = True
            doc.add_paragraph()

# ---- Code Appendix ----
if code_file:
    code_path = Path(code_file)
    if code_path.exists():
        doc.add_page_break()
        doc.add_heading('Appendix: Source Code', level=1)
        code_text = code_path.read_text(encoding='utf-8')
        para = doc.add_paragraph()
        run = para.add_run(code_text)
        run.font.name = 'Consolas'
        run.font.size = Pt(8)

Technical Analysis

The report generator accepts figures and code_file paths from a JSON configuration and uses them without validating that they remain inside an approved project directory. Absolute paths, parent-directory traversal, and paths resolving through symbolic links are not rejected.

The code_file field is particularly significant because any existing, readable UTF-8 text file can be copied into the DOCX appendix. The figures field also accepts arbitrary readable image paths. Checking only Path.exists() does not establish that a file is authorized or appropriate for inclusion.

The generator does not transmit the resulting report itself. Disclosure occurs if an operator submits or shares a generated document without realizing that external local content was embedded.

Attack

...[truncated 1199 chars]

Remediation
View remediation

Remediation Suggestions

  • Define separate allowlisted roots for code and figure inputs, such as output/code and output/figures.
  • Resolve both the candidate path and approved root with Path.resolve() before use.
  • Verify containment using candidate.is_relative_to(approved_root) on supported Python versions, or a robust equivalent.
  • Reject absolute paths, parent-directory traversal, and symbolic links that resolve outside the approved root.
  • Require regular files and allow only expected extensions, such as .py for source appendices and approved image formats for figures.
  • Enforce file-size limits before reading or embedding files.
  • Validate the complete JSON document against a strict schema.
  • Present a manifest of all files that will be embedded and require confirmation before generating a distributable report.
  • Open files defensively and report rejected paths rather than silently ignoring them.

T08 · Insecure Dependencies

Note
Location
SKILL.md:42
Finding

Dependency Installation Is Not Reproducibly Locked

Content
View full analysis

Vulnerability Details

File Locations:

  • SKILL.md, lines 42-45
  • README.md, lines 23-26
  • package.json, lines 6-8

Vulnerability Type: Unpinned and globally installed third-party dependencies
Risk Level: Low

Vulnerable installation instructions:

bash
pip install python-docx matplotlib numpy pandas Pillow
npm install -g pptxgenjs

Mutable npm dependency declaration:

json
"dependencies": {
  "pptxgenjs": "^3.12.0"
}

Technical Analysis

The Python installation instructions do not pin package versions or hashes. The npm dependency uses the caret range ^3.12.0, allowing later compatible versions, and the audited project contains no dependency lockfile. The instructions additionally recommend installing pptxgenjs globally, increasing its scope beyond the project environment.

The referenced package names are not visibly misspelled or sourced from suspicious registries, and no malicious dependency was confirmed. The security weakness is that future installations may resolve to versions different from those reviewed, making builds non-reproducible and implicitly trusting future package releases and their installation behavior.

Attack Path

  1. A user follows the documented installation commands.
  2. Package managers resolve the latest versions permitted at installation time rather than a reviewed, immutable dependency set.
  3. A compromised, malicious, or unexpectedly incompatible future release is selected.
  4. Package installation hooks or later imported package code executes under the installing user’s privileges.
  5. A global npm installation may affect other projects or commands available to that user.

Impact Assessment

If an upstream package or resolved release were compromised, code could execute with the privileges of the user running the package manager. The potential scope includes the user’s files and environment and, for a global installation, sy ...[truncated 231 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin Python packages to reviewed exact versions.
  • Generate a hash-locked requirements file and install with hash verification.
  • Commit an npm lockfile and use deterministic installation commands such as npm ci.
  • Replace the npm caret range with a reviewed exact version where appropriate.
  • Install Python dependencies in a dedicated virtual environment.
  • Install npm dependencies locally to the project rather than globally.
  • Run dependency vulnerability and provenance checks in continuous integration.
  • Review dependency updates explicitly instead of accepting them automatically.
  • Use a trusted package registry and prevent dependency-source overrides in untrusted project input.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个端到端、自动化的学术项目工作流系统,范围很广,强调从作业要求输入到多个最终交付物输出的完整流程。但提供的代码片段只处理单一子任务:根据已有的 PPT 大纲 JSON 生成演讲稿/备注 Markdown。它既不接收“作业要求”并展开全流程,也不生成 Word 报告、PPT 文件、代码、验证结果或 Q&A 模拟。因此,代码的实际主要用途与声明的整体能力存在明显不匹配。虽然演讲稿生成属于声明中某一步的相关子功能,但该片段远不足以支撑所宣称的完整技能描述。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个端到端的学术项目自动化系统,范围涵盖内容分析、开发、验证、文档生成与答辩准备。实际代码却只是单一的 PPT 生成器,输入是现成的 outline 数据,输出是 .pptx 文件。它没有看到任何接收“作业要求”并自动推进全流程的逻辑,也没有生成 Word 报告、编写/运行代码、验证结果、或模拟问答的实现。虽然代码支持在幻灯片中加入 notes,可被视为与演讲稿相关的辅助细节,但这远不足以匹配“生成 PPT + 演讲稿”及整个七步工作流的声明。因此描述与实际行为存在明显且实质性的不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个覆盖作业全流程的自动化学术项目系统,而代码片段实际只包含一个使用 python-docx 生成 .docx 报告的脚本。它能设置页面格式、写入标题页、目录占位符、正文、图片和源码附录,并保存文档;还可从 JSON 加载报告结构。代码没有体现需求分析、方案设计、代码生成、运行验证、PPT/演讲稿生成或 Q&A 模拟等能力。因此,声明与实际行为存在明显且实质性的能力范围不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description overstates the implementation substantially. While the script is organized around the same seven-step academic workflow, the actual behavior is limited to reading an assignment file and producing directory structure plus template artifacts such as JSON skeletons, a generic main.py template, and requirements.txt. It does not perform meaningful automatic analysis, design, implementation, execution, validation, Word/PPT generation, or fully populated Q&A preparation. The primary purpose is therefore closer to scaffolding a project workflow than automatically completing it and producing submission-ready deliverables.

Content

No source excerpt is available for this finding.

Ssd 4

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is explicitly designed to produce submission-ready academic work products that a student can pass off as their own, including code, report, slides, and defense preparation. This creates a high-risk deception workflow that facilitates academic fraud and can be triggered from ordinary homework-related prompts.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger phrases are broad enough to activate on common academic help requests, causing the skill to engage in a high-impact workflow with minimal user specificity. In this skill's context, that increases the chance of unintended invocation of file-writing, dependency-installation, and academically deceptive automation.

Content

No source excerpt is available for this finding.

Ssd 4

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The detailed sequence operationalizes end-to-end academic impersonation: generating polished deliverables and preparing the user to defend them in Q&A as if they had done the work themselves. The inclusion of presentation notes and predicted professor questions materially increases the deceptive effectiveness of the workflow.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README advertises very broad natural-language triggers such as '帮我做这个作业' and 'assignment/homework/final project', which can cause the skill to activate in situations where a user is only asking for general help rather than consenting to a full automation workflow. In this skill's context, unintended invocation is more dangerous because activation leads to a multi-step pipeline that may generate code and files automatically, amplifying the effect of a mistaken trigger.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README promises automatic completion of the workflow and generation of multiple artifacts but does not prominently warn users that running the skill will create directories and write many files. In this context, the omission matters because the skill is positioned as a one-command academic automation tool, so a user may trigger substantial filesystem changes without informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Defaulting the report language to English without explicit opt-in can cause outputs that do not match the user's expectations or assignment requirements. In an academic workflow skill, this is less severe than code execution issues, but it can still lead to incorrect deliverables and accidental policy or grading problems if the user does not notice the default.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill directs the agent to read and write multiple local files, but it does not declare any explicit tool scope, permissions, or allowed-tools boundaries. That creates an authorization gap where filesystem access may occur without transparent limitation, increasing the chance of unintended file access or modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Ambiguity around when full versus partial execution should occur can lead the agent to perform more actions than the user intended, including writing files or executing later-stage steps. That increases operational risk because sensitive or side-effectful actions may be triggered without clear user consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The dependency installation instructions tell the agent to install missing packages automatically and 'not block the user,' which implies modifying the local environment without informed consent. Package installation can alter system state, introduce supply-chain risk, and affect unrelated projects if done globally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs execution of generated code and local scripts, including retry loops after failures, without warning the user about command execution or filesystem side effects. Running generated code is a significant security boundary crossing because the code content is assignment-derived and may be unsafe, destructive, or environment-dependent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The note states that reports, PPTs, and Q&A should default to English, only switching when the user requests Chinese. This imposes a language preference without first offering the user a choice, which is a natural-language policy violation under the locale/language rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This JavaScript file contains natural-language comments and usage text in Chinese, and later prints a Chinese success message, without indicating that the skill is intended only for Chinese-speaking users or offering a language/locale choice. That can violate language/locale policy when users or maintainers are expected to interact in another language by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The console success message is emitted only in Chinese, which imposes a specific language on users of the script. The file does not provide any locale selection, fallback language, or justification for a Chinese-only interface.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language descriptions and user-facing strings in Chinese, which imposes a specific language on users without any opt-in or documented regional justification. That matches the language/locale policy violation category for all file types.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code embeds answer frameworks entirely in English while the surrounding skill description and output are primarily in Chinese. Additional English-only guidance appears later in the generated tips, which effectively steers users toward a specific language style without any opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language instructions contain prescribed English phrases such as "I haven't tested that scenario" and "Let me address the core of your question first...". Because the skill otherwise presents itself in Chinese and does not offer language selection, this imposes a locale/language policy choice on the user.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file header and skill metadata claim a fully automated workflow that produces directly submittable .docx, .pptx, and other finished artifacts, but the implementation only creates skeletal JSON/templates and a code stub. This is a security-relevant integrity issue because users may over-trust the agent's capabilities, submit incomplete or fabricated outputs, or rely on it for academic work under false pretenses.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python skill contains natural-language instructions and descriptions entirely in Chinese, including the top-level docstring and usage guidance. Because the file does not offer an alternative language, user opt-in, or any justification that the skill is intended only for a Chinese-speaking or region-specific context, it conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Step 4 claims to check code and generate output images, but it only writes a default checklist with all values false and performs no validation or execution. In this skill context, that can mislead users into believing code was tested and outputs were verified when no such assurance exists, undermining trust and enabling submission of unchecked results.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Step 5 is presented as generating a Word report (.docx), but it only saves a JSON outline. In an academic-submission workflow, this mismatch can cause users to believe a final report exists when only a structure template was produced, leading to integrity failures and possible last-minute submission mistakes.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Step 6 claims to generate a PPT and speaker notes, but it only emits a JSON outline and prints a path for notes that are never created. Because the skill advertises direct-submission presentation materials, this discrepancy can deceive users about deliverable readiness and create false confidence in nonexistent outputs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.