T09 · Insecure Skill Coding Practices
Error
- Location
- skills/smyx_common/scripts/config-dev.yaml:2
- Finding
- Monitoring Media, Identity Data, and Authentication Tokens Transmitted over Plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `skills/smyx_common/scripts/config.yaml:2-15`, `skills/smyx_common/scripts/config-dev.yaml:1-7`, `skills/smyx_common/scripts/util.py:546-561, 610-646`, `skills/smyx_analysis/scripts/skill.py:122-138` **Vulnerability Type**: Cleartext transmission of sensitive information **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_common/scripts/util.py:546-561`: ```python def _get_or_create_user(username): _url = ApiEnum.BASE_URL_HEALTH + "/sys/phoneLogin" open_id = username _data = { "silent": 1, "register": 1, "openId": open_id, "mobile": username, "source": ConstantEnum.DEFAULT__SKILL_HUB_NAME } try: _response = requests.post(_url, json=_data) if _response.status_code == 200: _response_json = _response.json() if _response_json and _response_json.get("success"): return _response_json and _response_json.get("result") ``` `skills/smyx_common/scripts/util.py:610-646`: ```python headers.setdefault("X-Access-Token", ApiEnum.TOKEN) headers.setdefault("X-Api-Key", ApiEnum.API_SECRET_KEY) headers.setdefau ...[truncated 3703 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `env: dev` from the distributed production configuration and default to a dedicated production profile. 2. Require HTTPS for authentication, analysis, polling, report retrieval, and report export endpoints. 3. Reject non-HTTPS endpoint values at configuration-load time outside explicitly isolated local testing. 4. Apply an allowlist of approved API hostnames so configuration errors cannot redirect credentials or monitoring media to arbitrary hosts. 5. Ensure TLS certificate verification remains enabled and use a controlled trust store where private infrastructure requires an internal certificate authority. 6. Rotate all tokens that may have traversed the plaintext endpoints. 7. Use short-lived, narrowly scoped tokens that cannot access unrelated users or administrative APIs. 8. Add automated release tests that resolve the effective configuration and fail if any sensitive endpoint uses HTTP. 9. Clearly disclose that local monitoring media is uploaded for cloud processing, including the service operator, retention policy, and deletion controls. 10. Consider end-to-end payload encryption for especially sensitive home-monitoring media in addition to TLS. ]]>
