T09 · Insecure Skill Coding Practices
- Location
scripts/call-dify-workflow.md:30- Finding
Hardcoded Dify Workflow API Credentials
- Content
View full analysis
Vulnerability Details
File Location:
scripts/call-dify-workflow.md:30-35
Vulnerability Type: Hardcoded API credentials
Risk Level: HighVulnerable Code
The following API keys are embedded directly in the distributed workflow documentation:
text Workflow 01: app-ij16kVlWSBo4tibxh0fXuRod Workflow 02: app-qPkxVCM2IpzgQHedkrU7XdjZ Workflow 03: app-JgNEhHO22EuxoJ6xsN8H0YSS Workflow 04: app-jkqO3Tn6FDR15z7zieQf2shoTechnical Analysis
Four Dify Workflow API keys are stored in plaintext inside the project package. Anyone who can download, clone, inspect, archive, or otherwise access the Skill can recover these credentials without authentication.
The documentation identifies the keys as development-environment credentials and acknowledges that API keys should not be hardcoded. This warning does not protect the exposed values. Their current validity and exact permissions cannot be established through static analysis, but they must be treated as compromised secrets.
If valid, an attacker can use the keys outside the intended Skill and submit requests directly to the associated Dify workflows. Any authorization, quotas, data access, or billable operations attached to the keys would be available to the attacker.
Attack Path
- An attacker obtains a copy of the Skill package or repository.
- The attacker opens
scripts/call-dify-workflow.md. - The attacker extracts the four plaintext API keys.
- The attacker constructs requests for the documented Dify Workflow API.
- The attacker invokes workflows under the application identities represented by the exposed keys.
- The attacker may consume service resources, exhaust quotas, submit malicious workflow inputs, or access workflow capabilities permitted to those credentials.
Impact Assessment
Exploitation does not grant local operating-system privileges based on the reviewed files. The affected scope is the remote Dify environme ...[truncated 500 chars]
- Remediation
View remediation
Remediation Suggestions
- Revoke and rotate all four exposed API keys immediately; removing them from the current file is insufficient because copies may already exist.
- Remove the credentials from the project package, repository history, release archives, logs, and documentation.
- Obtain credentials at runtime from an approved secret manager or protected environment variables.
- Do not place secrets in command-line arguments, generated documentation, frontend configuration, or other locations visible to untrusted users.
- Assign a separate credential to each workflow and environment.
- Apply least-privilege permissions, restrictive quotas, expiration dates, and source restrictions where supported.
- Audit Dify access logs for unexpected calls made with the exposed keys.
- Add automated secret scanning to pre-commit and continuous-integration checks.
- Ensure examples use nonfunctional placeholders such as
DIFY_API_KEY, never realistic secret values.
