Back to skill

Security audit

Dify RAG

Security checks for vulnerabilities and agentic risk

Overview

The verdict is benign because the reported retrieval requests appear purpose-aligned, though the partial review flags privacy and permission questions that merit attention.

Before installing, check whether the configured Dify service is one you trust and whether your queries may contain sensitive information. The verdict is benign, not risk-free; Skillspector's review was partial because a referenced local path was missing, and runtime permissions are unknown.

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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

方式二:直接 curl(脚本不可用时)

bash
curl -s -X POST "$DIFY_API_BASE/v1/datasets/$DIFY_DATASET_ID/retrieve" \
  -H "Authorization: Bearer $DIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<关键词>","retrieval_model":{"top_k":5,"search_method":"semantic_search","reranking_enable":false,"score_threshold_enabled":false}}'

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

方式二:直接 curl(脚本不可用时)

bash
curl -s -X POST "$DIFY_API_BASE/v1/datasets/$DIFY_DATASET_ID/retrieve" \
  -H "Authorization: Bearer $DIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<关键词>","retrieval_model":{"top_k":5,"search_method":"semantic_search","reranking_enable":false,"score_threshold_enabled":false}}'

Code capability 'env' detected in scripts/search.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in scripts/search.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

方式二:直接 curl(脚本不可用时)

bash
curl -s -X POST "$DIFY_API_BASE/v1/datasets/$DIFY_DATASET_ID/retrieve" \
  -H "Authorization: Bearer $DIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<关键词>","retrieval_model":{"top_k":5,"search_method":"semantic_search","reranking_enable":false,"score_threshold_enabled":false}}'

The retrieval workflow sends search queries to Dify without warning that query content leaves the local environment.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The instructed API request transmits query text to the configured Dify endpoint, which defaults to the hosted api.dify.ai service. Although the skill emphasizes read-only access, it does not warn that queries derived from user requests or internal research may disclose sensitive information to that service; read-only access does not prevent this disclosure.

Content

No source excerpt is available for this finding.