Back to skill

Security audit

ragtop-planner

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent RAGTOP marketing-planning purpose, but it needs review because it sends an API token and business knowledge-base data to a default plaintext HTTP service.

Install only if the RAGTOP endpoint is trusted and approved for the data being queried. Override the default with HTTPS, use a scoped and rotatable token, avoid production or confidential data over plaintext HTTP, and review generated plans against trusted source records because retrieved knowledge-base text can influence the output.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:15
Finding

Bearer Token Transmitted over Plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:15, SKILL.md:28-31, references/workflow.md:9-11
Vulnerability Type: Sensitive credential transmission over an unencrypted channel
Risk Level: High

Vulnerable Code

SKILL.md:15:

text
- `RAGTOP_API_URL`: API Base URL (optional, default `http://10.71.10.71:9380`)

SKILL.md:28-31:

bash
curl -L -X POST "${RAGTOP_API_URL}/api/v1/ragtop/tool/list_kb" \
  -H "Authorization: Bearer ${RAGTOP_API_TOKEN}" \
  -H "Content-Type: application/json"

Technical Analysis

The default RAGTOP API endpoint uses plaintext HTTP while requests transmit RAGTOP_API_TOKEN in the Authorization header. HTTP provides neither transport confidentiality nor server authentication. An attacker able to observe or manipulate network traffic can recover the bearer credential, inspect retrieved knowledge-base records, or alter API responses.

Because this is a bearer token, possession may be sufficient to impersonate the legitimate tenant without obtaining any additional secret. The use of an internal IP address does not provide transport security; compromised hosts, malicious network peers, unsafe proxies, and incorrectly segmented internal networks remain viable interception points.

Attack Path

  1. A user invokes the Skill without overriding the default RAGTOP_API_URL.
  2. The Skill sends an HTTP request to 10.71.10.71:9380.
  3. The request includes Authorization: Bearer ${RAGTOP_API_TOKEN} in plaintext at the transport layer.
  4. An attacker with access to the relevant network path captures the request or performs a machine-in-the-middle attack.
  5. The attacker extracts and reuses the token against RAGTOP endpoints.
  6. Subject to the token's assigned permissions, the attacker enumerates knowledge bases, lists documents, retrieves tenant data, or submits manipulated responses during interception.

Impact Assessment

Successful exploitatio ...[truncated 388 chars]

Remediation
View remediation

Remediation Suggestions

  1. Change the default endpoint to an HTTPS URL with a valid certificate.
  2. Reject http:// API URLs by default rather than silently transmitting credentials over them.
  3. If plaintext HTTP is required for isolated development, require an explicit insecure-development flag and prevent use with production tokens.
  4. Validate server certificates and hostnames; do not disable TLS verification in clients or examples.
  5. Apply narrow scopes, tenant restrictions, short expiration periods, and regular rotation to API tokens.
  6. Rotate any token that may already have been transmitted using the documented HTTP default.
  7. Consider network-level restrictions and certificate pinning where the deployment model supports them.

T09 · Insecure Skill Coding Practices

Warning
Location
references/workflow.md:114
Finding

Indirect Prompt Injection through Untrusted Knowledge-Base Content

Content
View full analysis

Vulnerability Details

File Location: references/workflow.md:114-119, references/prompts.md:10-26, references/prompts.md:94-128
Vulnerability Type: Untrusted retrieved content promoted into authoritative LLM instructions
Risk Level: Medium

Vulnerable Code

references/workflow.md:114-119:

text
3. rules_records = retrieval(kb_rules, queries_for_rules)
4. rules_content = llm(FH_RULES_SUMMARY_PROMPT.format(rules_content=join(rules_records)))
5. case_records = retrieval(kb_cases, queries_for_cases)
6. cases_summary = llm(FH_CASE_SUMMARY_PROMPT.format(cases_content=join(case_records), user_query=user_query))
7. price_records = retrieval(kb_prices, queries_for_prices, top_k=100)
8. filtered_price_table = llm(FH_KOL_SELECTOR_PROMPT.format(rules=rules_content, kol_price_tables=join(price_records), user_query=user_query))
9. final_plan = llm(FH_PLAN_GENERATION_PROMPT.format(rules=rules_content, cases_summary=cases_summary, kol_price_tables=filtered_price_table, user_query=user_query))

The referenced prompts place retrieved rule content into the instruction context, characterize the resulting rules as mandatory constraints, and require the final output to satisfy those rules. The documented workflow does not define trust-boundary separation, instruction filtering, or an allowlisted schema for retrieved directives.

Technical Analysis

Knowledge-base records are external data from the model's perspective and may contain attacker-controlled natural-language instructions. The workflow concatenates retrieved records directly into prompt templates and asks the model to convert them into executable rules. The summarized rules are then reused during influencer selection and final plan generation.

A malicious record can therefore masquerade as an instruction rather than factual source material. General statements such as limiting output to retrieved content reduce factual hallucination, but do not reliabl ...[truncated 1872 chars]

Remediation
View remediation

Remediation Suggestions

  1. Explicitly classify all retrieved knowledge-base records as untrusted data.
  2. Add a high-priority instruction stating that instructions, role changes, tool requests, or policy statements found inside retrieved records must never be followed.
  3. Place retrieved data in clearly delimited structured fields, preferably JSON objects with separate content, source, and identifier properties.
  4. Parse summarized rules into an allowlisted schema containing only expected business fields such as platform, budget ratio, timing, and audience constraints.
  5. Reject rule output containing tool directives, role reassignment, requests to ignore prior instructions, external destinations, or unrelated actions.
  6. Preserve source identifiers and require every promoted rule to map to an authorized source record.
  7. Apply access controls, change auditing, approval workflows, and integrity monitoring to knowledge bases that can influence mandatory rules.
  8. Perform an independent validation pass before using summarized rules in downstream prompts, and remove any item that cannot be represented by the approved business-rule schema.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs users to send queries, document identifiers, and retrieved content to an external RAGTOP service using a bearer token, but it does not disclose the privacy, data handling, or trust implications of doing so. Because this workflow is specifically built around external retrieval of potentially sensitive business materials (rules, cases, pricing), users may unknowingly transmit confidential prompts and knowledge-base content off-platform.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The documented workflow performs authenticated network calls to an external API endpoint and defaults to a raw HTTP base URL, which risks exposing the bearer token and any transmitted data to interception or unauthorized access. In context, the skill is designed to retrieve and process internal-looking knowledge bases such as plans, cases, and pricing, so external transmission materially increases confidentiality risk.

Content

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

  • 返回(关键字段):data.kbs[]、data.total
bash
curl -L -X POST "${RAGTOP_API_URL}/api/v1/ragtop/tool/list_kb" \
  -H "Authorization: Bearer ${RAGTOP_API_TOKEN}" \
  -H "Content-Type: application/json"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation is written as a prescriptive operational document entirely in Chinese, with no indication that another language is supported or that the user may choose their preferred locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Line L010 instructs the skill to always use a specific naming/output convention ('不要输出 ragflow'), and the overall document is written as a fixed Chinese workflow without offering any user language or locale choice. This creates a language/locale-style policy concern because the workflow appears to constrain output terminology without opt-in or documented justification.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The workflow instructs the skill to transmit user-derived queries and retrieved planning data to an external RAGTOP service over HTTP, with a default endpoint set to a private-network IP. This creates a genuine data egress surface: sensitive user prompts, tenant knowledge identifiers, and potentially proprietary business content may be sent off-process without any documented consent checks, destination validation, or transport-security guarantees.

Content

Scanner excerpt · references/workflow.md (reported line 32)May include surrounding context.

推荐 payload(示例):

bash
curl -L -X POST "${RAGTOP_API_URL}/api/v1/ragtop/tool/retrieval" \
  -H "Authorization: Bearer ${RAGTOP_API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The instruction '输出中统一使用 ragtop 命名' imposes a fixed language/locale-style output convention. The file does not indicate that users may choose their preferred terminology or that this constraint is justified by a documented regional or compliance requirement.

Content

No source excerpt is available for this finding.