T09 · Insecure Skill Coding Practices
- Location
SKILL.md:52- Finding
Plaintext Storage of a Broadly Privileged Feishu Application Secret
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 52-60
Vulnerability Type: Plaintext sensitive credential storage
Risk Level: MediumVulnerable Code
yaml appSecret: "xxxxxxxxxxxxxxxx"The surrounding instructions direct users to place their actual Feishu application secret in
~/.openclaw/config.yml. The application is also granted document and cloud-storage permissions such asdocx:documentanddrive:drive, with optional write access to wikis and Bitable records.Technical Analysis
The documented configuration stores a long-lived application secret directly in a local YAML file. No instructions are provided to use a secret manager, environment-backed credential reference, encrypted credential store, or restrictive file permissions.
Any local user, compromised process, backup service, diagnostic bundle, or accidental configuration disclosure capable of reading this file could recover the Feishu App ID and App Secret. The exposed credentials could then be used to authenticate as the application and exercise the permissions granted to it.
The recommended permission set also includes broad read/write scopes. This increases the potential consequences of credential exposure and does not clearly enforce least privilege for users who only require read access.
Attack Path
- A user follows the Skill instructions and writes the Feishu App Secret to
~/.openclaw/config.yml. - The configuration file is created with permissions that permit another local account or compromised process to read it, or it is copied into an insecure backup or support archive.
- An attacker reads the configuration and extracts the App ID and App Secret.
- The attacker uses the credentials to authenticate to the Feishu API as the configured application.
- The attacker accesses or modifies resources available through the application's approved scopes.
Impact Assessment
Successful exploitation could expose enterprise documents and cl ...[truncated 437 chars]
- A user follows the Skill instructions and writes the Feishu App Secret to
- Remediation
View remediation
Remediation Suggestions
- Store the App Secret in a supported secret manager, operating-system credential store, or environment-backed secret facility rather than directly in the YAML configuration.
- If file-based storage is unavoidable, place secrets in a separate file restricted to the OpenClaw service account and enforce owner-only permissions such as
0600. - Ensure configuration files and secrets are excluded from source control, logs, diagnostics, support bundles, and unencrypted backups.
- Grant only the Feishu scopes required for the intended workflow. Prefer read-only scopes when write access is unnecessary and avoid granting redundant read-only and read/write scopes together.
- Use separate application credentials for different tenants and environments to limit the blast radius of one exposed secret.
- Document secret rotation and immediate revocation procedures. Rotate credentials after any suspected configuration disclosure.
- Run OpenClaw under a dedicated, minimally privileged operating-system account so unrelated local processes cannot access its credentials.
