Back to skill

Security audit

Knowledge Toolkit Free

Security checks for vulnerabilities and agentic risk

Overview

This is a plausible knowledge-management skill, but it asks for broad command execution and file-writing authority without enough limits or warnings.

Install only if you can restrict it to a dedicated notes vault and avoid granting exec by default. Review any file writes before they happen, do not run the sample create_note code on untrusted titles without path sanitization and overwrite protection, and remove or pin the requests dependency unless you have a clear network feature that needs it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:166
Finding

User-Controlled Path Traversal and Arbitrary File Overwrite

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 166-168
Vulnerability Type: Path traversal and unsafe file creation
Risk Level: Medium

python
filename = title.replace(" ", "_") + ".md"
with open(filename, "w", encoding="utf-8") as f:
    f.write(note)

Technical Analysis

The note title is incorporated directly into a filesystem path. Replacing spaces with underscores does not remove absolute paths, parent-directory components such as ../, platform-specific separators, or other path-control characters.

Because open() uses write mode, an existing destination file is truncated before the note is written. The implementation does not constrain the resolved path to a designated knowledge-vault directory, reject existing files, or protect against symbolic-link traversal.

Attack Path

  1. An attacker supplies a crafted note title, such as ../../target.
  2. The application transforms it into ../../target.md.
  3. open(..., "w") resolves the parent-directory components relative to the process working directory.
  4. If the destination is writable, the target file is created or truncated and replaced with attacker-influenced Markdown content.
  5. If a predictable destination is a symbolic link, the write may affect the link target instead.

Impact Assessment

Exploitation permits creation or replacement of .md files accessible to the Agent process. The scope is limited by the operating-system privileges of that process and by the automatically appended .md suffix.

Potential consequences include loss or corruption of project documentation, knowledge-base records, configuration stored in Markdown, or Agent instruction files. This does not independently provide privilege escalation, but overwriting a file subsequently interpreted by an Agent could influence later behavior.

Remediation
View remediation

Remediation Suggestions

  • Store notes exclusively beneath a dedicated vault directory.
  • Convert titles into safe filenames using an allowlist such as letters, digits, hyphens, and underscores.
  • Reject absolute paths, .. components, path separators, null bytes, and empty filenames.
  • Resolve both the vault and destination to canonical paths, then verify that the destination remains beneath the vault before writing.
  • Use exclusive creation mode ("x") or an explicit collision policy to prevent unintended overwrites.
  • Defend against symbolic-link attacks by rejecting symlink destinations and, where supported, using secure no-follow file-opening semantics.
  • Generate an internal identifier for the filename and store the original user title only inside the note metadata.

Example hardening pattern:

python
from pathlib import Path
import re

vault = Path("./vault").resolve()
vault.mkdir(parents=True, exist_ok=True)

safe_title = re.sub(r"[^A-Za-z0-9_-]+", "_", title).strip("_")
if not safe_title:
    raise ValueError("Title does not produce a valid filename")

destination = (vault / f"{safe_title}.md").resolve()
if destination.parent != vault:
    raise ValueError("Destination is outside the knowledge vault")

with destination.open("x", encoding="utf-8") as f:
    f.write(note)

T08 · Insecure Dependencies

Note
Location
SKILL.md:146
Finding

Unpinned and Unnecessary Runtime Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 146
Vulnerability Type: Unpinned third-party dependency
Risk Level: Low

bash
pip install requests

Technical Analysis

The setup instructions install requests without specifying an audited version, hashes, a lock file, or an explicit trusted package index. Dependency resolution can therefore change over time and may retrieve different transitive dependencies in future installations.

The provided Python example does not import or use requests, making the installation unnecessary for the documented functionality. Unnecessary packages increase supply-chain exposure and the runtime attack surface.

No evidence shows that the legitimate requests package is malicious or that this Skill intentionally selects a malicious source. The risk arises from mutable, unconstrained dependency resolution rather than from a confirmed malicious package.

Attack Path

  1. A user follows the environment-preparation instructions.
  2. pip contacts its configured package index, which may be the official index, an organization mirror, or an attacker-controlled configuration.
  3. The resolver selects the latest compatible requests release and its transitive dependencies.
  4. A compromised future release, compromised mirror, or unsafe local pip configuration could provide altered package content.
  5. Third-party code then becomes available to execute during package installation or later import.

Impact Assessment

Any malicious dependency code would execute with the privileges of the user or Agent environment running pip. Depending on those privileges, the potential scope could include access to project files, environment variables, network resources, and other files writable by that account.

In the audited content, the package is not subsequently imported, which reduces immediate exploitability. The primary confirmed impact is avoidable supply-chain exposu ...[truncated 73 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the installation instruction because the documented implementation does not use requests.
  • If the dependency becomes necessary, pin it to an audited version rather than resolving an unconstrained latest release.
  • Pin transitive dependencies through a reviewed lock file.
  • Require package hashes, for example through pip install --require-hashes -r requirements.txt.
  • Use an explicitly configured trusted package index and enforce TLS certificate validation.
  • Run dependency installation in an isolated virtual environment with least privilege.
  • Add automated dependency vulnerability and provenance checks to the release process.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill declares exec alongside read and write for a knowledge-management use case that primarily needs document processing and note manipulation. Granting arbitrary command execution unnecessarily expands the attack surface: a prompt or misuse path could execute shell commands, alter files, install packages, or access the network via local tools.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest display name, summary, description, examples, and operational guidance are entirely in Chinese, with no indication that the skill supports other languages or lets the user choose a preferred locale. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The invocation examples are extremely broad, such as organizing notes or connecting knowledge points, and overlap with ordinary user requests. In an agent environment, this can cause over-triggering of the skill and unintended use of its file-writing or execution capabilities when a user did not intend to invoke a powerful tool.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
77% confidence
Finding

The documentation says no extra API key is needed, yet instructs users to install requests, a network-capable dependency. Even without an API key, this enables outbound HTTP access and creates ambiguity about external communication, which can mislead users about privacy, data flow, and the skill's real capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes code and behavior that create Markdown files and write note content, but the description does not clearly warn users that local files may be created or modified. This can lead to silent filesystem changes, overwriting content, or writing untrusted input into the working directory without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that some functionality requires exec, but it does not provide strong user-facing warnings about command execution risk or the kinds of commands that may run. In combination with natural-language control, this makes arbitrary or unintended shell execution materially more dangerous.

Content

No source excerpt is available for this finding.