Back to skill

Security audit

Rag Retrieve

Security checks for vulnerabilities and agentic risk

Overview

This RAG retrieval skill has a coherent purpose, but it needs Review because its normal retrieval path can expose user code and contains unsafe shell-based requests that could run injected commands.

Review this skill carefully before installing. Use it only with trusted local embedding, reranking, LLM, and TiDB services; avoid sensitive repositories until the shell-based curl calls are replaced with structured HTTP client calls, user-codebase retrieval is opt-in, and TiDB uses a scoped read-only account.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:268
Finding

Shell Command Injection in the Embedding Service Request

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:325
Finding

Shell Command Injection in the Reranking Service Request

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:355
Finding

User Source Code May Be Disclosed to a Configurable LLM Endpoint

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:283
Finding

TiDB Retrieval Uses an Unrestricted Root Account

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The unconditional trigger 'always called by coding-orchestrator before generation' causes this skill to run on every coding task, including ones that may contain secrets, proprietary code, or sensitive prompts. Because this skill performs networked retrieval and optional inclusion of user codebase chunks, overly broad auto-invocation increases unintended data exposure and expands the attack surface without explicit user consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The standalone trigger 'find docs about X' is vague and underspecified, which can cause the skill to activate for loosely related requests and send user queries to retrieval, embedding, reranking, and database components unexpectedly. In this skill's context, vague activation is more dangerous because it can include user_codebase material and route content through multiple services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill does not warn users that their queries and potentially user_codebase content may be transmitted to localhost network services for embedding and reranking. Even if those services are local, they are separate network-reachable processes with their own logging and compromise risks, so the lack of disclosure undermines informed consent and safe handling of sensitive code.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The embedding helper transmits supplied text to an HTTP service using curl, which creates a real data-exposure path for user queries and potentially sensitive code fragments. In this skill, the risk is amplified because the tool is broadly triggered and supports user_codebase retrieval, so proprietary source or secrets present in prompts can be sent to another process or service without strong validation, authentication, or user awareness.

Content

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

md
# Assumes an embedding model is loaded globally
    # In practice, run a persistent MLX server and HTTP call it
    response = await shell.run(
        f"curl -X POST http://localhost:8888/embed "
        f"-H 'Content-Type: application/json' "
        f"-d '{json.dumps({\"texts\": texts})}'"
    )

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The docstring at L261-L262 says embeddings are produced 'via local MLX nomic-embed-text or bge-m3', suggesting in-process local model use. The actual code at L268-L272 invokes curl against http://localhost:8888/embed, and even comments at L267 acknowledge an HTTP call instead, so the documentation contradicts the implementation approach.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The docstring at L317-L318 says candidates are reranked 'using bge-reranker-v2-m3 (local)'. In practice, L325-L329 shell out to curl and call http://localhost:8889/rerank, which is a different execution model than the documentation implies; the nearby comment at L324 confirms this networked endpoint behavior.

Content

No source excerpt is available for this finding.