Back to skill

Security audit

Agent Learner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local logging utility for agent experiments, with disclosed plaintext storage and export features that users should handle carefully.

Install only if you are comfortable with agent prompts, evaluations, cost notes, and similar records being saved locally in plaintext under ~/.local/share/agent-learner. Do not log secrets, credentials, customer data, or proprietary prompts unless you control the machine and file permissions; treat exports as sensitive files.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:6
Finding

Persistent sensitive records are created without explicit restrictive permissions

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` User-provided values are subsequently written to category-specific files using the same permission model. For example: ```bash local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/prompt.log" ``` ### Technical Analysis The skill persistently records prompts, configurations, evaluations, costs, benchmark results, and other command arguments in plaintext files under `~/.local/share/agent-learner`. Neither the storage directory nor the generated log files are assigned explicit restrictive permissions. `mkdir -p` and shell redirection create resources according to the process's ambient umask. Under a permissive umask, the directory or files may be readable by other local users. This is especially relevant because prompts and configuration records may contain internal instructions, proprietary data, endpoint details, tokens, or other secrets accidentally supplied by a user. The issue affects both the category logs and `history.log`, because `_log` duplicates user-provided content into the history file. No encryption, secret filtering, or permission verification is performed. ### Attack Path 1. The skill runs in an environment with a permissive umask or otherwise permissive permissions on the user's home data directories. 2. A user invokes a data command with sensitive content, such as: ```bash agent-learner prompt "Internal system prompt containing confidential information" ``` 3. The script writes the content to `prompt.log` and duplicates it in `history.log`. 4. Another local account that can traverse the relevant home directories reads the ...[truncated 755 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:56
Finding

Untrusted log values are exported without JSON or CSV escaping

Content
View full analysis
"$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "" >> "$out" echo "]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ;; ``` ### Technical Analysis Values read from the log files are attacker-controlled or user-controlled data. They are inserted directly into JSON string literals without escaping quotation marks, backslashes, control characters, or embedded newlines. A crafted value can therefore corrupt the JSON document or inject additional JSON properties or objects into the exported representation. The CSV branch also concatenates fields without RFC 4180 quoting. Commas, double quotes, carriage returns, and newlines can alter columns or inject additional records. More importantly, values beginning with spreadsheet formula markers such as `=`, `+`, `-`, or `@` may be interpreted as formulas when the exported CSV file is opened in spreadsheet software. Shell quoting around `"$val"` prevents ...[truncated 2087 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is presented as a benchmarking/comparison tool, but the documented behavior substantially expands into persistent collection, indexing, audit logging, searching, and exporting of arbitrary user inputs. That mismatch matters because users may provide prompts, model outputs, evaluations, or configuration details assuming transient use, while the skill actually creates durable local records that broaden privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This skill encourages logging arbitrary prompts, evaluations, comparisons, and costs into plain-text files, but does not warn that those entries may contain sensitive information such as proprietary prompts, credentials pasted into examples, model outputs with personal data, or internal benchmark results. In this context, silent persistent storage increases the chance of accidental local disclosure and later unintended reuse or export of sensitive content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Documenting that every command execution is written to an audit history log without an accompanying privacy warning creates a hidden retention channel even for users who may think they are only viewing status or searching data. Because command usage itself can reveal sensitive operational patterns, prompt themes, filenames, or search terms, always-on audit logging increases exposure beyond the primary category logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The export feature aggregates stored logs into JSON, CSV, or TXT files, which makes mass disclosure easier if the exported files are copied, synced, or accessed by other local users or backup systems. Without a warning that exports may contain all previously logged sensitive content, users may underestimate the blast radius of a single export operation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a focused benchmarking/comparison skill for tuning strategies and evaluating outputs. In contrast, the help text and dispatch implement a broad command set such as configure, fine-tune, optimize, test, report, export, search, recent, and status, and each command simply records arbitrary input to local log files rather than performing benchmarking or comparison logic.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script provides broad local search, recent-history viewing, status reporting, and export of accumulated logs, which expands data exposure beyond the stated benchmarking purpose. In an agent-skill context, prompts, evaluation outputs, or other sensitive content may be stored and later enumerated or exfiltrated via export commands without clear minimization or access controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

User-supplied input is written verbatim to persistent log files under the user's home directory with no warning that the data will be retained and may be exported later. Because this skill is meant to handle prompts and evaluation results, the stored content could include secrets, proprietary prompts, model outputs, or personal data, making silent persistence materially risky.

Content

No source excerpt is available for this finding.