Back to skill

Security audit

dify-flow-access

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-built to query a Dify knowledge base, but it ships a hardcoded API key and sends credentials and user queries to a default HTTP endpoint.

Review before installing. Do not use the packaged default credential; rotate or revoke it, require a user-provided secret, and configure an HTTPS Dify endpoint before sending real internal queries or conversation IDs.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/dify-workflow.sh:8
Finding

Hardcoded Dify API Bearer Credential

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/dify-workflow.sh:115
Finding

Dify Credentials and Query Data Transmitted over Plaintext HTTP

Content
View full analysis
&2 echo "🚀 Sending request..." >&2 RESPONSE=$(curl -s -X POST "$ENDPOINT" \ -H "Authorization: Bearer ${DIFY_API_KEY}" \ -H "Content-Type: application/json" \ --max-time "$DEFAULT_TIMEOUT" \ --data-binary "${WORKFLOW_PAYLOAD}") ``` ### Technical Analysis The default API URL uses unencrypted HTTP while the request contains a bearer credential and potentially sensitive user queries, workflow parameters, conversation identifiers, and responses. HTTP provides neither transport confidentiality nor cryptographic server authentication. An attacker able to observe or alter traffic on the relevant network path can capture the authorization header and request contents. An active network attacker may also modify requests or responses because the client has no TLS integrity protection. The script permits `DIFY_BASE_URL` overrides but does not require HTTPS, so insecure configurations remain accepted. ### Attack Path 1. A user runs the Skill with its default `http://10.10.10.159/v1` URL. 2. The script sends the bearer key, payload, and conversation information over plaintext HTTP. 3. An attacker with access to the local network, gateway, proxy, virtual network, or another relevant traffic-observation point captures the request. 4. The attacker reads the bearer token and sensitive request contents. 5. If the service is reachable, the attacker replays the token in independent requests. 6. Alternatively, an active attacker modifies API traffic or impersonates the endpoint and supplies manipulated responses. ...[truncated 506 chars]
Remediation
View remediation
&2 exit 1 fi ``` 4. Retain curl's default certificate verification and do not introduce `--insecure` or equivalent bypasses. 5. If a development-only HTTP override is unavoidable, require an explicit opt-in and ensure it cannot be enabled in production. 6. Rotate the currently exposed bearer key because it may already have traversed untrusted network paths. 7. Minimize API-key privileges and add server-side network allowlists, expiry controls, audit logging, and anomalous-use detection. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/dify-workflow.sh:83
Finding

JSON Request Injection through Unescaped Command-Line Input

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes multi-turn querying and workflow execution against an internal HTTP API but does not warn users that their prompts and conversation IDs/content may be transmitted to another service. This omission is dangerous because users may share sensitive internal data under the assumption it stays local, while the skill forwards it over an internal endpoint with no clear consent or sensitivity notice.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script embeds a default Dify API key directly in the code and uses it automatically for authenticated requests. Anyone with access to the script can extract and reuse the credential, potentially invoking the remote app, consuming paid resources, accessing protected workflows, or pivoting into connected data sources.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
75% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

Scanner excerpt · scripts/dify-workflow.sh (reported line 181)May include surrounding context.

sh
print("ERROR_NO_ANSWER")
        sys.exit(1)
    
    # Extract conversation_id for multi-turn support
    conv_id = data.get("conversation_id", "")
    
    # Output using a delimiter that won't appear in normal text

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are overly broad and map ordinary user language to an action that sends content to an internal API, increasing the chance of unintentional activation. In a skill that can transmit prompts and conversation context to a backend service, broad triggers create a security and privacy risk because users may not realize their request is being forwarded externally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The configuration section shows how to set API credentials but fails to warn that the key is sensitive and must not be exposed, logged, or committed. In combination with the included default key and internal service URL, this normalizes insecure secret handling and increases the likelihood of credential leakage and misuse.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill embeds a live default API key directly in documentation/configuration, giving any user of the skill an immediate authenticated capability to an internal Dify service. Hardcoded credentials are dangerous because they can be copied, reused outside intended scope, and remain valid long after the skill is distributed, enabling unauthorized access to internal knowledge bases or workflows.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This curl invocation sends data and a bearer token to an external service, and the configured default endpoint is an internal-looking IP over unencrypted HTTP. In the context of an agent skill, that is dangerous because arbitrary user input is exfiltrated off-host and authentication material may be exposed in transit or misused by the remote service.

Content

Scanner excerpt · scripts/dify-workflow.sh (reported line 113)May include surrounding context.

sh
# Execute request with timeout
echo "" >&2
echo "🚀 Sending request..." >&2
RESPONSE=$(curl -s -X POST "$ENDPOINT" \
    -H "Authorization: Bearer ${DIFY_API_KEY}" \
    -H "Content-Type: application/json" \
    --max-time "$DEFAULT_TIMEOUT" \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script transmits user-supplied query content and optional conversation context to a remote endpoint by default, and the default base URL uses plain HTTP rather than HTTPS. This creates both a privacy risk from undisclosed data sharing and a transport-security risk, because sensitive prompts and conversation IDs may be intercepted or logged by intermediaries.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The usage examples are exclusively written with Chinese query phrases such as '你好' and '如何部署?', which signals a language-specific default interaction pattern. There is no accompanying note that other languages are supported or that Chinese is merely illustrative, so this can be read as an implicit language preference without user opt-in.

Content

No source excerpt is available for this finding.