Back to skill

Security audit

Cross-Agent Sync

Security checks across malware telemetry and agentic risk

Overview

The skill is mostly coherent, but its query mode can pull sensitive local agent transcripts from unrelated projects into output or local files.

Review this skill before installing. Use narrow project-specific queries, inspect generated .agent-sync/imports files as sensitive local data, and do not commit raw imports. A safer version would require project_match by default even in query mode, with an explicit opt-in for cross-project recovery and warnings/redaction for transcript output.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/agent_sync.py:303
Finding
Query Mode Collects Transcripts Outside the Selected Project## Vulnerability Details **File Location**: `scripts/agent_sync.py:303-311` **Vulnerability Type**: Cross-project transcript access caused by incomplete scope enforcement **Risk Level**: Medium ### Vulnerable Code ```python query_match = not args.query or session["relevance"] >= len(args.query) project_match = is_within(session.get("cwd"), project) if args.query: if not query_match: continue elif not project_match: continue session["project_match"] = project_match sessions.append(session) ``` ### Technical Analysis Session discovery recursively enumerates recent JSONL files from the user's Claude Code and Codex session stores. The code calculates whether each session's recorded working directory is within the selected project, but it only enforces that boundary when no query is supplied. When `--query` is present, a textual match replaces the project-boundary requirement. Consequently, a common, broad, or attacker-influenced query can select sessions belonging to unrelated projects. The selected session data can include visible user and assistant messages, session identifiers, working directories, and absolute source paths. This violates least privilege because a project synchronization operation can collect transcript data outside the target project's scope. Confining written packets to `.agent-sync/imports/` reduces accidental Git publication but does not prevent the unrelated data from being read, printed, copied into the target project, or exposed to a subsequent agent. ### Attack Path 1. An agent or operator invokes `sync`, `recent`, `list`, or `import` for a selected project and supplies a broad or attacker-chosen `--query`. 2. The script recursively searches all recent Claude Code and Codex transcript files under the configured session roots. 3. A transcript from an unrelated project contains the query term. 4. `project_match` evaluates to false, but the result is not enforced becaus ...[truncated 970 chars]
Remediation
## Remediation Suggestions 1. Require `project_match` for all normal discovery operations, including query mode: ```python query_match = not args.query or session["relevance"] >= len(args.query) project_match = is_within(session.get("cwd"), project) if not project_match: continue if not query_match: continue ``` 2. If cross-project recovery is a legitimate use case, place it behind an explicit option such as `--include-other-projects`. Clearly warn that the option may expose unrelated and sensitive transcript content. 3. Reject sessions with missing or unparseable working-directory metadata by default instead of allowing query matches to bypass project attribution. 4. Minimize packet metadata by omitting absolute transcript source paths and unrelated working-directory paths unless the operator explicitly requests them. 5. Add best-effort redaction for common credential formats before printing or writing transcript excerpts. Continue warning that automated redaction cannot guarantee removal of every secret. 6. Add regression tests demonstrating that: - Query mode excludes sessions outside the selected project. - Broad query terms cannot bypass project isolation. - Sessions with missing working-directory metadata fail closed. - Any explicit cross-project option requires deliberate opt-in and is clearly represented in output.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill instructs the agent to read session logs, write import packets and curated ledger files, and run shell commands, but it does not declare permissions for those capabilities. This creates a transparency and policy-enforcement gap: a harness or reviewer may treat the skill as lower risk than it really is, while the skill can still access sensitive local transcript content and modify repository state.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill reads and prints recent Claude/Codex session contents, which can include secrets, credentials, proprietary code, or sensitive prompts, but it does so without a strong runtime warning, redaction step, or confirmation gate. In a cross-agent sync tool, transcript exposure is part of the feature, which makes the context more dangerous because users may run it routinely and accidentally disclose sensitive conversation data to stdout, logs, or downstream tooling.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The tool writes repository-local import packets containing imported session data, repository state, and curated progress without requiring explicit confirmation or presenting a strong warning about sensitivity. Although `.agent-sync/imports/` is gitignored locally, these files still persist on disk and may be exposed via backups, local sharing, misconfigured ignore rules, or later manual copying; the skill context increases risk because its core purpose is aggregating cross-session evidence.

VirusTotal

65/65 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
tests/test_agent_sync.py:20