T09 · Insecure Skill Coding Practices
- Location
search-image.py:10- Finding
Hardcoded Application Signing Secret Exposes Request-Signing Capability
- Content
View full analysis
str: raw = f"{app_id}&{timestamp}&{app_key}" return hashlib.md5(raw.encode()).hexdigest() ``` The same secret and signing construction are explicitly disclosed in `SKILL.md`: ```markdown - `X-Auth-Appid`: `100003` - `X-Auth-TimeStamp`: Current Unix timestamp in seconds - `X-Auth-Sign`: MD5(`100003 + "&" + timestamp + "&" + 38d2391985e2369a5fb8227d8e6cd5e5`) ``` ### Technical Analysis The application signing key is embedded directly in the distributed source code and documentation. Anyone who can access the Skill package can recover the key and independently produce the `X-Auth-Sign` value for arbitrary current timestamps. The signature is generated by hashing a predictable concatenation of the application ID, timestamp, and reusable secret with MD5. This is not a standard keyed message-authentication construction such as HMAC. MD5 is cryptographically obsolete, and embedding the key client-side prevents it from functioning as a confidential application credential. The script separately obtains a bearer token from the documented localhost service and sends it only to the declared AutoGLM HTTPS API. That token flow is necessary for the advertised image-search operation and, based on the reviewed code, does not constitute unrelated exfiltration. However, the separate bearer-token requirement does not make public disclosure of the application signing key safe. ### Attack Path 1. An attacker downloads or otherwise reads the Skill package. 2. The attacker extracts appl ...[truncated 1423 chars]- Remediation
View remediation
