Back to skill

Security audit

CXM: Neural Memory for Agents

Security checks for vulnerabilities and agentic risk

Overview

This skill is a Review case because it goes beyond code search by reading sensitive local history/session data and includes unsafe write and install behavior.

Review before installing. Use an isolated virtual environment, avoid the provided requirements.txt until it is reduced and cleaned, disable ask/ctx collection of shell and AI-session history, and set patching.mode to false or require explicit deny-by-default write allowlists before using patch features on sensitive repos.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/tools/context_gatherer.py:82
Finding

Undisclosed Collection of Shell History and AI-Agent Session Data

Content
View full analysis
Dict: """Shell history""" history_file = Path.home() / ".bash_history" commands = [] if history_file.exists(): try: with open(history_file, errors='ignore') as f: commands = [l.strip() for l in f.readlines()[-10:] if l.strip()] except Exception: pass return { 'last_commands': commands, 'user': os.getenv('USER', 'unknown'), 'shell': os.getenv('SHELL', '/bin/bash'), } ``` ```python def gather_gemini_cli_context() -> Optional[Dict]: """Gather the active Gemini CLI session context if available""" try: from ..config import Config config = Config() chats_dir = Path(config.get('gemini_chats_dir')) if not chats_dir.exists(): return None session_files = glob.glob(str(chats_dir / "session-*.json")) if not session_files: return None latest_file = max(session_files, key=os.path.getmtime) with open(latest_file, 'r', encoding='utf-8') as f: data = json.load(f) messages = data.get('messages', []) user_messages = [ m for m in messages if m.get('type') == 'user' ] recent_prompts = [] for msg in user_messages[-2:]: content = msg.get('content', []) if isinstance(content, list) and len(content) > 0: text = content[0].get('text', '') if text: ...[truncated 3513 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/core/patcher.py:24
Finding

Arbitrary Filesystem Write Through Patch Path Traversal

Content
View full analysis
bool: """Checks if the target path is within the allowed_write_paths""" patching_config = self.config.get("patching", {}) allowed_paths = patching_config.get("allowed_write_paths", []) # If no explicit limits, allow all (or default to safe mode depending on policy) if not allowed_paths: return True target = Path(target_path) for allowed in allowed_paths: # Check if target is relative to an allowed path try: if target.is_relative_to(Path(allowed)): return True except AttributeError: # Fallback for Python < 3.9 if str(target).startswith(str(Path(allowed))): return True return False ``` ```python def parse_and_apply(self, llm_output: str): """Finds blocks and applies them based on rules.""" pattern = r'\s*```(?:python|py|js|ts|[\w]+)?\n(.*?)```\s*' matches = re.finditer(pattern, llm_output, re.DOTALL) patches_found = False mode = self.guardrails.get_patch_mode() if mode == "false": console.print( "\n[yellow]🛡️ Auto-patching is disabled in .cxm.yaml " "(dry-run only).[/yellow]" ) for match in matches: patches_found = True file_path = match.group(1).strip() code_content = match.group(2).strip() console.print( f"\n[bold cyan]📦 Discovered Patch for:[/bold cyan] {file_path}" ) if not self.guardrails.is_path_allowed_for_write(file_path): console.print( f" [bold red]❌ BLOCKED:[/bold red] ...[truncated 3738 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
requirements.txt:24
Finding

Overbroad Dependency Installation From Untrusted Git Sources

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (150)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Autonomous or semi-autonomous code generation and patch application are materially riskier than passive architecture analysis, especially when combined with shell, file, and possible network capabilities. In this skill context, that means the skill could be used not just to inspect code but to alter it, creating opportunities for supply-chain compromise, destructive edits, or stealthy backdoors if agent output is trusted too readily.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: accelerate==1.12.0 — 2 advisory(ies): CVE-2026-69112 (Accelerate path traversal and denial of service via sharded checkpoint weight_ma); CVE-2026-69112 (Accelerate path traversal and denial of service via sharded checkpoint weight_ma)

High
Category
Supply Chain
Confidence
93% confidence
Finding

The requirements pin accelerate to a version reported with path traversal and denial-of-service issues. In a memory/indexing skill that may handle model artifacts or checkpoints, vulnerable model-loading paths can expose the host filesystem or allow resource exhaustion.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: aiohttp==3.13.3 — 16 advisory(ies): CVE-2026-54279 (aiohttp: Host-Only Cookies Become Domain Cookies After CookieJar Persistence); CVE-2026-34514 (AIOHTTP has CRLF injection through multipart part content type header constructi); CVE-2026-34517 (AIOHTTP has late size enforcement for non-file multipart fields causes memory Do) +13 more

High
Category
Supply Chain
Confidence
96% confidence
Finding

aiohttp is pinned to a version with multiple reported issues including header injection, cookie handling, and multipart-related denial of service. Because this skill appears capable of networked ingestion and tool orchestration, unsafe HTTP handling materially increases exposure to remote attacks.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: cbor2==5.8.0 — 2 advisory(ies): CVE-2026-26209 (cbor2 has a Denial of Service via Uncontrolled Recursion in cbor2.loads); CVE-2026-26209 (cbor2 provides encoding and decoding for the Concise Binary Object Representatio)

High
Category
Supply Chain
Confidence
90% confidence
Finding

cbor2 is pinned to a version with reported uncontrolled recursion denial-of-service issues during decoding. If the skill ingests serialized metadata or external artifacts, malformed CBOR content could crash or hang processing.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: click==8.3.1 — 1 advisory(ies): PYSEC-2026-2132

High
Category
Supply Chain
Confidence
80% confidence
Finding

click is flagged with a published security advisory, and CLI frameworks can become relevant when agent skills expose commands or parse attacker-controlled arguments/options. While exploitability depends on actual usage, retaining a known-vulnerable version creates unnecessary risk.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: cryptography==46.0.5 — 11 advisory(ies): GHSA-537c-gmf6-5ccf; GHSA-g6cj-pr64-35w5; GHSA-jwv3-5hgf-82ww +8 more

High
Category
Supply Chain
Confidence
93% confidence
Finding

cryptography is pinned to a version with multiple advisories. Since this environment includes networked packages and private VCS access, weaknesses in crypto-related dependencies can affect secure transport, key handling, or certificate validation paths.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: datasets==4.5.0 — 1 advisory(ies): PYSEC-2026-3716

High
Category
Supply Chain
Confidence
83% confidence
Finding

datasets is pinned to a version with a reported advisory. In a skill that ingests external data and documentation, dataset parsing/downloading functionality may be exposed to untrusted content, increasing the practical risk.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
src/core/audit.py:25