T09 · Insecure Skill Coding Practices
- Location
SKILL.md:30- Finding
Plaintext Storage of WeChat API Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30–37
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code Snippet
json { "wechat": { "appId": "wx...", "appSecret": "...", "thumbMediaId": "...", "author": "WorkBuddy" } }The documentation directs the user to place this configuration in
${CODEBUDDY_PLUGIN_ROOT}/config/user-config.json.Technical Analysis
The skill design requires a reusable WeChat
appSecretto be stored directly in a plugin-local JSON configuration file. The document does not prescribe restrictive file permissions, encryption, an operating-system credential store, environment-based secret injection, log redaction, or repository exclusion rules.Although the repository does not contain a real credential, users following these instructions would create a plaintext credential file. Plugin directories may be exposed through source-control commits, shared archives, backups, diagnostic bundles, permissive filesystem access, or accidental logging.
The project contains only
SKILL.md, so no implementation is available to verify whether runtime safeguards exist elsewhere.Attack Path
- A user configures the skill according to the documented procedure.
- The user's WeChat
appIdandappSecretare written toconfig/user-config.jsonin plaintext. - An attacker obtains read access to the plugin directory through local filesystem access, a leaked backup, a shared archive, a diagnostic bundle, or an accidental source-control commit.
- The attacker extracts the WeChat credentials from the JSON file.
- The attacker uses the credentials to request an access token from the relevant WeChat API.
- The attacker invokes API operations permitted for the associated account until the credential is revoked, rotated, or otherwise invalidated.
Impact Assessment
Successful exploitation may expose the WeChat account's API capabilities to an un ...[truncated 476 chars]
- Remediation
View remediation
Remediation Suggestions
- Store
appSecretin an operating-system keychain, managed secret store, or equivalent protected credential service. - If a secret manager is unavailable, inject the credential through a protected environment variable rather than writing it to plugin configuration.
- Keep only non-sensitive settings in
user-config.json, and provide a redacted template such asuser-config.example.json. - Add the real credential file to source-control ignore rules and packaging exclusions.
- Create any local credential file with owner-only permissions, such as mode
0600on supported systems. - Ensure logs, exceptions, command output, and diagnostic reports redact
appSecret, access tokens, and authorization headers. - Document credential rotation and revocation procedures for suspected exposure.
- Apply least privilege to the associated WeChat application and enable provider-supported monitoring or access restrictions.
- Store
