T09 · Insecure Skill Coding Practices
- Location
scripts/passwd.py:87- Finding
Administrator Password Disclosed Through Standard Output and Agent Conversation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/passwd.py:87-96; related instruction atSKILL.md:267-268
Vulnerability Type: Plaintext credential disclosure
Risk Level: HighVulnerable Code and Instructions
python if not admin_password: print("\nNew FlexusAgent admin password") admin_password = prompt_for_input( "New FlexusAgent admin password (required)", required=True ) print(f" Resource ID: {resource_id}") print(f" Region: {region_id}") print(f" Admin Password: {admin_password}") print(f" Timeout: {timeout} seconds")The Skill instructions additionally require the Agent to disclose the new password:
markdown > **Mandatory Constraint**: After changing password, reply: > `"Web UI: http://<public-ip>:80; Login email: super@dify.com, Password: <new-password>"`Technical Analysis
The password-change workflow obtains a new FlexusAgent administrator password from a command-line argument or interactive input. The script then writes the complete plaintext value to standard output.
This behavior contradicts the Skill's own security rules prohibiting credential output. Standard output may be retained by Agent execution infrastructure, terminal history capture, CI/CD logs, monitoring systems, or other logging facilities. The instruction in
SKILL.mdfurther requires the Agent to repeat the password in the conversation, placing it in persistent conversation records.The interactive prompt also omits
hide_input=True, so password entry may be displayed directly in an interactive terminal.The trust boundary crossed is between transient secret input intended for the FlexusAgent administrator account and persistent or broadly accessible execution and conversation records.
Attack Path
- A user invokes the
passwdcommand and supplies a new administrator password. do_change_flexusagent_admin_password()stores the password inadmin_password.- Line 96 prints the complete value to ...[truncated 889 chars]
- A user invokes the
- Remediation
View remediation
Remediation Suggestions
- Remove the plaintext password output entirely:
python print(" Admin Password: [REDACTED]")- Collect interactive passwords using hidden input:
python admin_password = prompt_for_input( "New FlexusAgent admin password (required)", required=True, hide_input=True, )- Remove the
SKILL.mdrequirement to return the password in the conversation. Return only a success message and the Web UI address. - Never include passwords in exceptions, execution output, telemetry, or debug logs.
- Prefer a secure secret-delivery mechanism that allows the user to set or retrieve the password without exposing it to the Agent transcript.
- Review and purge existing execution logs and conversation records that may contain previously disclosed passwords, subject to applicable retention controls.
