Back to skill

Security audit

Self-Evolution Cognition

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it is designed to persist reasoning and human feedback across sessions without enough scope, consent, retention, or rollback controls.

Install only in a workspace where persistent memory files are acceptable. Do not feed it secrets, customer data, credentials, or raw production incident details unless you have a retention and deletion process. Treat restored memory and injected feedback as untrusted historical context, not as authoritative instructions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
README.md:33
Finding

Untrusted Human Feedback Can Poison Persistent Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:35-41, README.md:33-44, and VERIFICATION_PROTOCOL.md:17-29
Vulnerability Type: T02: Agent Memory Poisoning
Risk Level: Medium

Complete Vulnerable Snippets

SKILL.md:35-41 — English translation of the audited documentation:

text
Implements the Agent's SOUL five-law self-evolution cycle:

1. Known-versus-unknown separation
2. Files as memory: write all intermediate state to persistent files
3. Four-direction collision reasoning
4. Human-machine closed-loop injection: accept human falsification input,
   structurally absorb it, and update the world model
5. Confidence labeling and red-line protection

README.md:33-44 — relevant API segment, with the example feedback translated into English:

python
result = cog.evolve(
    task="Analyze potential risks in this code",
    known=["code structure", "dependency relationships"],
    unknown=["runtime behavior", "concurrency scenarios"]
)

# result.output        — final conclusion
# result.confidence    — confidence score
# result.collision_log — reasoning details
# result.file_written  — path of the written memory file

cog.inject_human_feedback(
    "I found a concurrency bug in production; the reproduction steps are..."
)

VERIFICATION_PROTOCOL.md:17-29 — English translation of the relevant persistence requirements:

text
File-memory verification:
- After every evolve() call, is VERIFICATION_LOG.md written?
- Is session recovery supported by reading the previous state from a file?
- Passing criterion: 100% successful file writes

Human-machine closed-loop verification:
- Is inject_human_feedback(feedback: str) provided?
- Is feedback written to a persistent file and does it affect the next
  evolve() output?
- Passing criterion: output changes by at least 30% after feedback injection

Technical Analysis

The documented design acc ...[truncated 2130 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat all human feedback and restored memory as untrusted data, never as authoritative instructions.
  2. Store feedback in a data-only schema with explicit fields for source, timestamp, scope, confidence, and verification status.
  3. Separate system instructions, user feedback, observations, and derived conclusions into independently protected stores.
  4. Require explicit user or administrator approval before untrusted feedback is promoted into durable memory.
  5. Validate feedback against the active task and reject attempts to introduce executable commands, policy overrides, hidden instructions, or unrelated behavioral rules.
  6. Apply integrity protection to memory files and restrict their filesystem permissions according to least privilege.
  7. Scope memory by project, user, and session to prevent one tenant or task from influencing another.
  8. Add expiration, versioning, audit history, deletion, and rollback controls for all persistent entries.
  9. Avoid storing hidden reasoning, credentials, private data, or unnecessary intermediate state. Persist only the minimum structured information needed.
  10. On session recovery, present restored entries as untrusted historical context and require revalidation before they affect output.
  11. Add adversarial tests demonstrating that feedback containing instruction overrides cannot modify system policy or unrelated future tasks.
  12. Provide the actual implementation for review and ensure its behavior matches the documented validation and isolation controls.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains operational instructions and status labels only in Chinese, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking context. That can violate language/locale policy because it implicitly forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
75% confidence
Finding

The README is entirely presented in Chinese and does not indicate that users can choose another language or that the skill is intentionally restricted to a Chinese-language context. Per the policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly states that all thinking is written to files for cross-session memory, but it does not warn users that prompts, reasoning traces, or other potentially sensitive data may be persisted. In an agent skill context, automatic persistence of internal reasoning and user-derived content can retain secrets, personal data, or proprietary information that may later be exposed, reused, or mishandled.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises writing all thought processes to files and using those files as memory across sessions, which creates a natural-language persistence channel for sensitive user inputs and model-generated reasoning. In practice, such files can accumulate secrets, private data, internal analysis, or unsafe instructions that later sessions may surface or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented feedback API encourages users to inject production incident details, but the README does not warn that such operational data may be persisted into long-lived memory state. Production incident reports often include credentials, internal topology, logs, or customer data, so undocumented retention creates a realistic confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The feedback API invites ingestion of raw production bug reports into persistent cognition state, making it likely that sensitive operational details will be stored and possibly influence future outputs. Because the skill is specifically framed as cross-session self-evolution, the context makes retention more dangerous: sensitive data is not just stored, but intentionally reused in future reasoning.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documentation switches into Chinese for core metadata, references, and capability descriptions, while the file title and usage sections are otherwise in English. This imposes a language choice on users without indicating that Chinese is optional or that alternative locales are supported.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file's operational instructions and acceptance criteria are presented only in Chinese, which effectively forces a specific language for users of this skill artifact. No opt-in, alternative language, or documented region-specific justification is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file instructs the verifier to call evolve() and then assert that VERIFICATION_LOG.md exists, which implies the skill will write a file in the current directory. The protocol describes this as a pass criterion but does not warn that running the check will create or modify local files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.