T07 · Tool Hijacking and Spoofing
- Location
scripts/x_digest_to_fb.js:40- Finding
Undocumented execution of a PATH-resolved tool with sensitive X session credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches Facebook Page management, but it also bundles under-documented X-to-Facebook automation that uses X session cookies and can publish promotional content.
Review this before installing. The core Facebook Page CLI needs real Page authority and stores durable tokens locally, so protect .env and tokens.json and avoid running it in environments with unrelated secrets. The larger concern is the bundled X-to-Facebook automation: do not run x_digest_collect.js or x_digest_to_fb.js unless you explicitly want that workflow, trust the bird executable and X cookie handling, and are comfortable with automatic public posting of generated promotional digest content. A safer package would remove those scripts or document them separately and add confirmation prompts for every publish/delete action.
scripts/x_digest_to_fb.js:40Undocumented execution of a PATH-resolved tool with sensitive X session credentials
scripts/x_digest_to_fb.js:117Unrestricted remote media retrieval can enable SSRF, resource exhaustion, and unintended Facebook disclosure
scripts/x_digest_to_fb.js:142Undocumented automated publication of fixed promotional content
scripts/auth.js:66Meta App secrets and access tokens are transmitted in URL query strings
The documented purpose focuses on Facebook Page management, but the skill also includes OAuth setup, credential ingestion from .env, token exchange, and persistent token storage. That mismatch matters because operators may approve the skill for routine posting while overlooking that it also handles long-lived credentials and authentication state.
The documented purpose focuses on Facebook Page management, but the skill also includes OAuth setup, credential ingestion from .env, token exchange, and persistent token storage. That mismatch matters because operators may approve the skill for routine posting while overlooking that it also handles long-lived credentials and authentication state.
The documented purpose focuses on Facebook Page management, but the skill also includes OAuth setup, credential ingestion from .env, token exchange, and persistent token storage. That mismatch matters because operators may approve the skill for routine posting while overlooking that it also handles long-lived credentials and authentication state.
The documented purpose focuses on Facebook Page management, but the skill also includes OAuth setup, credential ingestion from .env, token exchange, and persistent token storage. That mismatch matters because operators may approve the skill for routine posting while overlooking that it also handles long-lived credentials and authentication state.
The skill instructs users to handle App ID/App Secret through a local .env file, which means the skill depends on sensitive credentials being present in the working environment. In agent ecosystems, credential-bearing env files are high-value targets because accidental exposure, over-broad tool access, or mishandled logging can leak long-lived application secrets.
cd skills/facebook-page
cp .env.example .env
Creating and editing a .env file with App ID and Secret introduces a clear credential storage surface on disk. If the host, repository, or agent tooling exposes workspace files, those credentials could be stolen and used to impersonate the app or obtain tokens.
cd skills/facebook-page
cp .env.example .env
# Edit .env với App ID và Secret
The explicit instruction to place App ID and Secret into .env normalizes plaintext secret handling without accompanying safeguards. Because these credentials are used for OAuth token exchange, their compromise can enable unauthorized token issuance or abuse of the associated Meta app.
cd skills/facebook-page
cp .env.example .env
# Edit .env với App ID và Secret
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Facebook Page Skill Configuration
# Copy this file to .env and fill in your values
# Meta App credentials (from developers.facebook.com)
META_APP_ID=your_app_id_here
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Facebook Page Skill Configuration
# Copy this file to .env and fill in your values
# Meta App credentials (from developers.facebook.com)
META_APP_ID=your_app_id_here
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Facebook Page Skill Configuration
# Copy this file to .env and fill in your values
# Meta App credentials (from developers.facebook.com)
META_APP_ID=your_app_id_here
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Facebook Page Skill Configuration
# Copy this file to .env and fill in your values
# Meta App credentials (from developers.facebook.com)
META_APP_ID=your_app_id_here
The documented DELETE /{post-id} operation is a high-risk destructive action that can be abused if an agent accepts untrusted identifiers or executes on insufficiently validated user intent. In this skill context, access tokens with page-management permissions make such abuse more dangerous because the action directly alters public page content and may be irreversible.
DELETE /{post-id}
The documented DELETE /{comment-id} endpoint enables removal of user-generated content and can be misused if an agent is tricked into deleting the wrong comment or acts without strong authorization and intent verification. Because this skill is specifically for managing page engagement, exposure of destructive moderation actions increases the risk of censorship, data loss, or reputation harm.
DELETE /{comment-id}
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const __dirname = dirname(fileURLToPath(import.meta.url));
const SKILL_DIR = join(__dirname, "..");
const ENV_FILE = join(SKILL_DIR, ".env");
const TOKENS_FILE = join(SKILL_DIR, "tokens.json");
// Load .env from skill directory
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const __dirname = dirname(fileURLToPath(import.meta.url));
const SKILL_DIR = join(__dirname, "..");
const ENV_FILE = join(SKILL_DIR, ".env");
const TOKENS_FILE = join(SKILL_DIR, "tokens.json");
// Load .env from skill directory
This file implements X/Twitter digest collection, credential use, and image downloading even though the declared skill is for Facebook Page management via the Meta Graph API. That mismatch is dangerous because unrelated capabilities can be hidden inside a skill, expanding its effective permissions and enabling unexpected data access or outbound activity that operators and users would not anticipate.
The skill documents network access and use of local environment secrets, but it does not declare any explicit tool scope such as allowed tools or permissions. In an agent setting, missing scope boundaries increases the risk of over-broad tool use and makes it harder to enforce least privilege around credential and network operations.
The setup flow creates durable authentication state by obtaining long-lived tokens and later storing page tokens on disk. Persistent session material increases the blast radius of a host compromise because an attacker can reuse tokens without re-authenticating to manage pages or moderate content.
## Setup (một lần)
### 1. Tạo Meta App
1. Vào https://developers.facebook.com/apps/ → Create App
2. Chọn **"Other"** → **"Business"** (hoặc Consumer tuỳ use-case)
3. Điền tên app, email
4. Vào **App settings > Basic**: lấy **App ID** và **App Secret**
The skill exposes hide and delete comment operations but provides no warning, review step, or confirmation guidance for destructive moderation actions. In agent-driven use, that raises the chance of accidental censorship or irreversible deletion of user content through misunderstanding or prompt error.
The reference documents destructive operations like deleting posts and comments, and hiding comments, without any caution about confirmation, authorization checks, or irreversible effects. In a skill meant to drive agent behavior, this omission can lead an agent or integrator to perform destructive actions too readily based on ambiguous user input or prompt injection.
The CLI exposes a post deletion capability even though the declared skill description only promises posting, listing posts, and comment management. That mismatch expands the skill's effective authority and can lead users or orchestrators to invoke destructive behavior they did not expect, increasing the risk of unauthorized or accidental content removal.
The post deletion command immediately performs a destructive API delete with no confirmation, preview, or warning. A mistyped post ID, automation bug, or prompt-injection-driven invocation could irreversibly remove page content before an operator has a chance to review the action.
Comment deletion is also a destructive moderation action, but the command executes immediately without any warning or confirmation. In a skill that may be driven by user requests or higher-level agents, this makes accidental or manipulated deletion of user-generated content much easier.
This script performs a real external side-effecting action by publishing content to a Facebook Page as soon as valid arguments and tokens are present, with no built-in confirmation, dry-run mode, or user-visible warning. In an agent setting, that increases the risk of accidental or unauthorized posting if the tool is invoked from ambiguous, injected, or mistaken instructions, potentially causing reputational damage or unwanted public communication.
The code downloads remote images to local storage and performs digest collection unrelated to Facebook Page operations. In the context of this skill, those hidden side capabilities increase attack surface through unexpected network fetches, local file writes under /tmp, and use of external credentials, which could be abused for covert data collection or unreviewed content handling.
Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.exposed_secret_literal (+1 more)