Back to skill

Security audit

CompoundMind

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent memory-indexing purpose, but it stores and resurfaces sensitive credentials, tokens, wallet/config details, and persistent behavioral directives in ways users should review carefully.

Install only after removing the bundled experience data, rotating any exposed credentials, and adding secret/PII redaction before persistence, indexing, briefing, or LLM calls. Treat all retrieved memories as untrusted notes, not instructions, and avoid enabling cron, heartbeat hooks, or --llm mode until scope, consent, and review controls are added.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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
distill.py:421
Finding

Unredacted credentials and personal data are persisted in plaintext

Content
View full analysis
list[dict]: """Extract specific, concrete facts.""" facts = [] seen = set() for section in sections: body = section["body"] header = section["header"] for line in body.splitlines(): line = line.strip() if len(line) < 15 or len(line) > 400: continue if any(re.search(p, line) for p in FACT_PATTERNS): key = line[:50] if key in seen: continue seen.add(key) # Strip markdown formatting clean = re.sub(r"\*{1,2}(.+?)\*{1,2}", r"\1", line) clean = re.sub(r"`(.+?)`", r"\1", clean) facts.append({ "fact": clean[:400], "domain": detect_domain(line + " " + header), "tags": extract_tags(line) }) return facts[:20] ``` The extracted values are subsequently written without redaction: ```python experience = { "id": exp_id, "source": relative, "source_date": source_date, "distilled_at": datetime.now().isoformat(), "hash": h, **extracted } EXP_DIR.mkdir(parents=True, exist_ok=True) exp_path = EXP_DIR / f"{exp_id}.json" exp_path.write_text(json.dumps(experience, indent=2)) ``` The package contains records matching live credential formats, including an API key identifier, an API secret, a service key, credential file paths, and an email address. The credential values are intentionally not reproduced in this report. ### Technical Analysis The `FACT_ ...[truncated 1939 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
distill.py:228
Finding

Untrusted memory directives can poison persistent Agent briefings

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
brief.py:162
Finding

Optional LLM synthesis can disclose sensitive stored memory to a third party

Content
View full analysis
str: """Build briefing with LLM synthesis using COMPOUND_MIND_LLM_KEY.""" llm_key = os.environ.get("COMPOUND_MIND_LLM_KEY") or os.environ.get("ANTHROPIC_API_KEY") if not llm_key: raise RuntimeError("No LLM key available") try: import anthropic client = anthropic.Anthropic(api_key=llm_key) # Build wisdom summary for prompt sections = [] if wisdom["lessons"]: sections.append("LESSONS:") for r in wisdom["lessons"][:6]: outcome = r.get("outcome") or r.get("quality") or "" sections.append(f" [{outcome}] {r['text'][:200]} ({r.get('source_date', '')[:7]})") if wisdom["decisions"]: sections.append("DECISIONS:") for r in wisdom["decisions"][:4]: sections.append(f" {r['text'][:200]}") if wisdom["facts"]: sections.append("KEY FACTS:") for r in wisdom["facts"][:5]: sections.append(f" {r['text'][:150]}") if wisdom["relationships"]: sections.append("RELATIONSHIPS:") for r in wisdom["relationships"][:3]: sections.append(f" {r['text'][:150]}") wisdom_text = "\n".join(sections) or "No relevant experience found." domain_str = ", ".join(domains) prompt = f"""You are CompoundMind - a system surfacing relevant past experience before each task. Task: {task} Domains: {domain_str} Relevant accumulated wisdom: --- {wisdom_text} --- Generate a sharp pre-session briefing. Format: 1. One sentence framing the task from experience angle 2. TOP LESSONS (max 4 bullets) 3. WATCH ...[truncated 2580 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (50)

Natural-Language Policy Violations

Critical
Category
Not specified by scanner
Confidence
100% confidence
Finding

The content includes hardcoded API credentials in plaintext, including an API secret that can likely be used immediately. Plaintext secrets in a repository or memory store are directly exploitable, easy to copy, and often propagated through logs, backups, embeddings, and search indexes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Critical
Category
Not specified by scanner
Confidence
100% confidence
Finding

A plaintext API key is stored in the natural-language 'facts' section, making the key available to anyone or any system that can read the memory artifact. Because this file belongs to a compounding memory/indexing skill, the key is especially dangerous: it may be replicated into searchable indexes, model context, or derived datasets.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

This second mismatch likewise shows the skill claims broad raw-log distillation and searchable indexing, while the analyzed behavior appears narrower and also introduces undeclared external LLM usage. In a memory-processing skill, inaccurate capability claims are especially dangerous because they can hide the fact that sensitive historical data may leave the local environment or be processed in ways the user did not consent to.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

This second mismatch likewise shows the skill claims broad raw-log distillation and searchable indexing, while the analyzed behavior appears narrower and also introduces undeclared external LLM usage. In a memory-processing skill, inaccurate capability claims are especially dangerous because they can hide the fact that sensitive historical data may leave the local environment or be processed in ways the user did not consent to.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · data/experiences/19b38ce50150.json (reported line 248)May include surrounding context.

json
]
    },
    {
      "fact": "- Wallet: nix-wallet, address kii1lkstmxppnxlv4u447csvv2dfy76lv7cjhvuxkk (keyring: test)",
      "domain": "trading",
      "tags": [
        "wallet"

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Referencing the exact path to a credentials file exposes where secrets are stored on the host and provides attackers or over-privileged agents a direct target for collection. Even without embedding the file contents, disclosing secret locations materially assists credential theft and post-compromise discovery.

Content

Scanner excerpt · data/experiences/2e40b3400fb0.json (reported line 9)May include surrounding context.

json
"hash": "63fa965c95a9d2f07a080272b8508dfd",
  "lessons": [
    {
      "text": "Access Key + Secret Key stored at `/root/.config/kling-ai/credentials.json`",
      "domain": "coding",
      "outcome": "neutral",
      "importance": 3,

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This record stores credential file paths plus raw API identifiers and secrets inside a long-term 'experience' artifact, which defeats the stated goal of storing distilled knowledge rather than sensitive source material. If this file is indexed, synced, or exposed to other agents or users, the secrets can be used directly for unauthorized access and lateral movement.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The experience data reveals another exact credentials file location, increasing the attack surface by mapping sensitive files for downstream readers. In a persistent agent-memory context, these storage references become retrievable operational intelligence that can facilitate credential harvesting.

Content

Scanner excerpt · data/experiences/2e40b3400fb0.json (reported line 55)May include surrounding context.

json
]
    },
    {
      "text": "Stored at: `/root/.config/higgsfield/credentials.json`",
      "domain": "coding",
      "outcome": "neutral",
      "importance": 3,

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file claims credentials were redacted in relationship notes, but unredacted secrets are present elsewhere in the same record. This inconsistency creates a false sense of safety and indicates the redaction process is incomplete or bypassable, making accidental disclosure more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The 'facts' section retains a plaintext API key and financial-sensitive wallet information, which are not necessary as durable distilled memory. Searchable retention of such data increases the blast radius of any memory leak, index exposure, or downstream agent misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file contains what appears to be a live hard-coded API key embedded in stored experience data. Secrets in JSON memory artifacts are dangerous because they can be exfiltrated by anyone with repository, backup, log, or index access, and this skill is explicitly designed to accumulate and surface historical data, which increases the chance of unintended disclosure and reuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a direct natural-language instruction telling agents not to ask permission before acting, which conflicts with safety expectations around user consent and change control. Because this file is an experience distillation artifact meant to influence future behavior, the instruction is more dangerous than a casual note: it can systematically bias agents toward bypassing approval workflows.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

Referencing credentials.json alongside a JWT token location is credential-access-enabling information because it points directly to a likely secret store. Within this skill's long-term memory context, that creates a durable map to sensitive material and increases the chance of later unauthorized access by agents or anyone who can query the index.

Content

Scanner excerpt · data/experiences/7cb6365adf32.json (reported line 136)May include surrounding context.

json
"relationships": [],
  "facts": [
    {
      "fact": "- New JWT token: stored in /root/.config/upload-post/credentials.json",
      "domain": "social",
      "tags": [
        "post",

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This file stores sensitive operational data inside a long-lived experience index, including an API key, wallet identifiers, and deployment addresses. In a memory/learning skill, that is especially dangerous because these records are designed to be retained, searched, and reused by agents, which increases the chance of unintended disclosure, prompt-context exfiltration, or abuse of credentials and infrastructure metadata.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The fact extraction patterns intentionally capture highly sensitive material such as API keys, tokens, wallet addresses, endpoints, paths, and config values from memory files and write them to persistent output. This increases the blast radius of any secret already present in logs by duplicating it into a searchable derived dataset, making accidental exposure or later compromise more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

These routines extract and store relationship insights and fact-like strings that can include personal preferences, instructions, wallet addresses, API keys, tokens, endpoints, and config details, yet there is no explicit warning or protective handling. In the context of a long-term memory skill, this is especially risky because it systematizes sensitive content into structured records that are easier to search, correlate, and exfiltrate.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises shell, file read/write, and environment-dependent behavior but does not declare any tool scope or permissions boundaries. In an agent ecosystem, this creates an authorization transparency gap: users and orchestrators cannot reliably assess what the skill may access or modify, increasing the chance of over-privileged execution and unintended file or command effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill handles memory logs and extracted facts, which may contain sensitive personal, operational, or secret material, yet the description does not warn that this content may be sent to an external LLM service. This is a real data-governance and confidentiality risk because users may reasonably expect the workflow to remain local while the skill transmits durable memory content off-box.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The optional LLM path sends the user's task plus retrieved 'wisdom' entries to Anthropic, which is an external third party. Because those entries are accumulated memory logs that may contain sensitive operational, personal, or strategic information, this creates a real data exfiltration/privacy risk beyond purely local processing.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

A memory distillation and briefing skill does not inherently require access to environment-managed secrets unless external services are explicitly part of scope. Here the code reads COMPOUND_MIND_LLM_KEY or ANTHROPIC_API_KEY to enable remote synthesis, which is an additional capability beyond the manifest's described learning-from-history purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code sends task text and accumulated wisdom to an external API when --llm is used, but there is no in-band privacy notice, consent checkpoint, or preview of outgoing content in that execution path. In a memory/experience-index skill, the context increases sensitivity because retrieved entries may include historical secrets, relationship notes, or internal operational details.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest description uses sweeping claims like 'Makes agents permanently smarter' and 'Distills memory into searchable wisdom' without specifying narrow activation conditions or safety boundaries. In a skill that processes persistent memory and can be wired into heartbeat hooks or cron, this broad positioning can cause over-invocation, unnecessary exposure of sensitive memory data, and user over-trust in autonomous behavior.

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 explicitly records adding randomized 0–45 minute delays after recognizing that fixed posting times trigger bot-detection flags. That is not neutral reliability engineering; it is adapting automation behavior to reduce detection by a platform, which is classic evasion-oriented automation and can enable policy-violating mass posting or spam operations.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The same section describes a staged behavioral strategy—randomized timing within user activity windows and awareness of platform detection patterns—to make automated actions appear less bot-like. This creates a reusable evasion workflow that can be applied to platform abuse, spam distribution, or deceptive account automation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This skill update states that the anti-detection change was not just discussed but deployed, confirming operational evasion capability. Persisting such a lesson in the experience store makes future agents more likely to reuse and reinforce deceptive automation patterns across sessions.

Content

No source excerpt is available for this finding.