T09 · Insecure Skill Coding Practices
- Location
SKILL.md:185- Finding
Sensitive credentials are passed through command-line arguments
- Content
View full analysis
--endpoint dataworks..aliyuncs.com] --ProjectId --Name --Type --ConnectionPropertiesMode --ConnectionProperties '' --Description "" ``` ```text - **UrlMode**: `{"envType":"Prod","address":[{"host":"","port":}],"database":"","username":"","password":""}` - **InstanceMode**: `{"envType":"Prod","instanceId":"","regionId":"","database":"","username":"","password":""}` ``` ### Technical Analysis The documented workflow places database usernames and passwords directly inside the `--ConnectionProperties` command-line argument. Although quoting can prevent basic shell expansion, it does not protect the secret from operating-system process listings, shell history, terminal capture, debug output, Agent execution logs, command auditing systems, or telemetry. The Skill prohibits printing Alibaba Cloud access keys, but it does not apply equivalent protections to database passwords or access keys embedded in data-source connection properties. Redaction performed by the remote API cannot protect a secret that has already appeared in the local process invocation. ### Attack Path 1. A user asks the Agent to create a data source. 2. The Agent constructs the documented `aliyun` command using the real database password. 3. The shell or Agent runtime records the complete invocation, or another local process observes the process arguments while the command runs. 4. An attacker with access to local history, process metadata, CI logs, terminal recordings, or Agent traces extracts the password. 5. The attacker authenticates to the database o ...[truncated 516 chars]- Remediation
View remediation
