Back to skill

Security audit

String Search - Evomap Asset

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed string-search benchmark, but its shipped C code is unsafe for the general text-processing use cases it advertises.

Review this before installing or reusing it in production. It does not show hidden network, credential, persistence, or privilege behavior, but the C implementation should be treated as unsafe sample code until it validates input characters, checks sizes and allocations, documents supported encodings, and exposes an API that matches the README usage.

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

T09 · Insecure Skill Coding Practices

Error
Location
code.c:27
Finding

Out-of-Bounds Frequency-Table Access for Non-Lowercase Input

Content
View full analysis
0) { double p = (double)freq[i] / 10000; entropy -= p * log2(p); } } double max_entropy = log2(ALPHABET_SIZE); return 1.0 - (entropy / max_entropy); } int find_rarest_char_pos(const char *pattern, int m, const int *text_freq) { int rarest_pos = 0; int min_freq = text_freq[pattern[0] - 'a']; for (int i = 1; i < m; i++) { int freq = text_freq[pattern[i] - 'a']; if (freq < min_freq) { min_freq = freq; rarest_pos = i; } } return rarest_pos; } ``` The same unsafe indexing occurs while sampling text in the adaptive search: ```c int text_freq[ALPHABET_SIZE] = {0}; for (int i = 0; i < sample_size; i++) { text_freq[text[i] - 'a']++; } ``` ### Technical Analysis `ALPHABET_SIZE` is 26, but text and pattern bytes are converted directly into indices by subtracting `'a'`. The code does not establish that each byte falls within the inclusive range `'a'` through `'z'`. For example, an uppercase `A`, punctuation, a null byte, or a byte whose `char` representation is negative can produce an index below zero or above 25. The resulting operations access memory outside the `freq` or `text_freq` arrays. The writes in `calculate_redundancy()` and `yijing_v3_search()` can corrupt stack memory, while the accesses in `find_rarest_char_pos()` can read outside the frequency table. The documentation describes general text processing and log analysis, so callers could rea ...[truncated 1091 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
code.c:60
Finding

Empty Pattern Causes Invalid Memory Access in KMP Search

Content
View full analysis
Remediation
View remediation
SIZE_MAX / sizeof(int)) return -1; int *lps = malloc(m * sizeof(*lps)); if (lps == NULL) return -1; /* Continue only after validation. */ } ``` Also: 1. Make `compute_lps()` reject null pointers and zero lengths, or keep it private and call it only after validated preconditions. 2. Use `size_t` for nonnegative buffer dimensions. 3. Distinguish errors from valid match counts through a documented return convention or an output parameter. 4. Test zero-length, negative-origin, maximum-size, null-pointer, and allocation-failure cases. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
code.c:280
Finding

Unchecked CLI Dimensions Enable Arithmetic Faults, Invalid Copies, and Resource Exhaustion

Content
View full analysis
0); else if (strcmp(argv[i], "--repetitions") == 0 && i + 1 < argc) repetitions = atoi(argv[++i]); } ``` ### Technical Analysis `atoi()` provides no reliable error reporting and accepts negative or extreme values without range validation. The program does not establish the required relationships among `text_size`, ...[truncated 1841 chars]
Remediation
View remediation
text_size) return NULL; size_t range = text_size - pattern_size; size_t start = (range == 0) ? 0 : (size_t)rand() % (range + 1); ``` Use `memcpy()` with previously validated lengths instead of relying on `strncpy()` for binary-sized regions. Introduce global workload limits so argument-controlled text sizes and repetition counts cannot exhaust host memory or CPU. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Capsule trigger list is broad and generic, including phrases like 'String search needed' and 'Pattern matching in large text' in two languages without additional activation constraints. This increases the chance of unintended invocation in unrelated workflows, which could cause an agent to apply optimization changes when not explicitly requested, expanding operational risk even though the skill itself appears performance-focused rather than overtly malicious.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The file consistently presents the skill name, description, features, and use cases in both English and Chinese, indicating a language/locale behavior embedded in the skill documentation. Under the policy rule, language constraints or defaults should be user-selectable or clearly justified; no such opt-in or justification is provided here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This C file contains natural-language comments and user-facing console output in Chinese, including the title and status messages. Because the skill does not offer any language selection or indicate that it is intentionally limited to a Chinese-speaking context, it imposes a locale choice without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code and surrounding comments describe the custom search routine as "易经优化 v3" and define the function as yijing_v3_search, but the benchmark labels that same function as "yijing_v2" in the names array. This is an active documentation/output contradiction that can mislead users about which algorithm version was actually tested and saved in results.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest includes both English and Chinese strings in matching signals, triggers, and summaries, but it does not state whether language selection is user-driven or whether the skill is intended for a specific bilingual context. This can create an implicit locale behavior without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.