Back to skill

Security audit

Path-Dispatch

Security checks for vulnerabilities and agentic risk

Overview

The skill is a local workflow-graph dispatcher, but its default cache loading can execute code from an adjacent cache file if that file is malicious.

Install only if you will run it in a controlled local project and can disable caching for untrusted inputs with PATH_DISPATCH_NO_CACHE=1. Do not accept or run adjacent .cache files from archives, repositories, shared folders, or other users. The package should ideally replace pickle caching with a non-executable format and fix the dependency manifest before broad use.

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

Error
Location
scripts/dispatch.py:234
Finding

Unsafe Pickle Cache Deserialization Enables Arbitrary Code Execution

Content
View full analysis
= os.path.getmtime(filepath) triples = None names = idx = A = orig_n = dist = None if use_cache: try: with open(cache_path, "rb") as f: names, idx, A, orig_n, dist = pickle.load(f) ``` ### Technical Analysis Python pickle data is executable serialization rather than a passive data format. During `pickle.load()`, specially crafted objects can invoke attacker-selected callables through mechanisms such as `__reduce__`. Code execution therefore occurs while deserializing the cache, before the later distance-matrix validation can provide any protection. The application derives the cache path by appending `.cache` to a user-selected triples-file path. It trusts an existing cache when caching is enabled by default and the cache modification time is equal to or newer than the source file. Modification time is not an authenticity or integrity control. Although `SKILL.md` warns that pickle files are unsafe, the implementation still loads them by default. Documentation does not prevent exploitation when a workflow and its adjacent cache originate from an untrusted archive, repository, shared workspace, or other attacker-writable location. ### Attack Path 1. An attacker creates a legitimate-looking triples file, such as `tasks.md`. 2. The attacker creates an adjacent `tasks.md.cache` containing a malicious pickle payload whose reconstruction routine invokes an attacker-selected Python callable. 3. The attacker sets the cache timestamp to be equal to or newer than `tasks.md`, or otherwise causes that condition to be satisfied. 4. A vic ...[truncated 990 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Incorrect and Unpinned Dependency Declaration Creates Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
scipy== ``` 2. Pin exact versions that are compatible with the supported Python versions and have undergone security review. 3. Generate and commit a lockfile or fully hashed requirements file. Use `pip install --require-hashes` where practical. 4. Restrict installation to approved package indexes and avoid silently mixing public and private indexes. 5. Verify package names, publishers, release history, and artifact hashes before updating dependencies. 6. Run dependency vulnerability and provenance scanning in CI. 7. Install dependencies in an isolated, least-privileged environment without unnecessary credentials or access to production resources. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The cache subsystem introduces execution-capable deserialization that is not required for the stated graph/path-dispatch purpose. In this skill context, users are likely to run the script on arbitrary workflow files, so deriving the cache path directly from the input file makes cache poisoning practical if an attacker can influence the working directory or provide a crafted adjacent .cache file.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill exposes environment-variable behavior (PATH_DISPATCH_NO_CACHE) but does not declare an explicit tool/permission scope. That omission weakens sandboxing and reviewability because an agent may rely on ambient environment state without clear operator approval, which is especially relevant here since the env var changes caching behavior tied to unsafe pickle loading.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The design rationale says the skill provides real-time LLM dispatch with 'no I/O' and that a custom minimal implementation enables this. Elsewhere the same document describes reading task files and writing .cache files, so the documentation actively contradicts the actual documented behavior.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

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

md
Hypergraph normalization makes parallelism and fan-out explicit. Real-time dispatch costs $O(n)$ per query, one-time precomputation is $O(n^4)$ worst case.

Use this when:
- Task workflows exceed context window
- Parallel fan-out/fan-in is common
- Model needs to avoid dead-end paths
- Intermediate state is expensive to track

Insecure deserialization: pickle.load()

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The script loads a cache file from disk using pickle.load() without any integrity check or safe deserialization boundary. Because pickle is code-execution capable, an attacker who can place or replace <triples_file>.cache can achieve arbitrary code execution when the tool is run, which is especially risky for CLI tooling that processes user-supplied file paths.

Content

Scanner excerpt · scripts/dispatch.py (reported line 244)May include surrounding context.

python
if use_cache:
        try:
            with open(cache_path, "rb") as f:
                names, idx, A, orig_n, dist = pickle.load(f)
            # Validate dist dimensions
            total_n = len(names)
            if dist.shape != (total_n, total_n):

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The heading includes the Chinese phrase "增量调度" alongside English documentation. This creates a locale-specific element in the skill text without stating that multilingual output is optional or justified by a region-specific use case.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The skill's stated purpose is local graph-based task dispatch and reachability queries. The recommendation that an agent can use a grep command to find sentences for a predicate adds a shell-command capability that is not part of, or justified by, the dispatch algorithm itself.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency manifest specifies numpy without a version constraint, which makes builds non-reproducible and can pull in vulnerable or incompatible releases over time. In a skill intended for workflow orchestration, this is primarily a supply-chain hygiene issue rather than an immediately exploitable flaw, but it does increase exposure to future breakage or known package vulnerabilities.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
numpy
scipy.sparse

Unverifiable Dependency: numpy has 16 known advisory(ies) (CVE-2014-1859 (Numpy arbitrary file write via symlink attack); CVE-2021-41495 (NumPy NULL Pointer Dereference); CVE-2021-33430 (NumPy Buffer Overflow (Disputed)) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

The manifest references numpy without pinning a version even though multiple advisories exist for some numpy releases, so consumers cannot verify whether installation will resolve to a safe version. This does not prove the current environment is vulnerable, but it is a real security risk because deployment may inadvertently install an affected release.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest frames the skill as a graph-based dispatcher that maps dependencies and solves constrained path queries. This script additionally writes a .cache file and reuses it later, which is behavior outside the described dispatch/query semantics rather than a pure in-memory implementation detail.

Content

No source excerpt is available for this finding.