Back to skill

Security audit

meta-nano-pdf

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small generated learner package that makes broad self-verification and self-evolution claims without enough implementation or user controls for its persistent state.

Review carefully before installing. Do not rely on this skill as a complete or verified PDF assistant unless the missing nano-pdf workflow and verifier integrations are added. If used, keep learner state local, treat stored patterns as untrusted data, clear the shipped learned_patterns.json, and require explicit user approval before persisting task notes across sessions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
scripts/learner.py:10
Finding

Unvalidated Caller-Controlled Data Persisted as Agent Learning State

Content
View full analysis

Vulnerability Details

File Location: scripts/learner.py:10-20; supporting behavioral instructions in SKILL.md:20-23,31
Vulnerability Type: Persistent agent-memory poisoning
Risk Level: Medium

Vulnerable Code

python
def record(op_ok=True, note=""):
    d = load(); d["total_ops"] += 1
    if not op_ok:
        d["total_fails"] += 1
    if note:
        d.setdefault("patterns", []).append(note)
    json.dump(d, open(MEM, "w", encoding="utf-8"), ensure_ascii=False, indent=2)
    return d
if __name__ == "__main__":
    ok = (sys.argv[1] != "fail") if len(sys.argv) > 1 else True
    rec = (sys.argv[2] if len(sys.argv) > 2 else "")
    print(json.dumps(record(ok, rec), ensure_ascii=False))

Technical Analysis

The second command-line argument is accepted as an arbitrary string and appended directly to the persistent patterns array without validation, normalization, provenance metadata, size restrictions, or approval. The updated data is written to scripts/learned_patterns.json.

The instructions in SKILL.md describe this learner state as part of a cross-session self-reflection and meta-evolution workflow. Consequently, an integrating agent that consumes patterns as behavioral guidance may treat attacker-controlled observations as trusted learned rules. The repository does not contain the downstream meta-evolver implementation, so automatic execution or interpretation of the stored text is not demonstrated; the risk arises from the documented intended integration.

The implementation also permits unlimited note growth, allowing repeated calls to increase the state file indefinitely.

Attack Path

  1. An attacker or untrusted workflow controls the second argument passed to scripts/learner.py.
  2. The attacker supplies content crafted to resemble a learned behavioral rule or instruction.
  3. record() appends that content to the patterns array without validation.
  4. The ...[truncated 918 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not store arbitrary free-form caller input as trusted learning rules.
  • Define a typed schema containing bounded metrics, event categories, timestamps, and provenance instead of unrestricted notes.
  • Enforce strict maximum lengths, entry counts, and file-size limits.
  • Separate untrusted observations from approved behavioral guidance.
  • Require explicit human or policy-based review before promoting observations into long-term agent memory.
  • Escape or neutralize instruction-like content before presenting stored observations to a language model.
  • Add retention periods, reset controls, and secure deletion procedures.
  • Use atomic file replacement and locking to avoid corruption during concurrent writes.
  • Document every downstream consumer and ensure it treats persisted entries as untrusted data rather than instructions.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/learned_patterns.json:5
Finding

Local Username and Filesystem Layout Disclosed in Distributed State

Content
View full analysis

Vulnerability Details

File Location: scripts/learned_patterns.json:5
Vulnerability Type: Plaintext environment-information disclosure
Risk Level: Low

Vulnerable Code

json
{
  "total_ops": 1,
  "total_fails": 0,
  "patterns": [
    "C:/Users/小江/.workbuddy/skills/meta-nano-pdf"
  ]
}

Technical Analysis

The distributed learning-state file contains an absolute local path. This exposes the originating system's username, operating-system path convention, local tool directory, and skill installation layout.

Generated runtime state should not be committed to a public skill package. Although the disclosed value is not a credential or secret, it is environment-specific information that can support user identification, social engineering, or environment-tailored attacks.

Attack Path

  1. An attacker downloads or inspects the distributed project.
  2. The attacker opens scripts/learned_patterns.json.
  3. The attacker obtains the originating local username and filesystem layout without requiring execution or authentication.
  4. The information may be correlated with other data or used to make phishing and environment-specific attack content more credible.

Impact Assessment

The issue provides read-only disclosure of limited local identity and environment metadata. It does not directly provide system access, credentials, code execution, or elevated privileges. Its primary effects are minor privacy loss and assistance with reconnaissance.

Remediation
View remediation

Remediation Suggestions

  • Remove generated learning state from the published package.
  • Reset the file to an empty, non-identifying initial state before distribution.
  • Add runtime state files to the relevant source-control and packaging exclusion lists.
  • Never record absolute paths, usernames, or host-specific identifiers unless strictly necessary.
  • If path information is operationally required, store a relative path or a non-reversible generic identifier.
  • Add an automated release check that detects absolute paths and other environment-specific metadata.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill makes strong claims about self-verification, orchestration, and continuous self-evolution that are not matched by the actual implemented behavior. This mismatch is dangerous because operators may over-trust the skill's outputs, assume safety checks occurred when they did not, or permit broader deployment based on inaccurate assurances about validation and control mechanisms.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill advertises behaviors tied to persistence and reflective loops, and the static analyzer reports file_write capability without any declared tool scope or permissions boundary. When a skill can write state but does not explicitly constrain or disclose that capability, downstream agents may invoke it with broader authority than intended, enabling silent state mutation or data persistence beyond user expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly describes persistent self-reflection, learner injection, and cross-session self-evolution, but does not warn users that data or state may be retained across executions. In context, this is more dangerous because the skill is framed as a meta-agent component with memory and continuous improvement, which can lead to covert retention of prompts, outputs, or derived sensitive information and create privacy, compliance, and integrity risks.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The usage guidance says to directly invoke the skill for the teacher skill's domain without defining trigger boundaries, exclusions, or unsafe contexts. Overly broad activation criteria increase the chance the skill is used in inappropriate tasks, with excessive authority, or as a generic fallback, which can amplify other weaknesses like undeclared persistence or misleading capability claims.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language description and usage guidance are presented entirely in Chinese, with no indication that users may choose another language. This can violate language/locale policy when a skill implicitly enforces a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file is entirely presented in Chinese, and there is no natural-language indication that the user can choose another language or that the document is intentionally limited to a Chinese-speaking audience. Under the language/locale policy rule, forcing a single language without opt-in can be a policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The JSON value includes a hardcoded Windows user directory containing non-Latin characters in the username. This can indicate an implicit locale- or user-specific assumption rather than a locale-neutral configuration, and there is no accompanying explanation or opt-in indicating that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes an advanced 'meta' skill with self-verification, self-reflection, orchestration, and continuous self-evolution. In this file, the implemented behavior is limited to incrementing counters and appending notes in a local JSON file, which is materially narrower than the claimed capability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring is written only in Chinese and provides no indication that users may choose another language or that the skill is region-specific. This is a natural-language locale policy concern because it implicitly fixes the skill’s user-facing description to a single language without opt-in.

Content

No source excerpt is available for this finding.