Back to skill

Security audit

心理学数据分析(统计检验、结果解读)

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local psychology statistics assistant with some documentation and implementation gaps, but no evidence of hidden access, persistence, exfiltration, or destructive behavior.

Install only in a virtual environment, prefer pinned dependency versions, and treat mediation, moderation, and chi-square modes as unreliable until fixed. Use the skill with user-selected research datasets only, and verify statistical recommendations before relying on them in formal research.

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
references/python_guide.md:8
Finding

Unpinned Third-Party Dependencies Allow Non-Reproducible Package Installation

Content
View full analysis

Vulnerability Details

File Location: references/python_guide.md, line 8
Vulnerability Type: Unpinned third-party dependencies
Risk Level: Medium

Vulnerable Code

bash
pip install pandas scipy statsmodels scikit-learn matplotlib seaborn openpyxl

Related installation instructions also appear in:

  • scripts/python_analysis.py, line 50:
python
print("Error: reading SPSS .sav files requires pyreadstat: pip install pyreadstat")
  • scripts/python_analysis.py, lines 268 and 376:
python
print("Run: pip install statsmodels")

The quoted English messages above represent translations of the original user-facing text; the package installation commands themselves are unchanged.

Technical Analysis

The documented commands install packages without exact version constraints, integrity hashes, a lockfile, or an explicitly trusted package index. Package resolution therefore depends on mutable repository state at installation time. Transitive dependencies are also unconstrained.

This creates a supply-chain risk because a package release available after the Skill was audited may differ from the reviewed environment. A compromised upstream release, dependency-confusion condition caused by package-index configuration, or malicious transitive dependency could execute code during installation or when imported by the analysis script.

The audit found no evidence that the named packages are currently malicious and no evidence that the Skill intentionally retrieves a malicious dependency. The issue is the absence of controls that make dependency resolution reproducible and verifiable.

Attack Path

  1. A user follows the environment setup instructions or an error message recommending pip install.
  2. pip queries its configured package indexes and resolves the latest compatible direct and transitive dependencies.
  3. An attacker has compromised a resolved package release, published a malicious dependency selected through unsafe i ...[truncated 1001 chars]
Remediation
View remediation

Remediation Suggestions

  1. Create a reviewed dependency manifest containing exact versions for all direct dependencies.
  2. Generate and commit a lockfile that also fixes all transitive dependency versions.
  3. Record cryptographic hashes and require verification during installation, for example with pip install --require-hashes -r requirements.txt.
  4. Explicitly configure a trusted package index and avoid mixing public and private indexes with unsafe precedence.
  5. Include optional packages such as pyreadstat and statsmodels in the same controlled dependency set rather than recommending ad hoc installation.
  6. Require installation in a dedicated virtual environment with no administrative privileges.
  7. Add automated dependency scanning and scheduled review of pinned versions.
  8. Update documentation and runtime error messages to point to the locked installation procedure rather than standalone pip install PACKAGE commands.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill documentation claims capabilities that are not implemented consistently, including mediation/moderation analysis support and a chi-square CLI path that references an undefined function. In a data-analysis skill, this can cause runtime failures, misleading analytical guidance, or silent user trust in unsupported methods, which is dangerous because users may base research conclusions on invalid or incomplete analysis behavior.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
使用 `scripts/python_analysis.py`,支持:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
使用 `scripts/python_analysis.py`,支持:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
使用 `scripts/python_analysis.py`,支持:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match many generic requests such as '帮我分析数据' or '数据分析', which can cause the skill to activate outside narrowly intended psychology contexts. This increases the chance of inappropriate routing, over-collection of user data, or application of psychology-specific statistical guidance to unrelated domains.

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 documentation and CLI/help text entirely in Chinese, and the script's runtime messages are also presented only in Chinese. Under the stated policy, forcing a specific language without offering the user a language or locale choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

模块文档在开头明确宣称支持“中介、调节效应分析”,命令行参数也将 mediation、moderation、chi2 列为可选分析类型。但主分发逻辑中仅对 chi2 调用了未定义的 analyze_chi2,且 mediation、moderation 根本没有对应实现,导致声明能力与实际行为不一致。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

ArgumentParser 的 description 和 choices 向用户表明该脚本可执行 mediation、moderation、chi2 等分析,这属于面向用户的内联文档/接口说明。但实际代码没有实现 mediation、moderation,chi2 还会调用未定义函数,和帮助说明形成直接矛盾。

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 is entirely written in Chinese and does not offer any language or locale choice. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale-policy issue unless the regional constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents the skill guidance exclusively in Chinese, beginning with the title and continuing throughout the document, with no indication that the user can choose another language. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document title and introductory description are entirely in Chinese, and the skill does not indicate that language choice is optional or user-selectable. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.