T09 · Insecure Skill Coding Practices
- Location
CONFIGURATION.md:128- Finding
Credential-Like WeChat AppID and AppSecret Pair Exposed in Documentation
- Content
View full analysis
Vulnerability Details
File Location:
CONFIGURATION.md, lines 128-129
Vulnerability Type: Hardcoded credential exposure
Risk Level: High if the documented credential pair is validVulnerable Code
Documentation table excerpt with labels translated to English and credential values preserved verbatim:
markdown | `app_id` | WeChat AppID | "wx94029d52b0b25543" | | `app_secret` | WeChat AppSecret | "583856bd1c7075ffdd2e9f9bd415a0c2" |Technical Analysis
The documentation contains an AppID and AppSecret pair that exactly satisfies the validation rules implemented in
scripts/credential_manager.py: an AppID beginning withwxfollowed by 16 lowercase alphanumeric characters, and a 32-character hexadecimal AppSecret.The repository does not establish that these values are synthetic, revoked, or otherwise unusable. Publishing a credential pair in documentation can expose the associated WeChat account if it is or was operational. The project correctly warns users against committing secrets, but that guidance does not mitigate a credential-like value already present in a tracked file.
Attack Path
- An attacker reads the AppID and AppSecret from
CONFIGURATION.md. - The attacker submits them to the official WeChat token endpoint:
https://api.weixin.qq.com/cgi-bin/token. - If the pair is valid and the request originates from an allowed IP address, WeChat returns an access token.
- The attacker uses the token to invoke API operations enabled for the account, potentially including material uploads and draft creation.
- The attacker retains access until the secret or issued token is rotated or expires.
Exploitation depends on the credentials being valid, the account's API permissions, and WeChat IP allowlist restrictions.
Impact Assessment
A successful attacker could obtain the API privileges assigned to the affected WeChat account. Within the functionality demonstrated by ...[truncated 397 chars]
- An attacker reads the AppID and AppSecret from
- Remediation
View remediation
Remediation Suggestions
- Immediately determine whether the documented AppID and AppSecret were ever operational.
- If they were real, rotate the AppSecret through the WeChat administration console and invalidate related access where possible.
- Replace both values with unmistakably invalid placeholders that cannot satisfy application validation, such as:
text app_id: "REPLACE_WITH_WECHAT_APP_ID" app_secret: "REPLACE_WITH_WECHAT_APP_SECRET" - Scan the complete Git history, release archives, package registries, and published documentation for the same values.
- Add automated secret scanning to CI and pre-commit checks.
- Keep real credentials in protected environment variables or a dedicated secrets manager rather than tracked JSON or documentation files.
- Ensure
.env,my_accounts.json,config.json, andmulti_account_config.jsonare excluded from version control.
