Back to skill

Security audit

ai-literacy-expert-v3

Security checks for vulnerabilities and agentic risk

Overview

This is a Chinese AI-literacy teaching skill that coherently generates p5.js courseware, with some disclosed dependency and external-link risks users should handle carefully.

Before installing, understand that this skill is intended mainly for Chinese-language AI-literacy teaching and often produces executable HTML/JavaScript courseware. Prefer browser-console or pinned/local validation tools instead of running `npx -y acorn`, review any generated HTML before sharing with students, and be cautious with external IMA/CDN links or any generated demo involving cameras, microphones, uploads, localStorage, rules, hooks, or automation.

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/p5js-courseware-guide.md:343
Finding

Unpinned Package Download and Execution via npx

Content
View full analysis

Vulnerability Details

File Location: references/p5js-courseware-guide.md:343
Vulnerability Type: Unsafe third-party package retrieval and execution
Risk Level: Medium

Complete Code Snippet:

markdown
- If Node is unavailable, use `npx -y acorn` or the browser console for an equivalent syntax check.

Technical Analysis

The validation workflow recommends executing npx -y acorn without specifying an audited package version or integrity value. If acorn is not already available locally, npx can retrieve the package and its dependency tree from the configured npm registry and execute it automatically. The -y option suppresses the interactive confirmation that would otherwise alert the user to package installation.

Because the resolved package version can change after this Skill has been reviewed, the effective code executed by the instruction is not fixed by the repository. A compromised npm publisher account, registry, package release, transitive dependency, or registry configuration could therefore cause attacker-controlled code to run during a routine syntax check.

No evidence was found that the current acorn package is malicious. The vulnerability is the unpinned, automatically approved dependency-execution pattern.

Attack Path

  1. The Skill generates p5.js courseware and begins the prescribed syntax-validation workflow.
  2. The preferred local validation method is unavailable or the operator selects the documented fallback.
  3. The operator or Agent runs npx -y acorn.
  4. npx resolves the current package from the configured npm registry without a repository lockfile, fixed version, or integrity requirement.
  5. A compromised package release or dependency is downloaded and executed with the privileges of the invoking process.
  6. Malicious package code could access resources available to that user and process.

Impact Assessment

Exploitation could provide arbitrary code ...[truncated 540 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin acorn to a specifically reviewed version rather than resolving the latest release:
    bash
    npx --yes acorn@<reviewed-version>
    
  2. Prefer declaring the validator in devDependencies, committing a lockfile, and installing with:
    bash
    npm ci
    
  3. Invoke the locked local binary:
    bash
    npx --no-install acorn
    
  4. Configure npm integrity and provenance checks where supported, and use a trusted registry or internal package mirror.
  5. Run validation in a restricted container or sandbox without secrets, elevated privileges, or unnecessary filesystem and network access.
  6. Retain the browser-console alternative for environments where downloading dependencies is not explicitly authorized.
  7. Document the reviewed version and periodically reassess it for published security advisories before upgrading.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (14)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/p5js-courseware-guide.md (reported line 33)May include surrounding context.

代码引入标准

html
<!-- 主用 cdnjs,备用 jsdelivr(onerror 自动回退,避免单一 CDN 不可达导致白屏) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/2.0.3/p5.min.js"></script>
<script>
  if (typeof p5 === 'undefined') {

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/p5js-courseware-guide.md (reported line 33)May include surrounding context.

代码引入标准

html
<!-- 主用 cdnjs,备用 jsdelivr(onerror 自动回退,避免单一 CDN 不可达导致白屏) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/2.0.3/p5.min.js"></script>
<script>
  if (typeof p5 === 'undefined') {

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill auto-triggers full p5.js courseware generation based on broad phrases like '课件', '讲义', or '教学演示', and even defaults ambiguous requests such as '讲义' into code generation unless the user explicitly opts out. This can override user intent, cause unintended code output, and increase the chance that the agent produces executable HTML/JS in contexts where the user expected safer, simpler, or non-code teaching material.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The output specification states "中文回答", which forces a specific language for all responses. This is a natural-language locale policy constraint and the file does not offer user choice or clearly justify that the skill must operate only in Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all user-facing instructions and operational guidance exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains end-user instructional content only in Chinese, and it does not provide an opt-in, alternative language, or justification that the workflow is intended solely for a Chinese-speaking audience. Under the policy rule for language or locale constraints, forcing a specific language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

该文件全文以中文撰写,并在标题与内容中默认采用单一语言呈现,但没有说明是否支持其他语言,亦未提供用户选择语言的机制。根据语言/区域政策,若技能或参考文档对语言作出强制性限定而缺少用户选择或明确、合理的场景约束,可构成自然语言层面的政策问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill reference is written in Chinese and presents instructional content only in that language, with no indication that users may choose another language or that the material is restricted to a specific region or audience for compliance reasons. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file begins with a Chinese-only title and the entire teaching reference is written as if the skill content must be delivered in Chinese. Under the policy rule, forcing a specific language without user opt-in is a natural-language locale violation unless the restriction is explicitly justified as region-specific, which this document does not do.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

该教学参考文档从标题到正文均强制使用中文表述,并明确供教师直接使用,但没有提供其他语言选项、用户语言偏好机制,或说明仅适用于中文教学场景。按规则,未经过用户选择而固定语言/locale 属于自然语言政策问题。

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The guide instructs users to run npx -y acorn without pinning a specific version, which pulls whatever package version is current at execution time. This creates a supply-chain risk and harms reproducibility: a compromised or breaking upstream release could execute in the user's environment or change validation behavior unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt states '默认使用中文回答' and only switches language if the user explicitly specifies another language. This imposes a default locale/language preference rather than offering the user a choice up front, which matches the language or locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file is a lecture script written entirely in Chinese and presents the teaching content directly in that language, with no natural-language indication that learners may choose another language or locale. Under the policy rule, forcing a specific language without user opt-in can be a locale/language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file contains user-facing instructions exclusively in Chinese, including the title and all template fields. Under the policy rule for natural-language violations, forcing a specific language without offering the user a choice can be considered a locale or language policy issue.

Content

No source excerpt is available for this finding.