Back to skill

Security audit

L6 Learning Accelerator

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its learning purpose, but its public import and export functions can read or overwrite arbitrary local file paths without guardrails.

Install only if you are comfortable with a learning-progress skill that exposes raw local file import/export. Avoid letting untrusted prompts or callers choose file paths, and prefer a version that restricts import/export to a dedicated progress-data directory, validates imported JSON, limits file size, and prevents silent overwrites.

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
src/progress.js:310
Finding

Unrestricted Caller-Controlled File Read and Write Paths

Content
View full analysis

Vulnerability Details

File Location: src/progress.js:310-344
Vulnerability Type: Arbitrary file read and overwrite through unrestricted path parameters
Risk Level: Medium

Vulnerable Code

javascript
/**
 * Export sessions to JSON
 * @param {string} filePath - File path to export to
 * @returns {boolean} Success
 */
function export_to_file(filePath) {
  try {
    const data = {
      sessions,
      milestones,
      exportedAt: new Date().toISOString()
    };
    fs.writeFileSync(filePath, JSON.stringify(data, null, 2));
    return true;
  } catch (error) {
    console.error('Export failed:', error);
    return false;
  }
}

/**
 * Import sessions from JSON file
 * @param {string} filePath - File path to import from
 * @returns {boolean} Success
 */
function import_from_file(filePath) {
  try {
    const data = JSON.parse(fs.readFileSync(filePath, 'utf8'));
    if (data.sessions) sessions = data.sessions;
    if (data.milestones) milestones = data.milestones;
    return true;
  } catch (error) {
    console.error('Import failed:', error);
    return false;
  }
}

Technical Analysis

The public export_to_file() and import_from_file() functions pass a caller-supplied path directly to fs.writeFileSync() and fs.readFileSync(). There is no approved base directory, path canonicalization, traversal check, symbolic-link protection, file-size limit, or imported-data schema validation.

Both functions are re-exported by index.js, making them part of the skill's public API. Consequently, any application or agent workflow that allows an untrusted party to influence the filePath argument can access paths outside the skill's intended storage area.

The import operation requires the target content to be valid JSON before it is loaded into application state. Nevertheless, an attacker can read any accessible JSON file and subsequently expose impo ...[truncated 2008 chars]

Remediation
View remediation

Remediation Suggestions

  1. Configure a dedicated progress-data directory and reject access outside it.
  2. Resolve both the approved directory and requested path with path.resolve(), then verify that the requested path remains beneath the approved directory using path.relative().
  3. Reject absolute paths when only application-relative filenames are required.
  4. Restrict accepted filenames and extensions, such as allowing only simple .json filenames.
  5. Use fs.realpath() and appropriate no-follow or preflight checks where symbolic-link attacks are relevant.
  6. Avoid silent overwrites. Require explicit overwrite authorization or use exclusive file-creation flags when creating new exports.
  7. Check file metadata before import and enforce a conservative maximum file size.
  8. Prefer asynchronous filesystem APIs to avoid blocking the event loop.
  9. Validate imported JSON against a strict schema before assigning sessions or milestones.
  10. Validate field types, timestamp formats, array lengths, and numeric ranges, and reject unexpected properties.
  11. Return structured errors without exposing sensitive filesystem details in production logs.
  12. Ensure the hosting process runs with least-privilege filesystem permissions.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (6)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` - This metadata file

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `src/temporal.js` - Time routing functions

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger list contains generic phrases such as "learning accelerator," "accelerated learning," and "study accelerator," which can plausibly appear in normal user conversation. This increases the chance of accidental skill activation, causing the agent to invoke retrieval and progress-tracking behavior when the user did not explicitly intend to use this skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module exposes arbitrary filesystem read and write operations through import_from_file and export_to_file, even though its stated role is in-memory progress tracking and reporting. If untrusted callers can influence filePath, this enables reading attacker-chosen local files into process memory and overwriting arbitrary writable files, expanding the skill's privileges beyond its functional need.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This is a markdown file, so SQP-2 applies to missing user warnings in the skill description. The API reference exposes export_to_file(path) and import_from_file(path) but the README does not warn that these operations affect local files or may overwrite/read user data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This test invokes progress.export_to_file(testFile), which writes data to disk, and then deletes the file during cleanup. Although this is test code, the safety-relevant file modification behavior is only asserted programmatically and is not accompanied by any user-facing warning, confirmation, or explanatory comment about writing to the filesystem.

Content

No source excerpt is available for this finding.