T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
Hard-Coded CRM Credentials Exposed in Documentation and Script Output
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:34-36,SKILL.md:115, andscripts/main.sh:26-27
Vulnerability Type: Hard-coded credentials and plaintext secret disclosure
Risk Level: HighVulnerable Code
SKILL.md:34-36:bash # Fill credentials: username="weiyj", password="weiyj123" agent-browser fill @<username_field> "weiyj" agent-browser fill @<password_field> "weiyj123"SKILL.md:115:text - Verify credentials are correct: weiyj / weiyj123scripts/main.sh:26-27:bash echo "CRM login URL: https://niw26kl7.fractaltest.cn/Crm/Backend/login.html" echo "Login username: weiyj | Password: weiyj123"The final snippet is an English rendering of the source strings; the URL, username, password, and executable behavior are unchanged.
Technical Analysis
A reusable CRM username and password are embedded directly in the skill documentation and shell script. Secrets stored in source files are accessible to anyone who can read the package, repository history, archives, build artifacts, or deployment image.
The shell script compounds the exposure by printing the CRM URL and credentials to standard output. Consequently, the password may be captured in terminal scrollback, CI/CD logs, agent execution transcripts, monitoring systems, or redirected output files.
Exploitation does not require code execution or sophisticated techniques. An attacker only needs read access to the skill package or access to output from
scripts/main.sh. The exposed credential can then be submitted to the declared CRM login endpoint. No evidence establishes the exact server-side permissions of this account, so the maximum privilege level cannot be stated; however, the documented workflow demonstrates that the account is intended to authenticate and create CRM records.Attack Path
- An attacker obtains read access to the skill package, repository, artifact, agent transcr ...[truncated 1483 chars]
- Remediation
View remediation
Remediation Suggestions
- Immediately rotate or revoke the exposed CRM password and invalidate active sessions associated with the account.
- Investigate CRM authentication logs for unexpected access, record creation, modification, deletion, or export activity.
- Remove the username and password from
SKILL.md,scripts/main.sh, repository history, packaged artifacts, examples, logs, and agent transcripts wherever feasible. - Retrieve credentials at runtime from an approved secret manager or protected environment variables. Do not place secret values in command output, documentation, source code, command-line arguments, or error messages.
- Change the shell script so it never prints passwords. If diagnostic output is required, display only a redacted identifier such as
Password: [REDACTED]. - Require operators or the execution environment to supply authentication securely at runtime. Fail safely when credentials are absent rather than falling back to a hard-coded value.
- Use a dedicated service account restricted to the minimum CRM operations needed by the skill. Deny data export, user administration, destructive actions, and unrelated record access unless explicitly required.
- Enable multi-factor authentication, short-lived credentials, session expiration, login rate limiting, and source restrictions where supported.
- Add automated secret scanning to source-control and release pipelines to prevent future committed credentials.
- Add log-redaction controls so authentication values cannot be captured by CI/CD systems, agent transcripts, terminal recording, or monitoring tools.
