Back to skill

Security audit

Memory Orchestrator

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it asks for persistent local monitoring, broad Codex session scanning, shared cross-agent state, and clipboard/app handoff behavior that users should review carefully before installing.

Install only if you want always-on local conversation monitoring. Before enabling it, review or remove the AGENTS.md hook, heartbeat/cron/task-scheduler setup, full-history scan, clipboard handoff, and cross-agent registry features. Prefer dry-run/manual modes and confirm the exact project, session range, and target app before exporting or handing off recovery text.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This mismatch includes undocumented cross-agent registry, liveness markers, and cross-check behavior, which are materially different from simple memory orchestration. Hidden shared-state coordination can expose metadata across agents or projects and create privacy surprises even if no full conversation text is stored.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This mismatch includes undocumented cross-agent registry, liveness markers, and cross-check behavior, which are materially different from simple memory orchestration. Hidden shared-state coordination can expose metadata across agents or projects and create privacy surprises even if no full conversation text is stored.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This mismatch includes undocumented cross-agent registry, liveness markers, and cross-check behavior, which are materially different from simple memory orchestration. Hidden shared-state coordination can expose metadata across agents or projects and create privacy surprises even if no full conversation text is stored.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

This mismatch includes undocumented cross-agent registry, liveness markers, and cross-check behavior, which are materially different from simple memory orchestration. Hidden shared-state coordination can expose metadata across agents or projects and create privacy surprises even if no full conversation text is stored.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This mismatch includes undocumented cross-agent registry, liveness markers, and cross-check behavior, which are materially different from simple memory orchestration. Hidden shared-state coordination can expose metadata across agents or projects and create privacy surprises even if no full conversation text is stored.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This mismatch includes undocumented cross-agent registry, liveness markers, and cross-check behavior, which are materially different from simple memory orchestration. Hidden shared-state coordination can expose metadata across agents or projects and create privacy surprises even if no full conversation text is stored.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

This mismatch includes undocumented cross-agent registry, liveness markers, and cross-check behavior, which are materially different from simple memory orchestration. Hidden shared-state coordination can expose metadata across agents or projects and create privacy surprises even if no full conversation text is stored.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · SKILL.md (reported line 82)May include surrounding context.

天运行 python3 <skill>/scripts/monitor_dialogs.py --days 14 --write-state,仅在状态变化时汇报(本机已有同名自动化)。

  • Windows:任务计划程序创建每日任务(schtasks /create /tn "MemoryOrchestratorMonitor" /sc daily /st 09:30 /tr "python <skill路径>\scripts\monitor_dialogs.py --days 14 --write-state"),系统用户登录即开始。
  • Linux/WSL:crontab -e 加 30 9 * * * python3 <skill-path>/scripts/monitor_dialogs.py --days 30 --write-state。
  • 无法注册系统定时任务的受限环境:把“打开新会话时运行一次 monitor_dialogs.py”写进该环境 AGENTS.md,作为降级触发。
  • 存量全量检测(R1):安装完成即运行一次
    sh
    python3 $CODEX_HOME/skills/memory-orchestrator/scripts/monitor_dialogs.py --all --write-state
    # --all 关闭时间过滤全量扫历史,与 --days 互斥;结果写 state.json.index:last_full_scan / scanned_files / 每会话 over_warned
    # 同一对话框提�
    

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/recovery_prompt.py (reported line 36)May include surrounding context.

python
"不得丢失未决问题、关键数字与文件路径。完成后按 memory-orchestrator 规则做校验并保留长期记忆。\n"
        f"交接信息(生成于 {ts}):{src}"
    )
    return prompt

def main():
    ap = argparse.ArgumentParser(description="生成 create_thread 提示词(恢复包承接)")

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 150)May include surrounding context.

python
_fake_rollout(sessions, "00000000-0000-0000-0000-000000000001", 9)  # over
        _fake_rollout(sessions, "00000000-0000-0000-0000-000000000002", 6)
        tmp_state = Path(d) / "state.json"
        env = dict(os.environ, CODEX_MEMORY_STATE=str(tmp_state))
        r1 = subprocess.run([PY, str(SCRIPTS / "monitor_dialogs.py"), "--all",
                             "--sessions-dir", str(sessions), "--write-state", "--json"],
                            capture_output=True, text=True, env=env, timeout=60)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 173)May include surrounding context.

python
fd, td = tempfile.mkstemp(suffix=".json")
    os.close(fd)
    try:
        env = dict(os.environ, CODEX_MEMORY_STATE=td)
        for _ in range(7):
            _run_state(env, "bump", "active_project=pp", "thread_id=ta", "agent=claude")
        for _ in range(7):

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 406)May include surrounding context.

python
fd, td = tempfile.mkstemp(suffix=".json")
    os.close(fd)
    try:
        env = dict(os.environ, CODEX_MEMORY_STATE=td)
        for _ in range(7):
            _run_state(env, "bump", "active_project=pp", "thread_id=ta", "agent=claude")
        for _ in range(7):

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 198)May include surrounding context.

python
def p_handoff_gateway():
    with tempfile.TemporaryDirectory() as d:
        env = dict(os.environ, CODEX_MEMORY_STATE=str(Path(d) / "state.json"))
        r = subprocess.run([PY, str(SCRIPTS / "handoff_gateway.py"), "--agent", "cursor",
                            "--project", "demo", "--out-dir", str(Path(d) / "out"),
                            "--dry-run", "--json"], capture_output=True, text=True, env=env, timeout=60)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 265)May include surrounding context.

python
def _cp_env():
    fd, cpdb = tempfile.mkstemp(suffix=".db")
    os.close(fd)
    env = dict(os.environ, CP_MEMORY_DB_PATH=cpdb)
    return env, cpdb

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 380)May include surrounding context.

python
if sys.platform != "darwin":
        print("  (state 不可写降级测试跳过:非 macOS)")
        return
    env = dict(os.environ, CODEX_MEMORY_STATE="/System/Volumes/Data/_memory_orch_selftest_nowrite/state.json")
    r = subprocess.run([PY, str(SCRIPTS / "state.py"), "bump", "active_project=fb", "thread_id=f1"],
                       capture_output=True, text=True, env=env, timeout=30)
    assert r.returncode == 0, r.stderr[-800:]

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 393)May include surrounding context.

python
if sys.platform != "darwin":
        print("  (recovery 不可写降级测试跳过:非 macOS)")
        return
    env = dict(os.environ, RECOVERY_INDEX="/System/Volumes/Data/_memory_orch_selftest_nowrite/recovery-index.md")
    r = subprocess.run([PY, str(SCRIPTS / "recovery.py"), "--add", "fb", "/tmp/fb.md"],
                       capture_output=True, text=True, env=env, timeout=30)
    assert r.returncode == 0, r.stderr[-800:]

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 442)May include surrounding context.

python
fd, td = tempfile.mkstemp(suffix=".json")
    os.close(fd)
    try:
        env = dict(os.environ, CODEX_MEMORY_STATE=td, PYTHON=PY)
        r = subprocess.run(["bash", str(SCRIPTS / "agent_hook.sh"), "active_project=hk", "thread_id=d1"],
                           check=True, capture_output=True, text=True, env=env)
        out = json.loads(r.stdout)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/self_test.py (reported line 469)May include surrounding context.

python
fd, tf = tempfile.mkstemp(suffix=".md")
    os.close(fd)
    try:
        env = dict(os.environ, RECOVERY_INDEX=tf)
        subprocess.run([PY, str(SCRIPTS / "recovery.py"), "--add", "demo", "/tmp/demo.md"], check=True,
                       capture_output=True, env=env)
        text = Path(tf).read_text(encoding="utf-8")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

Line L45 states the platform display uses a Chinese name, and the surrounding file is entirely Chinese-language without any indication of user language choice or opt-in. This can indicate a language/locale policy issue because the skill presentation appears to force a specific language rather than offering alternatives.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents capabilities that touch environment variables, local files, shell commands, scheduling, and possible network-adjacent deep links, but it does not declare an explicit tool/permission scope. That creates a least-privilege failure: an agent or reviewer cannot easily constrain what the skill is allowed to do, increasing the chance of unintended filesystem access, shell execution, or external app invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The display name and full operational description are written in Chinese, and the instructions and trigger terms are presented only in Chinese without an explicit opt-in or alternative locale. This can amount to a language/locale policy violation because the skill implicitly forces a specific language for use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Broad trigger phrases such as '总结/压缩/恢复/交接/开新对话/checkpoint' are likely to occur in normal conversation, causing accidental activation of file processing, state updates, or handoff flows. When a skill can write files, invoke shell commands, or prepare cross-app transfers, ambiguous triggers materially increase the chance of unintended sensitive operations.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The skill recommends persistence mechanisms such as cron, scheduled tasks, heartbeat automation, and AGENTS.md startup hooks so it can continue scanning sessions and updating state automatically. Persistent background execution increases blast radius if the skill is misconfigured or abused, and it can continuously access session logs and metadata beyond a single interactive request.

Content

Scanner excerpt · SKILL.md (reported line 82)May include surrounding context.

  • 安装后如何自动开始(按平台,不需用户每次手动跑):
    • macOS 桌面 Codex:在 Codex 里建 heartbeat/cron 自动化,每天运行 python3 <skill>/scripts/monitor_dialogs.py --days 14 --write-state,仅在状态变化时汇报(本机已有同名自动化)。
    • Windows:任务计划程序创建每日任务(schtasks /create /tn "MemoryOrchestratorMonitor" /sc daily /st 09:30 /tr "python <skill路径>\scripts\monitor_dialogs.py --days 14 --write-state"),系统用户登录即开始。
    • Linux/WSL:crontab -e 加 30 9 * * * python3 <skill-path>/scripts/monitor_dialogs.py --days 30 --write-state。
    • 无法注册系统定时任务的受限环境:把“打开新会话时运行一次 monitor_dialogs.py”写进该环境 AGENTS.md,作为降级触发。
  • 存量全量检测(R1):安装完成即运行一次
    sh

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill includes behavior to create or open new threads in external agent apps and write audit logs about those jumps, even though the manifest frames it as local memory orchestration. Crossing application boundaries can leak sensitive recovery text, project identifiers, or thread metadata into other apps without sufficiently clear user intent or review.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Clipboard injection, deep-link generation with embedded text, and app launching are high-risk automation primitives because they can move sensitive context across trust boundaries and trigger actions in other software. In a memory-management skill, these behaviors are more dangerous because the data being handled is likely to be conversation history, decisions, and project context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.