Back to skill

Security audit

🧠 Requirement Comprehension Engine

Security checks for vulnerabilities and agentic risk

Overview

This is a transparent request-planning and skill-orchestration helper with limited persistence guidance, not hidden or destructive behavior.

Before installing, understand that this skill may step in for broad or ambiguous requests and may coordinate other skills. Its memory guidance is not suitable for secrets or personal data, so keep any stored preferences and logs low sensitivity and review companion skills separately.

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

T09 · Insecure Skill Coding Practices

Warning
Location
references/memory-management.md:31
Finding
Predictable Repeating-Key XOR Used for Persistent Internal Memory## Vulnerability Details **File Location**: `references/memory-management.md`, lines 31–63 **Vulnerability Type**: Weak encryption and recoverable key derivation **Risk Level**: Medium ### Vulnerable Code ```python def xor_encrypt(text: str, key: str) -> str: import base64 result = bytes([ord(c) ^ ord(key[i % len(key)]) for i, c in enumerate(text)]) return base64.b64encode(result).decode() def xor_decrypt(encoded: str, key: str) -> str: import base64 raw = base64.b64decode(encoded) return ''.join(chr(b ^ ord(key[i % len(key)])) for i, b in enumerate(raw)) # Key derivation: sha256(skill_name + date[:7])[:8] # Example: key for "req-comprehend" on 2026-05 = "a3f1b2c4" ``` ```markdown --- tier: internal key_hint: req-comprehend-2026-05 created: 2026-05-19 expires: 2026-06-19 --- ## Encrypted Preference > a0VmcEdWYQpnUgpmUQp... (base64 encoded, XOR encrypted) ## Decryption Note XOR with key derived from sha256("req-comprehend-2026-05")[:8] Purpose: Stores user's preference for one specific output format choice ``` ### Technical Analysis The documented Tier 2 memory mechanism uses repeating-key XOR followed by Base64 encoding. Repeating-key XOR does not provide modern cryptographic confidentiality or integrity. Base64 is an encoding scheme and adds no security. The key is derived entirely from predictable values—the skill name and calendar month—and is truncated to eight characters. The memory entry stores a `key_hint`, while the same document discloses the complete derivation algorithm. Consequently, any party able to read a Tier 2 memory file can reproduce the key without obtaining an independent secret. The construction also lacks authentication. An attacker with write access could modify ciphertext without reliable detection, potentially corrupting stored preferences. The reviewed Skill does not state that decrypted memory is executed as code, so the pre-scan's ...[truncated 1646 chars]
Remediation
## Remediation Suggestions 1. Replace repeating-key XOR with authenticated encryption, such as AES-256-GCM or ChaCha20-Poly1305. 2. Generate a random encryption key using a cryptographically secure random-number generator. 3. Keep the key in an OS keychain, dedicated secret manager, or similarly protected credential store. Do not derive it solely from public or predictable metadata. 4. Use a unique random nonce for each encrypted entry and store only the nonce, ciphertext, and authentication tag with the memory record. 5. Bind relevant metadata, including the memory tier, creation date, expiry date, and record identifier, as authenticated associated data. 6. Fail closed when authentication fails; do not return partially decrypted or unauthenticated content. 7. Minimize Tier 2 collection and retain only information demonstrably required for the Skill's functionality. 8. Enforce expiry through deletion rather than moving expired confidential entries into an archive. 9. Add automated checks that reject credentials, secrets, and personally identifiable information before persistence. 10. Restrict Tier 2 directory and backup permissions to the minimum required process identity. 11. Clearly distinguish Base64 encoding from encryption in documentation and tests.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (2)

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger description is broad enough to activate on many ordinary requests involving ambiguity, multiple intents, or structured analysis, which can cause this orchestration skill to intercept prompts too often. In a meta-skill that decides which other skills to invoke, over-triggering increases attack surface, can override more specific skills, and may lead to unnecessary delegation to memory or self-iteration components.

Natural-Language Policy Violations

Low
Confidence
80% confidence
Finding
The file includes a full Chinese-language section without stating whether language should be selected based on user preference. This can create a locale-policy issue because the skill presents a fixed additional language variant without explicit opt-in or language-choice guidance.

Static analysis

No suspicious patterns detected.