T09 · Insecure Skill Coding Practices
- Location
skills/smyx_common/scripts/config-dev.yaml:2- Finding
Sensitive identifiers, authentication tokens, and crop media are transmitted over plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Locations:
skills/smyx_common/scripts/config.yaml:4-6,15skills/smyx_common/scripts/config-dev.yaml:1-7skills/smyx_common/scripts/util.py:551-561,612-646skills/smyx_analysis/scripts/skill.py:113-130
Vulnerability Type: Plaintext transmission of sensitive information
Risk Level: HighVulnerable Code
The distributed configuration enables the development environment:
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: devThe development profile replaces the HTTPS service endpoints with plaintext HTTP endpoints:
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: trueIdentity registration sends the resolved internal identifier as both
openIdandmobile: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 _res ...[truncated 4621 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
env: devfrom the distributed release configuration and use a production profile by default. - Require
https://for all health, Open API, H5, analysis, polling, report, and authentication endpoints. - Add startup validation that rejects plaintext HTTP endpoints outside an explicitly enabled local test mode.
- Do not silently downgrade to HTTP if HTTPS fails.
- Use standard certificate validation and a trusted certificate chain. If the deployment threat model warrants it, consider certificate pinning.
- Add an explicit timeout to the direct
requests.postregistration request. - Avoid sending an internal identifier in a field named
mobileunless the API contract strictly requires it. Separate pseudonymous account identifiers from phone-number fields. - Clearly disclose that selected media, media URLs, identity metadata, and report queries are transmitted to a remote analysis service.
- Rotate tokens previously used through the plaintext development endpoints.
- Add automated tests and CI checks that reject release artifacts containing active HTTP service endpoints or
env: dev.
- Remove
