Back to skill

Security audit

Social Post

Security checks for vulnerabilities and agentic risk

Overview

This skill can post publicly and spend from a Farcaster wallet, but it delegates secrets to mutable external code and has weak confirmation and secret-handling boundaries.

Install only after reviewing the scripts and limiting blast radius: use dedicated low-privilege social accounts, keep minimal funds in the Farcaster wallet, avoid sensitive images or token-bearing URLs, and do not run real posting commands from automation unless you have explicitly approved the content and target platforms. The package should be revised to avoid anti-spam bypass positioning, parse secrets safely instead of sourcing .env, fail closed without confirmation in non-interactive runs, and remove or integrity-pin external executable dependencies before broad use.

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 (5)

T08 · Insecure Dependencies

Error
Location
lib/farcaster.sh:4
Finding

Mutable External Programs Receive Social-Media Credentials and Wallet Private Keys

Content
View full analysis
&2 return 1 fi # ... "$TWITTER_POST_SCRIPT" "$text" } ``` ```bash # lib/farcaster.sh FARCASTER_REPO="/home/phan_harry/.openclaw/workspace/skills/farcaster-agent/repo" cd "$FARCASTER_REPO" && \ PRIVATE_KEY="$private_key" \ SIGNER_PRIVATE_KEY="$signer_key" \ FID="$fid" \ npm run cast "$text" 2>&1 | grep -E "(Cast hash|URL|Error)" | tail -2 ``` The image and reply paths similarly execute Node.js code from the external Farcaster repository while exposing the private keys through environment variables: ```bash cd "$FARCASTER_REPO" && PRIVATE_KEY="$private_key" \ SIGNER_PRIVATE_KEY="$signer_key" \ FID="$fid" \ IMAGE_URL="$image_url" \ PARENT_HASH="${parent_hash:-}" node -e " const { Wallet, JsonRpcProvider } = require('ethers'); const { makeCastAdd, NobleEd25519Signer, FarcasterNetwork, Message } = require('@farcaster/hub-nodejs'); const { submitMessage } = require('./src/x402'); // ... " "$text" ``` ### Technical Analysis The Skill relies on executable components outside the audited project: - `/home/phan_harry/.openclaw/workspace/scripts/twitter-post.sh` - `/home/phan_harry/.openclaw/workspace/skills/farcaster-agent/repo` These external components are not bundled, version-pinned, integrity-checked, or otherwise authenticated by this project. The X posting script inherits the exported OAuth credentials from the calling shell. The Farcaster dependency explicitly receives the custody wa ...[truncated 1373 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
lib/twitter.sh:7
Finding

Credential Files Are Executed as Shell Code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/post.sh:235
Finding

Non-Interactive Runs Bypass the Documented Confirmation Safeguard

Content
View full analysis
Remediation
View remediation
&2 exit 1 else read -r -p "Proceed with posting? (y/n): " CONFIRM [[ "$CONFIRM" =~ ^[Yy]$ ]] || exit 0 fi ``` 2. Apply the same correction to both posting and reply scripts. 3. Require explicit platform flags for real paid operations instead of defaulting a post to both platforms. 4. Display the expected number of thread posts and estimated Farcaster cost before approval. 5. Consider requiring a second explicit option for wallet-funded actions. 6. Add automated tests covering interactive, non-interactive, `--yes`, and `--dry-run` execution states. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
lib/links.sh:5
Finding

URL Shortening Discloses Complete URLs over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

other

Warning
Location
lib/farcaster.sh:55
Finding

Farcaster Images Are Automatically Sent to an Undisclosed Fallback Hosting Provider

Content
View full analysis
&2 return 1 fi # Try catbox.moe (no API key needed, reliable) local response=$(curl -s -F "reqtype=fileupload" \ -F "fileToUpload=@$image_path" \ https://catbox.moe/user/api.php) if [[ "$response" =~ ^https://files.catbox.moe/ ]]; then echo "$response" return 0 fi # Fallback: try uguu.se response=$(curl -s -F "files[]=@$image_path" \ https://uguu.se/upload.php | jq -r '.files[0].url' 2>/dev/null) if [[ "$response" =~ ^https:// ]]; then echo "$response" return 0 fi echo "Error: Failed to upload image" >&2 return 1 } ``` ### Technical Analysis For Farcaster image posts, the Skill uploads the selected local file to Catbox. If that request does not produce an expected URL, it automatically sends the same file to Uguu. The README identifies Catbox as the Farcaster image host, while the Skill documentation elsewhere claims that images are uploaded to Imgur. Neither description clearly discloses the automatic Uguu fallback before the file is transferred. The function name and comment also refer to Imgur even though the code does not use Imgur. The implementation performs no file-type allowlisting, size validation, metadata removal, or provider-specific confirmation. Images may contain geolocation, device, creator, timestamp, or other embedded metadata. ### Attack Path 1. A user selects an image for a Farcaster post or reply. 2. The Skill attempts to upload it to Catbox. 3. Catbox fails, returns an unexpected response, or becomes temporarily unavailable. 4. Without additional confirmation, the Skill uploads the image to Uguu. 5. The resulting public UR ...[truncated 717 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (89)

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The changelog explicitly documents a feature whose purpose is to evade Twitter/X duplicate-content enforcement by automatically altering text and guaranteeing visible variation. This is dangerous because it operationalizes anti-spam bypass behavior across multiple accounts, enabling scaled policy evasion and abusive posting workflows rather than legitimate platform-compliant automation.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
82% confidence
Finding

The README directs users to place long-lived X API credentials in a plaintext .env file under a predictable path. While common, this pattern increases exposure risk from local compromise, accidental inclusion in backups, logs, or other tools that read dotenv files.

Content

Scanner excerpt · README.md (reported line 91)May include surrounding context.

  1. Set permissions to "Read and Write"
  2. Generate Consumer Key/Secret and Access Token/Secret

Step 3: Add to .env file Location: /home/phan_harry/.openclaw/.env

bash
X_CONSUMER_KEY=your_consumer_key

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The README includes a credentials JSON example containing highly sensitive fields such as custodyPrivateKey and signerPrivateKey, normalizing storage and handling of raw private keys in a plaintext local file. In the context of a posting skill tied to a funded Farcaster custody wallet, compromise of this file can directly lead to account takeover and financial loss.

Content

Scanner excerpt · README.md (reported line 133)May include surrounding context.

Step 2: Verify Credentials File

Location: /home/phan_harry/.openclaw/farcaster-credentials.json

json
{
  "fid": "2684290",

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 180)May include surrounding context.

1. Check credentials exist:

bash
# Check X/Twitter credentials
grep "^X_CONSUMER_KEY" ~/.openclaw/.env

# Check Farcaster credentials
ls -la ~/.openclaw/farcaster-credentials.json

Credential Access

High
Category
Privilege Escalation
Confidence
77% confidence
Finding

The troubleshooting guidance encourages interacting directly with a plaintext .env file containing posting credentials. In an agent ecosystem, repeated patterns of direct secret-file inspection increase the chance those values are surfaced in terminal history, screenshots, logs, or copied into prompts.

Content

Scanner excerpt · README.md (reported line 311)May include surrounding context.

  1. Check .env file exists: ls -la ~/.openclaw/.env
  2. Verify credentials are set:
    bash
    grep "^X_" ~/.openclaw/.env
    
  3. Ensure no extra spaces or quotes around values
  4. Check file permissions: chmod 600 ~/.openclaw/.env

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The troubleshooting section explicitly instructs users to verify that sensitive fields including custodyPrivateKey and signerPrivateKey are present, reinforcing reliance on plaintext secret storage. Given this skill posts on behalf of users and spends from a funded Farcaster wallet, exposure of these values could enable unauthorized posting and wallet misuse.

Content

Scanner excerpt · README.md (reported line 324)May include surrounding context.

  1. Check file exists: ls -la ~/.openclaw/farcaster-credentials.json
  2. Verify JSON is valid:
    bash
    jq . ~/.openclaw/farcaster-credentials.json
    
  3. Ensure all required fields present:
    • fid, custodyAddress, custodyPrivateKey

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation frames the skill as social posting, but the analyzed behavior reportedly includes blockchain wallet balance checks and reading custody credentials from disk. That broadens the trust boundary from social posting into financial/account infrastructure, which materially increases risk if users are not clearly informed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documentation frames the skill as social posting, but the analyzed behavior reportedly includes blockchain wallet balance checks and reading custody credentials from disk. That broadens the trust boundary from social posting into financial/account infrastructure, which materially increases risk if users are not clearly informed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation frames the skill as social posting, but the analyzed behavior reportedly includes blockchain wallet balance checks and reading custody credentials from disk. That broadens the trust boundary from social posting into financial/account infrastructure, which materially increases risk if users are not clearly informed.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 89)May include surrounding context.

md
4. **Generate Keys**
   - Consumer Key & Secret: In "Keys and tokens" tab
   - Access Token & Secret: Click "Generate" under "Authentication Tokens"
   - Save all 4 credentials securely

4. **Add to .env file**

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
4. **Generate Keys**
   - Consumer Key & Secret: In "Keys and tokens" tab
   - Access Token & Secret: Click "Generate" under "Authentication Tokens"
   - Save all 4 credentials securely

4. **Add to .env file**

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The documentation tells users to append X API secrets into a plaintext ~/.openclaw/.env file. Plaintext, long-lived tokens in generic environment files are commonly overexposed to backups, shell history, logs, and other local processes.

Content

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

  • Access Token & Secret: Click "Generate" under "Authentication Tokens"
    • Save all 4 credentials securely
  1. Add to .env file
    bash
    echo "X_CONSUMER_KEY=xxx" >> ~/.openclaw/.env
    echo "X_CONSUMER_SECRET=xxx" >> ~/.openclaw/.env
    

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

This line continues the practice of storing sensitive API secrets in plaintext environment files. If those files are read by other tools or accidentally committed or shared, the linked social account can be abused for unauthorized posting.

Content

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

  1. Add to .env file
    bash
    echo "X_CONSUMER_KEY=xxx" >> ~/.openclaw/.env
    echo "X_CONSUMER_SECRET=xxx" >> ~/.openclaw/.env
    echo "X_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env
    echo "X_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env
    

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Persisting access tokens in plaintext on disk creates an account-compromise risk if the host or workspace is exposed. Because this skill performs outbound posting, stolen tokens have immediate abuse value.

Content

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

  1. Add to .env file
    bash
    echo "X_CONSUMER_KEY=xxx" >> ~/.openclaw/.env
    echo "X_CONSUMER_SECRET=xxx" >> ~/.openclaw/.env
    echo "X_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env
    echo "X_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env
    

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Storing access token secrets in a generic .env file exposes high-impact credentials beyond the minimum necessary trust boundary. Attackers obtaining the file can impersonate the user on X through the API.

Content

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

bash
   echo "X_CONSUMER_KEY=xxx" >> ~/.openclaw/.env
   echo "X_CONSUMER_SECRET=xxx" >> ~/.openclaw/.env
   echo "X_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env
   echo "X_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The setup pattern as a whole promotes repeated plaintext secret handling in the shell and filesystem. This raises the chance of secret leakage through shell history, copy/paste mistakes, and weak local protections.

Content

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

echo "X_CONSUMER_KEY=xxx" >> ~/.openclaw/.env echo "X_CONSUMER_SECRET=xxx" >> ~/.openclaw/.env echo "X_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env echo "X_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env

text

**Test your credentials:**

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

Multi-account support multiplies the number of stored secrets and therefore the attack surface. A compromise of one shared env file could expose multiple social identities at once.

Content

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

bash
# Add credentials with custom prefix (e.g., MYACCOUNT_)
echo "MYACCOUNT_API_KEY=xxx" >> ~/.openclaw/.env
echo "MYACCOUNT_API_KEY_SECRET=xxx" >> ~/.openclaw/.env
echo "MYACCOUNT_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env
echo "MYACCOUNT_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

Adding another API secret to the same plaintext env store further expands exposure. The more credentials consolidated in one place, the more severe a single local disclosure becomes.

Content

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

bash
# Add credentials with custom prefix (e.g., MYACCOUNT_)
echo "MYACCOUNT_API_KEY=xxx" >> ~/.openclaw/.env
echo "MYACCOUNT_API_KEY_SECRET=xxx" >> ~/.openclaw/.env
echo "MYACCOUNT_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env
echo "MYACCOUNT_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

Persisting additional access tokens for secondary accounts in plaintext increases impersonation risk across multiple accounts. This is especially sensitive for an automation skill capable of posting at scale.

Content

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

Add credentials with custom prefix (e.g., MYACCOUNT_)

echo "MYACCOUNT_API_KEY=xxx" >> ~/.openclaw/.env echo "MYACCOUNT_API_KEY_SECRET=xxx" >> ~/.openclaw/.env echo "MYACCOUNT_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env echo "MYACCOUNT_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env

text

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

Storing multiple account token secrets in one env file creates concentrated credential risk. If exposed, an attacker can potentially control several accounts through the same skill.

Content

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

echo "MYACCOUNT_API_KEY=xxx" >> ~/.openclaw/.env echo "MYACCOUNT_API_KEY_SECRET=xxx" >> ~/.openclaw/.env echo "MYACCOUNT_ACCESS_TOKEN=xxx" >> ~/.openclaw/.env echo "MYACCOUNT_ACCESS_TOKEN_SECRET=xxx" >> ~/.openclaw/.env

text

**Usage:**

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The skill requires access to a local Farcaster credentials file containing private keys, significantly expanding the blast radius of compromise. Any misuse, path confusion, logging bug, or exfiltration could expose signer and custody keys, leading to account takeover and potential fund loss.

Content

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

Farcaster Setup

Required credentials (stored in /home/phan_harry/.openclaw/farcaster-credentials.json):

json
{
  "fid": "your_farcaster_id",

Credential Access

High
Category
Privilege Escalation
Confidence
87% confidence
Finding

The documentation encourages direct inspection of the credential file path, reinforcing that the skill depends on sensitive local files. This increases the chance of accidental disclosure through terminals, logs, screenshots, or copied troubleshooting output.

Content

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

  1. Verify setup
    bash
    # Check credentials exist
    ls -la ~/.openclaw/farcaster-credentials.json
    
    # Check wallet balance
    scripts/check-balance.sh
    

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

Requiring a fixed local credential file for Farcaster and env-stored X secrets means the skill has broad access to high-value credentials. In a networked posting skill, this creates a direct route from local secret access to external actions under those identities.

Content

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

md
## Requirements

- Twitter credentials in `.env` (X_CONSUMER_KEY, X_CONSUMER_SECRET, X_ACCESS_TOKEN, X_ACCESS_TOKEN_SECRET)
- Farcaster credentials in `/home/phan_harry/.openclaw/farcaster-credentials.json`
- **USDC on Base chain** (custody wallet): 0.001 USDC per Farcaster cast
- For images: `curl`, `jq`

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The manual check examples read fields from the Farcaster credential file directly, normalizing shell access to sensitive secret-bearing storage. Even if only a public address is extracted, this pattern increases the risk of accidental exposure or scripting mistakes against the same file.

Content

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

scripts/check-balance.sh

Manual check

jq -r '.custodyAddress' ~/.openclaw/farcaster-credentials.json

View on basescan.org

text

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 45)May include surrounding context.

md
# Farcaster posting library

FARCASTER_REPO="/home/phan_harry/.openclaw/workspace/skills/farcaster-agent/repo"
FARCASTER_CREDS="/home/phan_harry/.openclaw/farcaster-credentials.json"

# Post text-only to Farcaster
farcaster_post_text() {

Static analysis

No suspicious patterns detected.