T09 · Insecure Skill Coding Practices
Error
- Location
- skills/smyx_common/scripts/config-dev.yaml:1
- Finding
- Plaintext Transmission of Uploaded Media, Identity Data, and Authentication Credentials<![CDATA[ ## Vulnerability Details **File Locations**: - `skills/smyx_common/scripts/config.yaml:4-6,15` - `skills/smyx_common/scripts/config-dev.yaml:1-4` - `skills/smyx_analysis/scripts/skill.py:113-130` - `skills/smyx_common/scripts/util.py:610-612,646` **Vulnerability Type**: Sensitive data transmitted over an unencrypted network connection **Risk Level**: High ### Vulnerable Code `skills/smyx_common/scripts/config.yaml:4-6,15`: ```yaml base-url-health: https://lifeemergence.com/jeecg-boot-xzgz base-url-open-api: https://open.lifeemergence.com/smyx-open-api base-url-open-h5: http://livemonitor.lifeemergence.com env: dev ``` The active development configuration overrides those HTTPS endpoints. `skills/smyx_common/scripts/config-dev.yaml:1-4`: ```yaml ApiEnum: base-url-open-api: "http://192.168.1.234:9601/smyx-open-api" base-url-open-h5: "http://192.168.1.234:4100" base-url-health: "http://192.168.1.234:7070/jeecg-boot-xzgz" ``` `skills/smyx_analysis/scripts/skill.py:113-130`: ```python if (input_path.startswith("http://") or input_path.startswith("https://")): params.update({ "videoUrl": input_path }) else: _validate_file(input_path) # Automatically detect MIME type mime_type, _ = mimetypes.guess_type(input_path) if mime_type is None: mime_type = 'application/octet-stream' # Read file content with open(input_path, 'rb') as f: file_content = f.read() files = { 'file': (os.path.basename(input_path), file_content, mime_type) } ``` `skills/smyx_common/scripts/util.py:610-612,646`: ```python headers.setdefault("X-Access-Token", ApiEnum.TOKEN) headers.setdefault("X-Api-Key", ApiEnum.API_SECRET_KEY) headers.setdefault("Authorization", ApiEnum.OPEN_TOKEN) ``` ```python response = requests.request(method, url, *args, json=data, params=params, headers=headers, timeout=int(timeout), **argss) ``` ### Technical Analysis The distributed configuration e ...[truncated 2349 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `env: dev` from the release configuration and use HTTPS production endpoints by default. 2. Reject API base URLs that do not use HTTPS, except in an explicitly isolated test environment. 3. Do not distribute private development endpoints in production Skill packages. 4. Validate remote media URLs and reject plaintext HTTP unless the user explicitly accepts the risk in a controlled environment. 5. Keep TLS certificate verification enabled and do not introduce `verify=False`. 6. Restrict outbound requests to an allowlist of documented service domains. 7. Use short-lived, narrowly scoped tokens so interception has limited value. 8. Rotate credentials used while the plaintext configuration was active. 9. Add an automated release test that fails if any active service endpoint uses `http://`. 10. Update the privacy documentation so that it accurately reflects the implemented data flow and service destinations. ]]>
