Back to skill

Security audit

Learning Path Navigator

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently generates personalized learning plans and does not request sensitive access, though it is Chinese-first and needs input limits before public service use.

Reasonable to install for Chinese-oriented learning-plan generation. Before exposing it as an API or shared service, add bounds and runtime validation for timeframe values, and clarify whether responses should follow the user's language preference.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
engine/router.js:217
Finding
Unbounded Schedule Parameters Allow Resource-Exhaustion Denial of Service<![CDATA[ ## Vulnerability Details **File Location**: `engine/router.js:8-17`, `engine/router.js:21-31`, and `engine/router.js:217-226` **Mirrored Source Location**: `engine/router.ts:27-47` and `engine/router.ts:222-230` **Vulnerability Type**: Uncontrolled resource consumption caused by missing input validation **Risk Level**: Medium ### Vulnerable Code ```javascript // Calculate the number of phases function calculatePhaseCount(totalWeeks) { if (totalWeeks <= 4) return 1; if (totalWeeks <= 8) return 2; if (totalWeeks <= 16) return 3; return Math.ceil(totalWeeks / 4); } // Generate learning phases function generatePhases(request, totalWeeks, hoursPerWeek) { const phases = []; const phaseCount = calculatePhaseCount(totalWeeks); const weeksPerPhase = Math.ceil(totalWeeks / phaseCount); const skills = request.goal?.skills || ['Related skills']; const targetLevel = request.goal?.targetLevel || 'intermediate'; // ... for (let i = 0; i < phaseCount; i++) { const phaseWeeks = Math.min( weeksPerPhase, totalWeeks - i * weeksPerPhase ); const phaseHours = hoursPerWeek * phaseWeeks; const weeklyBreakdown = []; for (let w = 0; w < phaseWeeks; w++) { weeklyBreakdown.push({ week: i * weeksPerPhase + w + 1, focus: `Week ${w + 1}`, hours: hoursPerWeek, resources: [ { type: 'course', title: `${skills[0] || 'Skill'} course`, duration: '4 hours', format: 'interactive' }, { type: 'exercise', title: 'Practical exercises', duration: '3 hours', format: 'interactive' }, { type: 'video', title: 'Supporting video tutorial', duration: '2 hours', format: 'video' }, { type: 'article', title: 'Reference reading', duration: '1 hour', ...[truncated 4427 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Implement runtime validation at the public handler boundary before performing date calculations or allocating schedule objects. 1. Require `totalWeeks` and `hoursPerWeek` to be finite positive integers. 2. Enforce conservative upper bounds appropriate to the product. For example: - `totalWeeks`: 1 through 260 - `hoursPerWeek`: 1 through 168 3. Reject invalid input with a structured validation error instead of silently applying defaults. 4. Validate arrays such as `goal.skills` and place limits on their length and individual string sizes. 5. Apply request-body size limits, rate limits, and execution timeouts at the service boundary. 6. Keep validation in shared code so the JavaScript runtime and TypeScript source cannot diverge. Example hardening: ```javascript function requireBoundedInteger(value, name, min, max, defaultValue) { const candidate = value === undefined ? defaultValue : value; if ( typeof candidate !== 'number' || !Number.isFinite(candidate) || !Number.isInteger(candidate) || candidate < min || candidate > max ) { throw new TypeError( `${name} must be an integer between ${min} and ${max}` ); } return candidate; } async function runDecisionEngine(request) { try { if (!request || typeof request !== 'object' || Array.isArray(request)) { throw new TypeError('Request must be an object'); } const totalWeeks = requireBoundedInteger( request.goal?.timeframe?.totalWeeks, 'totalWeeks', 1, 260, 12 ); const hoursPerWeek = requireBoundedInteger( request.goal?.timeframe?.hoursPerWeek, 'hoursPerWeek', 1, 168, 10 ); const phases = generatePhases(request, totalWeeks, hoursPerWeek); // Continue constructing the response. } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Invalid learning request' }; ...[truncated 280 chars]
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The title and primary description are entirely in Chinese, and all example interactions are presented only in Chinese. This indicates a language-specific skill behavior without any opt-in, alternative locale, or explanation that the skill is intentionally region-specific.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger phrases are broad, generic educational requests such as learning plans, resource recommendations, and skill assessment. This can cause the skill to activate unintentionally for ordinary user queries, creating routing ambiguity and increasing the chance that user intent is captured by the wrong skill, which may lead to confusing or inappropriate responses.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This JavaScript file contains natural-language comments and multiple user-facing output strings entirely in Chinese, indicating the skill effectively enforces a specific language. The policy for SQP-3 applies to all file types and disallows language or locale constraints unless the skill offers user choice or clearly documents a justified region-specific limitation.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This TypeScript file contains natural-language comments and multiple user-facing response strings entirely in Chinese, such as titles, recommendations, and error messages. Under the language/locale policy, forcing a specific language without user opt-in is a policy concern because users of other locales are not given a choice or fallback.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The file contains multiple user-facing comments and console messages in Chinese, including the test entrypoint output and example request content. This enforces a specific language experience without any visible opt-in, fallback, or documentation that the skill is intentionally region-specific.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The comments, test request content, and CLI output strings are written exclusively in Chinese, indicating a language-specific interaction pattern. The file does not provide any user opt-in, locale selection, or justification that this skill is intended only for a Chinese-language context.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The package description is written entirely in Chinese and presents the skill as a general-purpose learning-path generator, but it does not indicate that Chinese is optional or that the skill is limited to Chinese-speaking users. For a broadly applicable skill, this creates a natural-language locale constraint without user choice, which matches the language/locale policy violation criteria.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The description and most core instructions are written in Chinese, suggesting a default output or operating language, but the skill does not explicitly state that language choice is user-selectable. Because the policy category covers forced language or locale behavior, this is a mild natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
This TypeScript file includes natural-language comments exclusively in Chinese, such as the headings on L001, L009, and throughout the file. Under the policy rule for language/locale violations, forcing a specific language without user opt-in or documented justification can be a violation, and this file does not indicate any user language choice or region-specific scope.

Static analysis

No suspicious patterns detected.