T09 · Insecure Skill Coding Practices
Error
- Location
- skills/smyx_common/scripts/config.yaml:2
- Finding
- Private video, identity data, and authentication tokens are transmitted over plaintext HTTP## Vulnerability Details **File Location**: `skills/smyx_common/scripts/config.yaml:2-15`, `skills/smyx_common/scripts/config-dev.yaml:1-7`, `skills/smyx_analysis/scripts/skill.py:113-132`, and `skills/smyx_common/scripts/util.py:551-565, 572-612, 646-657` **Vulnerability Type**: Plaintext transmission of sensitive information and insecure development configuration **Risk Level**: High ### Vulnerable Code `skills/smyx_common/scripts/config.yaml:2-15`: ```yaml ApiEnum: api-key: null api-secret-key: null 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 database-url: null ConstantEnum: app--id: x1a3s4nwy1s2r4se current--tentant-code: XIAN_ZHAO_GAN_ZHI default--skill-platform-name: ARK_CLAW feishu-app--id: cli_a93d769369badcb1 feishu-app--secret: null is-debug: false env: dev ``` `skills/smyx_common/scripts/config-dev.yaml:1-7`: ```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" ConstantEnum: is-debug: true ``` `skills/smyx_analysis/scripts/skill.py:113-132`: ```python if (input_path.startswith("http://") or input_path.startswith("https://")): params.update({ "videoUrl": input_path }) else: _validate_file(input_path) # Automatically detect the MIME type mime_type, _ = mimetypes.guess_type(input_path) if mime_type is None: mime_type = 'application/octet-stream' # Read the file contents 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:551-565`: ```python def _get_or_cr ...[truncated 5957 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `env: dev` from the release configuration and make production HTTPS endpoints the secure default. 2. Exclude private development configurations from distributed Skill packages. 3. Reject all non-HTTPS API endpoints at startup. Do not silently accept HTTP merely because a URL has an HTTP scheme. 4. Enforce an explicit allowlist of trusted API hostnames and reject private, loopback, link-local, and unexpected IP-literal destinations in production. 5. Retain the default TLS certificate and hostname verification performed by `requests`; do not add verification bypasses. 6. Require explicit administrator configuration before changing service destinations, and display the destination hostname before sensitive uploads. 7. Avoid duplicating the internal identity into a field named `mobile` unless the server contract strictly requires it and its privacy implications are documented. 8. Minimize token lifetime and scope, encrypt locally cached tokens where feasible, and rotate any credentials previously transmitted through the HTTP development endpoints. 9. Add automated tests that fail the release build if active configuration contains `http://`, private addresses, development environments, or debug mode. 10. Obtain informed consent before uploading household surveillance footage and document server-side retention, access control, and deletion policies.
