T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/init.sh:14- Finding
Unnecessary Access to Moltbook Credential Storage
- Content
View full analysis
/dev/null | jq -r '.agent_name // empty') if [ -z "$AGENT_NAME" ]; then AGENT_NAME=$(hostname) fi ``` ### Technical Analysis The initialization script opens the complete Moltbook credentials file solely to obtain the non-secret `agent_name` property. Credential files commonly contain authentication tokens or other sensitive account data. Processing the entire file with `cat` and `jq` expands the amount of sensitive information exposed to the Skill and its subprocesses beyond what is necessary to create a local node identity. The reviewed code only selects `agent_name`; no credential exfiltration or token extraction was identified. Nevertheless, this behavior violates least privilege because local node initialization can operate using an explicit user-supplied name or the existing hostname fallback without reading credential storage. The extracted Moltbook identity is subsequently written to `node.md`, including as part of the transport identifier. This also discloses the account identity to anyone who can read the configured Pluribus data directory. ### Attack Path 1. A user runs `scripts/init.sh`. 2. The script opens `~/.config/moltbook/credentials.json` with the user's filesystem permissions. 3. The complete credential file is passed through `cat` and processed by the external `jq` executable. 4. The `agent_name` property is extracted and persisted in `$PLURIBUS_DIR/node.md`. 5. If the execution environment, `jq` binary, or destination directory is compromised, the unnecessary credential-file access increases the opportunity for sensitive data exposure. No direct exfiltration path exists in the audite ...[truncated 772 chars]- Remediation
View remediation
