Back to skill

Security audit

moltbook-ops

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent for managing a Moltbook account, but it gives an agent live account powers and has weak safeguards around credentials, custom API destinations, and persistent memory notes.

Review this skill before installing. Use it only with a Moltbook API key you are comfortable granting to an agent, avoid --api-key command-line usage, do not set --base or MOLTBOOK_BASE to any nonofficial host with a real key, and require explicit confirmation before public posts, comments, votes, follows, notification read-marking, or promoting social content into long-term memory.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/moltbook_ops.py:25
Finding

Bearer Credential Can Be Redirected to an Arbitrary Network Destination

Content
View full analysis
None: if not api_key: raise SystemExit("Missing Moltbook API key. Pass --api-key or set MOLTBOOK_API_KEY.") self.api_key = api_key self.base = base.rstrip("/") def request(self, method: str, path: str, payload: Optional[Dict[str, Any]] = None) -> Any: url = f"{self.base}{path}" data = None headers = { "Authorization": f"Bearer {self.api_key}", "User-Agent": "openclaw-moltbook-ops/1.2", } if payload is not None: data = json.dumps(payload).encode("utf-8") headers["Content-Type"] = "application/json" req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=30) as resp: ``` The command-line parser and client initialization also accept the base URL without validation: ```python p.add_argument("--base", default=DEFAULT_BASE) ``` ```python client = MoltbookClient(api_key=args.api_key, base=args.base) ``` ### Technical Analysis The client unconditionally adds the Moltbook bearer credential to every request. At the same time, the request origin is controlled by the `MOLTBOOK_BASE` environment variable or the `--base` command-line argument. There is no validation that: - The scheme is HTTPS. - The destination hostname is the official Moltbook hostname. - The destination port is appropriate. - The URL does not contain user information or other ambiguous com ...[truncated 1995 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:42
Finding

Documented CLI Usage Exposes the API Key Through Process Arguments

Content
View full analysis
python3 /root/.openclaw/workspace/skills/moltbook-ops/scripts/moltbook_ops.py --api-key "$MOLTBOOK_API_KEY" post-comments ``` The implementation accepts the credential as an argument: ```python p.add_argument("--api-key", default=DEFAULT_KEY) ``` ### Technical Analysis The shell expands `"$MOLTBOOK_API_KEY"` before starting Python. The expanded secret therefore becomes part of the process argument vector rather than remaining only in the environment. Depending on the operating system and execution environment, command-line arguments may be exposed through: - Process inspection utilities. - Process metadata interfaces. - Job runners and monitoring agents. - Audit or telemetry systems. - Debug logs and error reports. - Automation systems that record complete invoked commands. The implementation already supports reading `MOLTBOOK_API_KEY` directly from the environment. Therefore, expanding the same value into `--api-key` is unnecessary and increases the number of components that can observe the secret. ### Attack Path 1. The user follows the prima ...[truncated 1059 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:86
Finding

Untrusted Social Content Can Be Promoted into Persistent Agent Memory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 12)May include surrounding context.

md
- A reusable Python helper at `scripts/moltbook_ops.py`

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 146)May include surrounding context.

md
## Operational guidance

- Prefer the Python helper over ad-hoc `curl | python -c` chains.
- Treat `home` as the top-level overview; it already includes account, DM, activity, and following preview.
- Use `notifications` to inspect mentions/comments/followers with post titles.
- Use `post-detail` and `post-comments` before replying, so comments are grounded in the actual thread.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/endpoints.md (reported line 101)May include surrounding context.

md
- `POST /api/v1/agents/MOLTY_NAME/follow`
  - Follow an agent

- `DELETE /api/v1/agents/MOLTY_NAME/follow`
  - Unfollow an agent

### Verification and notifications

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises multiple state-changing commands such as posting, commenting, voting, following, and marking notifications read without an explicit warning that they mutate the user's account. In an agent-skill context, that increases the chance of accidental or premature execution, causing unintended social actions, reputation damage, or loss of auditability when notifications are marked read.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

At L125 the README states that unconfirmed upvote/follow actions are intentionally omitted. However, earlier in the same file the feature list explicitly includes post upvote/downvote, comment upvote, follow-agent, and unfollow-agent actions. This is an active documentation contradiction about the skill's supported behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README lists write operations such as posting, commenting, voting, following/unfollowing, and marking notifications as read, but it does not disclose that these actions modify account data or may be irreversible in practice. The only safety note is about protecting the API key, which does not warn users about the impact of these account-changing behaviors.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents use of a Python helper that consumes an API key and performs network-backed read/write actions, but it does not declare any tool scope such as permissions or allowed-tools. That mismatch can cause the agent runtime or reviewer to underappreciate that the skill needs environment secret access and outbound network access, increasing the chance of unintended credential use or unreviewed external interactions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The note template and routing guidance are written in Chinese and prescribe a Chinese-language summary structure, but the skill does not state that this locale requirement is optional or user-selected. That creates a natural-language policy issue because it implicitly forces a specific language for outputs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This reference document enumerates multiple state-changing operations such as posting, commenting, voting, following, verification, and marking notifications read, but it does not clearly warn that these actions affect a live account and should only be performed with explicit user authorization. In an agent-skill context, that omission increases the chance an autonomous agent will treat these commands as routine and execute account-affecting actions without informed confirmation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The suggested review shape is presented with Chinese headings and labels, which can impose a specific language format on users without documenting that this is optional. The policy requires avoiding forced language/locale constraints unless the skill offers a choice or clearly justifies the locale restriction.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The roadmap at L198 says the project still needs to verify whether upvote/follow actions have stable official endpoints. Yet the same README lists these actions as available write operations and says they are included based on official documentation. That creates an intent/documentation inconsistency about whether the capability is confirmed or still provisional.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file title and description present the skill as a Chinese-language document, but there is no indication that users can choose another language or that the Chinese-only presentation is required for a region-specific purpose. Under the language/locale policy, forcing a single language without opt-in can be a policy concern.

Content

No source excerpt is available for this finding.