Back to skill

Security audit

Facebook Fanpage Manager

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly for Facebook Page automation, but it gives an agent powerful posting, messaging, deletion, and long-lived token authority with weak guardrails.

Install only if you are comfortable giving the skill a Facebook Page token that can manage posts, comments, Messenger, and Page data. Protect the token like a password, avoid committing OpenClaw config files, remove or edit the token-printing line in the connection script, and require human approval before publishing, deleting, or sending messages.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check-connection.sh:21
Finding

Partial Facebook Access Token Disclosure in Console Output

Content
View full analysis

Vulnerability Details

File Location: scripts/check-connection.sh, line 21
Vulnerability Type: Sensitive credential exposure through console output
Risk Level: Medium

Vulnerable Code

bash
echo "🔑 Token: ${FACEBOOK_ACCESS_TOKEN:0:20}...${FACEBOOK_ACCESS_TOKEN: -10}"

Technical Analysis

The connection-checking script prints the first 20 and last 10 characters of FACEBOOK_ACCESS_TOKEN. Although it does not print the complete token, these 30 characters are sensitive credential material and should not be exposed.

Standard output is frequently retained in shell histories, CI/CD job logs, agent transcripts, centralized logging platforms, monitoring systems, and support records. Anyone with access to those records can recover the disclosed token fragments and correlate them across environments or incidents. Partial disclosure can also reduce the effective secrecy of the credential.

The token is otherwise sent to Facebook's official Graph API using an HTTP authorization header; no unauthorized external transmission was identified.

Attack Path

  1. An administrator configures a valid Facebook Page access token in the FACEBOOK_ACCESS_TOKEN environment variable.
  2. The administrator or an automated system executes scripts/check-connection.sh.
  3. The script prints 30 characters from the access token to standard output.
  4. The output is retained in an agent transcript, CI log, terminal capture, or centralized logging system.
  5. A user or service with access to those records obtains the exposed credential fragments.
  6. The fragments can be used to identify and correlate the token and may assist credential-recovery or token-compromise efforts when combined with another disclosure.

Impact Assessment

The issue directly exposes part of a privileged Facebook Page credential. The leaked fragment alone is not demonstrated to be sufficient to authenticate to Facebook, so this finding does not establish immediate account takeover.

...[truncated 466 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove all access-token fragments from console output. Replace the vulnerable line with a non-sensitive status message:
bash
echo "🔑 Token: configured"
  1. If operators require a way to distinguish credentials, display only a short, non-reversible fingerprint rather than any substring of the token. Ensure that the fingerprint does not expose the original credential.

  2. Review existing CI logs, agent transcripts, terminal recordings, and centralized logs for previously exposed token fragments. Restrict access to or securely delete affected records according to the applicable retention policy.

  3. Rotate the Facebook Page access token if logs containing token fragments were accessible to unauthorized or untrusted parties.

  4. Adopt a project-wide rule prohibiting full or partial secret values in diagnostic output, including API keys, access tokens, application secrets, and authorization headers.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The skill explicitly advertises obtaining and using a permanent page access token, which is a powerful credential for Facebook page operations. In context, this is more dangerous because the same skill also supports posting, messaging, and reading conversations, so token misuse could immediately impact account security and user privacy.

Content

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

md
description: >
  Skill quản lý Fanpage Facebook toàn diện cho OpenClaw: tự động trả lời tin nhắn Messenger,
  đăng bài Fanpage, reply comment, xem insights. Bao gồm hướng dẫn chi tiết từng bước
  lấy Page ID và Page Access Token vĩnh viễn. Sử dụng khi người dùng nhắc đến: Facebook,
  Fanpage, Messenger, đăng bài, auto reply, trả lời tin nhắn tự động, Page ID, access token,
  Graph API, webhook, quản lý fanpage, social media automation.
version: 1.0.0

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The trigger metadata includes broad references to access tokens, increasing the chance that the skill is invoked in contexts involving credential retrieval or use. Because invocation may be broad, this raises the likelihood of the agent engaging with sensitive credentials without a tightly scoped intent boundary.

Content

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

md
Skill quản lý Fanpage Facebook toàn diện cho OpenClaw: tự động trả lời tin nhắn Messenger,
  đăng bài Fanpage, reply comment, xem insights. Bao gồm hướng dẫn chi tiết từng bước
  lấy Page ID và Page Access Token vĩnh viễn. Sử dụng khi người dùng nhắc đến: Facebook,
  Fanpage, Messenger, đăng bài, auto reply, trả lời tin nhắn tự động, Page ID, access token,
  Graph API, webhook, quản lý fanpage, social media automation.
version: 1.0.0
metadata:

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The documentation frames access-token acquisition as the most important step, normalizing the collection and persistent use of a sensitive credential without equivalent emphasis on security precautions. That can lead users to expose or mishandle a token that enables direct page actions and data access.

Content

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

md
---

## 1. Hướng dẫn lấy Page ID & Access Token

**Đây là bước QUAN TRỌNG NHẤT — không có token thì skill không hoạt động.**

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The step-by-step instructions for generating a token and extracting access_token values facilitate credential collection for later automated use. In a skill that can post content and access messaging data, this materially increases the risk of account compromise or unauthorized actions if the token is exposed.

Content

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

md
Bước 3: Lấy Page ID + Short-lived Token
         → developers.facebook.com/tools/explorer/
         → Chọn App → Thêm quyền → Generate Access Token
         → Query "me/accounts" → lấy "id" và "access_token"

Bước 4: Đổi sang Token vĩnh viễn

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 · references/api-reference.md (reported line 123)May include surrounding context.

md
# Hướng dẫn lấy Facebook Page ID & Access Token vĩnh viễn

Hướng dẫn chi tiết từng bước, dành cho fanpage cá nhân (không cần Business Portfolio).

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 · references/setup-guide.md (reported line 1)May include surrounding context.

md
# Hướng dẫn lấy Facebook Page ID & Access Token vĩnh viễn

Hướng dẫn chi tiết từng bước, dành cho fanpage cá nhân (không cần Business Portfolio).

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 · references/setup-guide.md (reported line 40)May include surrounding context.

md
# Hướng dẫn lấy Facebook Page ID & Access Token vĩnh viễn

Hướng dẫn chi tiết từng bước, dành cho fanpage cá nhân (không cần Business Portfolio).

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 · references/setup-guide.md (reported line 71)May include surrounding context.

md
# Hướng dẫn lấy Facebook Page ID & Access Token vĩnh viễn

Hướng dẫn chi tiết từng bước, dành cho fanpage cá nhân (không cần Business Portfolio).

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 · references/setup-guide.md (reported line 142)May include surrounding context.

md
# Hướng dẫn lấy Facebook Page ID & Access Token vĩnh viễn

Hướng dẫn chi tiết từng bước, dành cho fanpage cá nhân (không cần Business Portfolio).

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 · references/setup-guide.md (reported line 278)May include surrounding context.

md
# Hướng dẫn lấy Facebook Page ID & Access Token vĩnh viễn

Hướng dẫn chi tiết từng bước, dành cho fanpage cá nhân (không cần Business Portfolio).

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The summary table explicitly tells users to save a permanent Page Access Token in openclaw.json, reinforcing insecure plaintext credential storage. Because the token can authorize persistent administrative actions against the Facebook Page, disclosure could enable takeover of posting, messaging, and moderation capabilities.

Content

Scanner excerpt · references/setup-guide.md (reported line 274)May include surrounding context.

md
| Thông tin | Ví dụ | Lưu ở đâu |
|-----------|-------|-----------|
| Page ID | `123456789012345` | openclaw.json |
| Page Access Token (vĩnh viễn) | `EAAG...ZD` | openclaw.json |
| App ID | `1234567890123456` | Ghi chú riêng (dùng khi cần lấy token mới) |
| App Secret | `abc123def456...` | Ghi chú riêng (BẢO MẬT!) |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill clearly relies on shell execution via curl, yet it does not declare an explicit tool scope such as allowed-tools or permissions. That creates an authorization gap where a host system may permit broader shell usage than users expect, increasing the chance of unintended command execution or network actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger text is very broad and matches generic Facebook-related discussion, not only clear requests to manage a page. This can cause accidental invocation in unrelated conversations, leading to sensitive actions like reading messages, posting content, or using stored tokens without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
- FACEBOOK_PAGE_ID
        - FACEBOOK_ACCESS_TOKEN
      bins:
        - curl
    tags:
      - facebook
      - messenger

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs users to store and use a long-lived Facebook access token but does not prominently warn that this credential can grant powerful page-management capabilities. If mishandled, leaked, or reused automatically, the token could enable unauthorized posting, message access, or page administration actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill describes reading conversations, sending messages, and automated replies without a strong privacy or consent warning. Because Messenger data may contain personal information, accidental or overbroad use could expose private communications or send unauthorized responses on behalf of the page.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document provides instructions for destructive and privacy-impacting operations such as deleting posts/comments and accessing conversations/messages without any warning, authorization requirements, or user-consent guidance. In a fanpage automation skill, this increases the risk of operators using powerful actions on real user data without understanding legal, privacy, or business-impact consequences.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/setup-guide.md (reported line 25)May include surrounding context.

md
## Bước 2: Tạo App

1. Truy cập: **https://developers.facebook.com/apps**
2. Click **Tạo ứng dụng** (Create App)
3. Nhập thông tin:
   - **Tên App**: đặt tùy ý (VD: "My Fanpage Bot", "OpenClaw Agent")
   - **Email liên hệ**: email của bạn

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guide instructs users to place a permanent Facebook Page access token directly into a local JSON config file, creating a long-lived secret-at-rest that may be exposed through weak filesystem permissions, backups, logs, screenshots, or accidental source control commits. Because the token enables ongoing page management and messaging operations, compromise could allow unauthorized posting, message access, or impersonation of the page.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script prints both the page ID and a partially masked Facebook access token to stdout. Even partial token disclosure can leak sensitive credential material into terminal scrollback, logs, CI job output, screen recordings, or shared support transcripts, which is especially risky in a skill centered on long-lived Page Access Tokens for Facebook Graph API automation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The description and tags indicate a Vietnamese-oriented skill, and the documentation is presented entirely in Vietnamese, but there is no statement that this locale is intentional or optional for users. Under the policy, forcing a specific language without user opt-in can be a natural-language policy concern unless the locale constraint is documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The entire skill reference is written in Vietnamese and does not indicate that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document forces a specific language for all instructions and examples, which can violate a language/locale policy when no user opt-in or justification is provided. There is no note indicating that this skill or guide is intended only for Vietnamese-speaking users or a Vietnam-specific audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

Natural-language strings throughout the file force a specific language for all users. Under the language/locale policy, this is a violation unless the skill offers opt-in language selection or clearly documents that it is intentionally region- or locale-specific.

Content

No source excerpt is available for this finding.