T09 · Insecure Skill Coding Practices
Note
- Location
- SKILL.md:72
- Finding
- Unnecessary Provisioning of Alibaba Cloud Credentials## Vulnerability Details **File Location**: `SKILL.md`, lines 72-74 **Vulnerability Type**: Unnecessary exposure of cloud credentials to the runtime environment **Risk Level**: Low **Affected Code**: ```markdown - Configure least-privilege Alibaba Cloud credentials before execution. - Prefer environment variables: `ALICLOUD_ACCESS_KEY_ID`, `ALICLOUD_ACCESS_KEY_SECRET`, optional `ALICLOUD_REGION_ID`. - If region is unclear, ask the user before running mutating operations. ``` ### Technical Analysis The Skill instructs users to configure Alibaba Cloud credentials even though the reviewed implementation does not access these environment variables or perform authenticated operations. The script only issues unauthenticated HTTP GET requests to public Alibaba Cloud documentation and metadata endpoints through `urllib.request.urlopen`. Provisioning credentials therefore exceeds the minimum privileges required for the declared documentation-review functionality. Placing secrets in environment variables unnecessarily exposes them to the launched process and potentially to debugging tools, process inspection, crash diagnostics, child processes, or future modifications to the Skill. The current implementation does not transmit or otherwise use these credentials, and no credential-exfiltration behavior was identified. The risk arises from avoidable secret exposure rather than a demonstrated attempt to steal credentials. ### Attack Path 1. A user follows the prerequisite instructions in `SKILL.md`. 2. The user exports an Alibaba Cloud access-key ID and secret into the runtime environment. 3. The user launches the review script in that credential-bearing environment. 4. Although the current script does not read the credentials, they are unnecessarily available to the process and may be exposed through runtime inspection, diagnostics, a compromised execution environment, or future code changes. 5. If obtained by another component, ...[truncated 684 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the Alibaba Cloud credential prerequisite from `SKILL.md`. 2. Explicitly state that the current reviewer accesses public metadata and documentation endpoints and requires no cloud credentials. 3. Remove the reference to mutating operations because the implementation performs no mutations. 4. If authenticated functionality is added later, request credentials only when that functionality is invoked. 5. Use narrowly scoped, temporary credentials rather than long-lived access keys. 6. Document the exact required permissions and reject credentials with broader privileges where practical. 7. Ensure credentials are never included in generated evidence, logs, command output, URLs, or exception messages.
