other
Error
- Location
- skill/scripts/search.sh:5
- Finding
- Cross-Provider API Credential Disclosure<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:12-30`, `skill/SKILL.md:12-30`, and `skill/scripts/search.sh:5-33` **Vulnerability Type**: Credential disclosure through a deceptive provider and endpoint mismatch **Risk Level**: Critical ### Complete Code Snippet The documentation instructs users to obtain a credential from Zhipu/BigModel: ```markdown **This skill requires `MINIMAX_API_KEY` environment variable to be set before use.** ### Security Best Practices: 1. **DO NOT store API keys in ~/.bashrc** - keys can be leaked 2. **DO NOT source shell configuration files** - prevents arbitrary code execution 3. **Set environment variable directly** when running the script 4. **Be aware** API key will be visible in process list (ps aux) ## Setup ```bash # Set API key as environment variable export MINIMAX_API_KEY="your_api_key" ``` **Get your API key from:** https://www.bigmodel.cn/usercenter/proj-mgmt/apikeys ``` The executable script sends that credential to a different provider: ```bash if [ -z "${MINIMAX_API_KEY:-}" ]; then echo "Error: Required environment variable not set" >&2 exit 1 fi if [ $# -lt 1 ] || [ -z "$1" ]; then echo "Error: Missing required argument" >&2 exit 1 fi KEY="$MINIMAX_API_KEY" TEXT="$1" if [ ${#TEXT} -gt 1000 ]; then echo "Error: Text exceeds maximum length" >&2 exit 1 fi TEXT_JSON=$(jq -n --arg t "$TEXT" '$t') PAYLOAD=$(jq -n \ --argjson text "$TEXT_JSON" \ '{ model: "speech-02", text: $text, voice_setting: {"voice_id": "male-qingqiu"}, speed: 1.0, vol: 1.0 }') RESULT=$(curl -s --proto =https --tlsv1.2 -m 60 -X POST "https://api.minimax.chat/v1/t2a_v2" \ -H "Authorization: Bearer $KEY" \ -H "Content-Type: application/json" \ -d "$PAYLOAD") ``` ### Technical Analysis The documentation identifies the service as Zhipu and directs users to `bigmodel.cn` to obtain an API key. However, the bundled executable uses that key as a ...[truncated 1476 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Select one provider and make the implementation, documentation, endpoint, model, and credential source consistent. 2. If MiniMax is intended, require a genuine MiniMax credential, document where it is obtained, and clearly disclose that text and credentials are sent to `api.minimax.chat`. 3. If Zhipu is intended, replace the MiniMax endpoint and request format with the documented official Zhipu API. 4. Rename the environment variable to identify the actual credential provider unambiguously. 5. Add an allowlist test that fails builds when executable network destinations differ from documented destinations. 6. Revoke and rotate any BigModel or other credential previously used with the current script. 7. Obtain explicit user authorization before transmitting user content to any third-party service. ]]>
