Back to skill

Security audit

fapi.uk Twitter All-in-One API

Security checks for vulnerabilities and agentic risk

Overview

The skill is openly for Twitter/X automation, but it asks users to expose powerful account and API credentials in chat and enables account-changing actions through a third-party API.

Review carefully before installing. Do not paste Twitter/X auth_token, ct0, cookies, or API keys into chat. Use only a dedicated secret store if available, prefer narrowly scoped revocable tokens, confirm every write action before it runs, and understand that fapi.uk will receive credentials capable of account actions and paid API usage.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:18
Finding
Sensitive Twitter/X Session Credentials Are Collected and Transmitted Through Unsafe Channels## Vulnerability Details **File Location**: `SKILL.md:18-28`; duplicated verbatim in `README.md:18-28` **Vulnerability Type**: Sensitive credential exposure and insecure secret handling **Risk Level**: High **Relevant snippet (English translation of the documentation):** ```text 3. Configure in OpenClaw (strongly recommended): openclaw config set skills.entries.fapi-twitter.apiKey "<your complete API key>" openclaw config set skills.entries.fapi-twitter.auth_token "<your auth_token>" openclaw config set skills.entries.fapi-twitter.ct0 "<your optional ct0 value>" Or say directly in the chat: "My fapi API key is xxx, and my auth_token is yyy" Core request rules: 2. Every request must include: Authorization: Bearer {{apiKey}} 3. Most write operations require auth_token and ct0 parameters. ``` ### Technical Analysis The Skill instructs users to provide an fapi API key and a Twitter/X `auth_token`, either through OpenClaw configuration or directly in a chat message. It subsequently directs the agent to send these credentials to the third-party `fapi.uk` API. A Twitter/X `auth_token` is a sensitive session credential rather than a narrowly scoped application token. Depending on the session state and accompanying values such as `ct0`, disclosure can allow actions under the authenticated user's account. The advertised functions include creating tweets, replying, uploading media, following or unfollowing accounts, blocking users, accessing notifications, handling direct-message media, and account-related operations. Direct entry in chat can expose credentials through conversation history, telemetry, debugging output, model-provider logs, exports, or transcript synchronization. General configuration storage can similarly expose secrets through plaintext files, backups, broad file permissions, or diagnostic tooling. Transmitting the session credential to an intermediary also expands the trust bound ...[truncated 2141 chars]
Remediation
## Remediation Suggestions 1. Replace raw Twitter/X session-cookie collection with an official OAuth authorization flow using narrowly scoped, revocable access tokens. 2. Never instruct users to paste API keys, `auth_token`, `ct0`, cookies, or other secrets into chat. 3. Store credentials in an operating-system-backed secret manager or the platform's dedicated encrypted credential store rather than ordinary configuration. 4. Ensure secrets are never included in prompts, transcripts, telemetry, exception messages, command history, or debug logs. Apply deterministic redaction to request headers and sensitive parameters. 5. Use separate, operation-specific permissions where possible. Read-only requests should not receive credentials capable of account-changing operations. 6. Require explicit user confirmation immediately before sensitive write operations such as posting, following, blocking, direct-message activity, account unlocking, or media uploads. 7. Document the third party's credential retention, encryption, access-control, deletion, incident-response, and subprocessors policies. 8. Provide token revocation and rotation instructions, and automatically invalidate credentials after suspected exposure. 9. Avoid passing secrets as command-line arguments because they may appear in shell history or process listings. Use protected interactive input or secret-store references. 10. Correct the inconsistent configuration entry names (`fapi-twitter` and `fapi-uk`) to reduce the risk of secrets being stored in unintended configuration locations.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:97
Finding
Installation Executes a Mutable Remote npm Package Without Version or Integrity Pinning## Vulnerability Details **File Location**: `SKILL.md:97-99`; duplicated verbatim in `README.md:97-99` **Vulnerability Type**: Unpinned remote dependency execution **Risk Level**: Medium **Complete vulnerable command:** ```bash npx clawhub@latest install fapi-twitter-full ``` ### Technical Analysis The installation instructions use `npx` with the mutable npm distribution tag `@latest`. Running this command can retrieve and execute package code that was not present in the audited project and whose contents may change after the audit. The command does not pin an exact package version, verify a package digest, require a signed release, or otherwise establish that the downloaded package matches an audited artifact. Consequently, the effective installation code is controlled by whichever package release the registry resolves as `latest` at execution time. This creates a supply-chain boundary where compromise of the package publisher, registry account, release pipeline, package dependencies, or name-resolution process could convert the documented installation command into arbitrary code execution under the installing user's account. The reviewed project contains only Markdown files, so the behavior of the remotely installed package could not be assessed from the available artifact. ### Attack Path 1. An attacker compromises the npm publisher account, release pipeline, registry delivery path, or a dependency used by the package resolved as `clawhub@latest`. 2. The attacker publishes or causes `latest` to reference a malicious release. 3. A user follows the documentation and runs `npx clawhub@latest install fapi-twitter-full`. 4. `npx` downloads the currently resolved package and executes its command-line entry point. 5. The malicious package executes with the permissions of the user running the installation. 6. The package can access data and resources available to that user, subject to host security controls. ### Impact As ...[truncated 655 chars]
Remediation
## Remediation Suggestions 1. Pin the installer to an exact, reviewed version instead of `@latest`, for example an explicitly audited semantic version. 2. Publish and verify a cryptographic digest for the resolved package and the installed Skill artifact. 3. Use signed releases and verify publisher provenance before execution. 4. Commit a lockfile where applicable and require reproducible installation from approved package versions. 5. Review the installer package, its lifecycle scripts, command-line entry point, and transitive dependencies before recommending it. 6. Prefer downloading a versioned artifact for inspection before execution rather than combining remote retrieval and immediate execution through `npx`. 7. Run installation with a non-administrative account in a sandbox or restricted environment. 8. Configure the package manager to use a trusted registry and disable unnecessary lifecycle scripts where installation remains functional. 9. Document the expected package name, publisher identity, exact version, checksum, and verification procedure.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Missing User Warnings

High
Confidence
98% confidence
Finding
The README explicitly instructs users to paste sensitive credentials such as API keys and auth tokens into chat, without warning that chat content may be logged, retained, or exposed to other tools. This is dangerous because those tokens can enable account access, paid API usage, and potentially actions on behalf of the user.

Ssd 3

High
Confidence
98% confidence
Finding
By telling users to provide `apiKey` and `auth_token` in natural-language chat, the skill creates a built-in path for collecting reusable secrets through conversational input. In this skill's context, that is especially dangerous because the same secrets are then used to perform Twitter/X account actions and billable API operations, increasing the chance of account misuse and financial loss if exposed.

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill instructs users to paste `apiKey`, `auth_token`, and optionally `ct0` directly into chat, creating a direct path for credential exposure in conversation logs, transcripts, analytics, or downstream tooling. These tokens appear sufficient to authenticate API requests and possibly perform account actions, so disclosure could enable unauthorized use or account abuse.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The skill is described as automatically attaching `apiKey` and `auth_token` to requests, while also telling users they can paste those secrets directly into chat. That combination creates a clear secret-handling hazard: credentials may be exposed to model context, logs, transcripts, plugins, or unintended downstream actions.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Line L011 says the skill will summarize results in fluent Chinese, and L030 further requires responses in natural Chinese. This forces a specific language behavior without indicating that the user can choose another language or opt in to the locale constraint.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The README instructs users to install and execute a package via `npx clawhub@latest` without pinning a specific trusted version. This creates a supply-chain risk because future compromised or malicious releases could be executed automatically on the user's machine during installation.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
Line L011 says the assistant will summarize results in fluent Chinese, and line L030 further requires responses in Chinese. This forces a specific language/locale behavior without documenting user opt-in or offering alternatives.

Ssd 3

Medium
Confidence
97% confidence
Finding
The skill's natural-language setup flow encourages disclosure of sensitive API credentials in chat, which is especially risky because the same file also describes using those credentials for authenticated Twitter operations. In this context, the issue is more dangerous because the exposed secrets enable billable API use and potentially account-affecting actions such as posting, following, or interacting on behalf of the user.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
Line L030 instructs the assistant to summarize results in natural Chinese unless the user asks for raw data. This is a natural-language policy issue because it imposes a fixed language rather than allowing the user's language preference.

Rp1

Medium
Category
MCP Rug Pull
Confidence
83% confidence
Finding
The installation command uses `npx clawhub@latest`, which fetches and executes the newest published package without pinning a specific version. If the upstream package is compromised or a breaking/malicious release is published, users may execute unreviewed code during installation.

Intent-Code Divergence

Low
Confidence
80% confidence
Finding
The text says the agent will "never automatically purchase credits," which suggests a strict no-purchase posture, but immediately specifies that on insufficient credits it should offer to open recharge/payment URLs. While this is not automatic payment, the nearby wording can mislead about how payment-related actions are handled. This is an intent-level documentation inconsistency rather than a code-level permission issue.

Static analysis

No suspicious patterns detected.