T09 · Insecure Skill Coding Practices
Error
- Location
- skills/smyx_common/scripts/config-dev.yaml:2
- Finding
- Sensitive biometric media and authentication tokens transmitted over plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/config.yaml:15`, `skills/smyx_common/scripts/config-dev.yaml:2-4`, `skills/smyx_analysis/scripts/skill.py:126-130`, `skills/smyx_common/scripts/util.py:610-612,646` **Vulnerability Type**: Insecure transport of sensitive data **Risk Level**: High ### Vulnerable Code `skills/smyx_common/scripts/config.yaml:15` ```yaml env: dev ``` `skills/smyx_common/scripts/config-dev.yaml:2-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:126-130` ```python 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 default configuration explicitly selects the `dev` environment. This overrides the HTTPS service addresses in the base configuration with plaintext HTTP endpoints on `192.168.1.234`. The analysis workflow reads a user's face video into memory and passes it as a multipart upload to the common request function. That request function also attaches access tokens, API credentials, authorization tokens, and a user identifier. When the active development endpoints are used, neither the request body nor the authentication headers receive transport-layer confidentiality or integrity protection. Uploading video to a remote service is consistent with the Skill's documented cloud-analysis fun ...[truncated 1674 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Change the distributed configuration to select a production environment that uses HTTPS. 2. Remove development and private-network endpoints from release artifacts, or place them in a separate, explicitly opted-in developer configuration. 3. Enforce HTTPS in `RequestUtil.http_request` and reject plaintext HTTP endpoints before adding credentials or transmitting files. 4. Permit an HTTP exception only for tightly controlled test environments, with an explicit insecure-development flag and no real user data or production credentials. 5. Retain standard certificate and hostname verification; do not disable TLS verification. 6. Consider certificate pinning where the deployment model permits it. 7. Rotate all tokens that may previously have been transmitted through the plaintext development endpoints. 8. Add automated tests and release checks that fail when an active endpoint begins with `http://`. ]]>
