T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
Credential setup instructions do not enforce restrictive filesystem permissions
- Content
View full analysis
~/.openclaw/credentials/laravel-forge/config.json ``` ### Technical Analysis The recommended setup stores a Laravel Forge API token in a local plaintext JSON file but does not explicitly restrict the permissions of either the credentials directory or the file. Their resulting permissions depend on the user's current `umask`. Under a permissive `umask`, another local user or process may be able to read the configuration file. The script subsequently treats the token in this file as an authentication credential for infrastructure-management operations. The credential-file mechanism itself is necessary for the declared functionality, but secure permissions should be enforced when recommending its creation. ### Attack Path 1. A user follows the documented credential-file setup. 2. The user's active `umask` permits group or other read access. 3. The Forge token is written to `config.json` with insufficiently restrictive permissions. 4. Another local account or compromised process reads the file. 5. The attacker submits authenticated requests to Laravel Forge using the stolen token. 6. The attacker performs any operation allowed by the token's Forge permissions. ### Impact Assessment Successful exploitation discloses the Laravel Forge API token and default organization identifier. Depending on the token's scope and the victim's Forge privileges, an attacker may be able to inspect or modify servers and sites, access logs and configuration, trigger deployments, manage databases, alter firewall rules, register SSH keys, run remote commands, or delete infrastructure resources. The issue does not independently elevate local operating-system privileges; ...[truncated 93 chars]- Remediation
View remediation
"$HOME/.openclaw/credentials/laravel-forge/config.json" chmod 600 "$HOME/.openclaw/credentials/laravel-forge/config.json" ``` Additional hardening measures: - Prefer injecting the token from an operating-system secret manager. - Validate at runtime that the credential file is owned by the current user and is not group- or world-readable. - Reject insecure file permissions rather than silently loading the token. - Recommend a narrowly scoped Forge token instead of a broadly privileged account token. - Document token rotation and immediate revocation procedures for suspected disclosure. ]]>
