Back to skill

Security audit

Cross-Agent Sync

Security checks for vulnerabilities and agentic risk

Overview

This skill is local-only and purpose-aligned, but it can read and persist sensitive agent transcripts from outside the selected project when query search is used.

Review before installing if your Claude or Codex history contains private client work, secrets, or unrelated projects. Prefer running without broad --query terms, inspect generated .agent-sync/imports files before any agent uses them, never commit raw imports, and install from a pinned reviewed commit or release where possible.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/agent_sync.py:321
Finding

Query-Based Discovery Bypasses Project Isolation and Can Import Unrelated Private Transcripts

Content
View full analysis
dict[str, list[Path]]: claude_base = Path(os.environ.get("CLAUDE_CONFIG_DIR", str(Path.home() / ".claude"))).expanduser() codex_base = Path(os.environ.get("CODEX_HOME", str(Path.home() / ".codex"))).expanduser() return { "claude": [claude_base / "projects"], "codex": [codex_base / "sessions", codex_base / "archived_sessions"], } def source_paths(agent: str, include_subagents: bool) -> list[tuple[str, Path]]: selected = ["claude", "codex"] if agent == "both" else [agent] result: list[tuple[str, Path]] = [] for source in selected: for root in session_roots()[source]: if not root.exists(): continue for path in root.rglob("*.jsonl"): if source == "claude" and not include_subagents and "subagents" in path.parts: continue result.append((source, path)) return result ``` ```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) ``` The accepted sessions are subsequently rendered into an import packet: ```python def markdown_sessions(sessions: Sequence[dict[str, Any]]) -> str: if not sessions: return "_No matching visible sessions found._\n" lines: list[str] = [] for session in sessions: lines.extend( [ f"## {session['source'].title()} · {session['session_id']}", "", f"- Updated: {session['updated_at']}", f"- CWD: ...[truncated 3827 chars]
Remediation
View remediation
= 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 search is a required feature, place it behind an explicit option such as `--include-outside-project`. The option should: - Default to disabled. - Emit a prominent privacy warning. - Require explicit confirmation for packet writes. - Clearly label every out-of-project result. - Be disallowed in unattended operation unless separately authorized. 3. Separate project-scoped discovery from global transcript search at the API level so a future refactor cannot accidentally omit the boundary check. 4. Treat transcript content as untrusted data: - Wrap imported messages in explicit inert-data delimiters. - Add a warning immediately before each transcript section that its content must not be executed or treated as instructions. - Escape or label instruction-like content rather than presenting it as ordinary operational guidance. 5. Avoid including full absolute source paths unless the operator explicitly requests them. Prefer redacted paths or stable local identifiers. 6. Add regression tests proving that: - Query mode rejects sessions whose CWD is outside the project. - Common query terms cannot cause cross-project imports. - An explicit override is required for global searches. - Out-of-project transcript text is never written without that override. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:58
Finding

Documented Installation Uses Unpinned Executable and Mutable Remote Skill Source

Content
View full analysis
Remediation
View remediation
add ``` 2. Pin the Skill itself to an immutable release tag or full commit hash. Do not rely on the repository's default branch for security-sensitive installation instructions. 3. Publish checksums or signed release artifacts and document a verification step before installation or execution. 4. Use npm lockfiles and integrity metadata where applicable. Review transitive dependencies associated with the installer. 5. For manual installation, recommend cloning without immediately executing code, checking out a documented commit, and verifying it: ```bash git clone https://github.com/AntreasAntoniou/cross-agent-sync.git cd cross-agent-sync git checkout --detach git verify-commit ``` 6. Document the trust boundary clearly: installation commands can execute third-party code, while the audited runtime script itself performs no network requests. 7. Consider distributing versioned release archives with signed provenance so users can verify that installed files correspond exactly to the audited release. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (14)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Use `scripts/agent_sync.py` as the deterministic transport. Raw transcript excerpts are local evidence; `.agent-sync/events.jsonl` and `.agent-sync/PROGRESS.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Use `scripts/agent_sync.py` as the deterministic transport. Raw transcript excerpts are local evidence; `.agent-sync/events.jsonl` and `.agent-sync/PROGRESS.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Use `scripts/agent_sync.py` as the deterministic transport. Raw transcript excerpts are local evidence; `.agent-sync/events.jsonl` and `.agent-sync/PROGRESS.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Use `scripts/agent_sync.py` as the deterministic transport. Raw transcript excerpts are local evidence; `.agent-sync/events.jsonl` and `.agent-sync/PROGRESS.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Use `scripts/agent_sync.py` as the deterministic transport. Raw transcript excerpts are local evidence; `.agent-sync/events.jsonl` and `.agent-sync/PROGRESS.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Use `scripts/agent_sync.py` as the deterministic transport. Raw transcript excerpts are local evidence; `.agent-sync/events.jsonl` and `.agent-sync/PROGRESS.md`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Use `scripts/agent_sync.py` as the deterministic transport. Raw transcript excerpts are local evidence; `.agent-sync/events.jsonl` and `.agent-sync/PROGRESS.md`

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The README instructs users to run npx skills add AntreasAntoniou/cross-agent-sync without pinning a specific version or commit. That creates a supply-chain risk because the fetched package or referenced content can change over time, allowing a compromised upstream release or namespace takeover to deliver different code than the user reviewed.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill clearly instructs the operator to run shell commands and use a Python script that reads local session logs and writes curated state under .agent-sync/, but it does not declare any explicit tool scope such as allowed tools or permissions. That mismatch is risky because consumers of the skill cannot reliably enforce least privilege, and a harness may grant broader file, shell, or environment access than the skill actually needs.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/agent_sync.py (reported line 64)May include surrounding context.

python
def infer_project_root(raw: str | None) -> Path:
    start = Path(raw).expanduser().resolve() if raw else Path.cwd().resolve()
    try:
        result = subprocess.run(
            ["git", "-C", str(start), "rev-parse", "--show-toplevel"],
            check=True,
            text=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/agent_sync.py (reported line 281)May include surrounding context.

python
for query in queries:
        command = ["rg", "-l", "-i", "-F", "--", query, *[str(path) for path in current]]
        try:
            result = subprocess.run(command, text=True, capture_output=True)
        except OSError:
            return None
        if result.returncode not in {0, 1}:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/agent_sync.py (reported line 373)May include surrounding context.

python
def git_snapshot(project: Path) -> str:
    def run_git(*values: str) -> str:
        try:
            result = subprocess.run(
                ["git", "-C", str(project), *values],
                check=True,
                text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The import path can write a local markdown packet containing recent Claude/Codex transcript content, repository state, and curated progress to disk, but this execution path only embeds a warning inside the generated file rather than presenting an explicit runtime disclosure or consent gate before persistence. Because transcript content may contain secrets, proprietary code, tokens, or sensitive prompts, this can lead to unintended local data retention and later disclosure via backups, indexing, sharing, or accidental commits.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The sync command automatically regenerates progress state and writes a fresh import packet derived from session logs without any interactive notice at execution time. In this skill's context, the entire purpose is cross-agent reconciliation of transcript data, which increases sensitivity because it intentionally aggregates conversation content from local agent histories into durable files, raising the chance of privacy leakage or accidental propagation of secrets.

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
tests/test_agent_sync.py:20