Back to skill

Security audit

Config Manager - Evomap Asset

Security checks for vulnerabilities and agentic risk

Overview

This is a small C configuration-manager skill whose behavior matches its stated purpose, with some ordinary code-quality security issues to review before using it in sensitive software.

Reasonable to install for review or experimentation. Before embedding it in production or security-sensitive software, add validation or escaping for keys and string values, fix empty-value parsing, and treat configuration files from untrusted sources carefully.

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
code.c:192
Finding

Undefined Behavior When Parsing an Empty Configuration Value

Content
View full analysis
value && (*end == '\n' || *end == '\r' || *end == ' ')) *end-- = '\0'; ``` ### Technical Analysis When the configuration value is empty, `strlen(value)` returns zero. The expression used to initialize `end` then attempts to construct a pointer one byte before the beginning of `value`: ```c value + 0 - 1 ``` Constructing and subsequently comparing this out-of-bounds pointer is undefined behavior under the C language rules. An empty value can occur when a configuration file ends with `key=` without a trailing newline. The loop's `end > value` condition may appear to prevent dereferencing the invalid pointer, but the relational comparison itself is not a reliable safeguard after an invalid pointer has been constructed. Compiler optimization and platform behavior may therefore produce unpredictable results. ### Attack Path 1. An attacker obtains the ability to supply or modify a file processed by `config_load_file()`. 2. The attacker makes the final file content an assignment with no value and no trailing newline, for example: ```text server.host= ``` 3. `strchr()` finds the equals sign, and `value` points to the terminating null byte. 4. `strlen(value)` returns zero. 5. The parser constructs `value - 1`, invoking undefined behavior. 6. Depending on the compiler and runtime environment, the consuming process may crash or behave unpredictably. ### Impact Assessment The demonstrated impact is primarily loss of availability in a process that loads attacker-controlled configuration files. This flaw does not directly grant additional operating-system privileges, disclose secrets, or execute attacker-supplied commands. Its scope is limited to applications embedding this configuration manager, but it may re ...[truncated 93 chars]
Remediation
View remediation
0 && (value[value_len - 1] == '\n' || value[value_len - 1] == '\r' || value[value_len - 1] == ' ')) { value[--value_len] = '\0'; } ``` Additional hardening should include: - Add tests for `key=`, `key=\n`, whitespace-only values, and files without a final newline. - Define explicitly whether empty values are valid strings or malformed entries. - If empty values are invalid, reject the line and return a parse error rather than continuing silently. - Compile and test with AddressSanitizer and UndefinedBehaviorSanitizer. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
code.c:233
Finding

Configuration Entry Injection Through Unescaped Serialization

Content
View full analysis
key); switch (item->type) { case CONFIG_STRING: fprintf(f, "%s\n", item->value.str_value); break; ``` ### Technical Analysis Configuration keys and string values are written directly to a line-oriented `key=value` file without validation or escaping. The public `config_add_string()` function accepts arbitrary strings, including newline and carriage-return characters. Keys can likewise contain line breaks, equals signs, or other syntax-significant characters. Consequently, a value such as: ```text ordinary-value admin.enabled=true ``` is serialized as two physical configuration lines. When the resulting file is loaded again, `config_load_file()` treats the injected second line as an independent setting. This permits data that was intended to be one value to alter the structure and meaning of the saved configuration. Because loading updates existing keys when duplicate names are encountered, an injected line appearing later in the file may also override an earlier setting. ### Attack Path 1. An attacker controls a key or string value passed to `config_add_string()`. 2. The attacker supplies an embedded newline followed by another assignment, for example: ```text guest admin.enabled=true ``` 3. The application calls `config_save_file()`. 4. The value is written without escaping, producing content similar to: ```text user.role = guest admin.enabled=true ``` 5. The generated file is later processed by `config_load_file()` or another compatible parser. 6. The injected line is interpreted as a separate Boolean configuration entry. 7. If the consuming application uses that entry for security-sensitive behavior, the attacker may influence or override that behavior. ### Impact Assessment The immed ...[truncated 589 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill description and headings are written in Chinese, and the title explicitly presents the skill in Chinese without indicating that other languages are supported. Under the policy rule, a language-specific presentation should either offer user choice or clearly justify the locale constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file's human-facing description and comments are written entirely in Chinese, which imposes a specific language context without indicating user opt-in or a justified region-specific requirement. The policy for SQP-3 applies to natural-language content in any file type, including comments and string literals.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.