T01 · Skill Instruction Hijacking
- Location
scripts/fetch-tweets.py:64- Finding
Untrusted Tweet Content Is Passed to the Agent Without Instruction-Boundary Safeguards
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s X monitoring purpose is mostly coherent, but it needs Review because it can create recurring agent-run cron jobs that use an X API token and process untrusted tweet text without clear permission boundaries.
Install only if you are comfortable storing an X API bearer token locally and creating recurring scheduled agent runs. Before enabling cron jobs, restrict the token to the minimum X API scopes, store credentials with private file permissions, confirm what tools scheduled agentTurn jobs can access, and add clear rules that tweet content must be treated as untrusted quoted data.
scripts/fetch-tweets.py:64Untrusted Tweet Content Is Passed to the Agent Without Instruction-Boundary Safeguards
SKILL.md:12Plaintext Bearer Token Storage Lacks Required Filesystem Permission Controls
The document claims filtering, exclusion rules, schedule management, and handle management behaviors that are not actually implemented in the supplied skill content, while also persisting local state not clearly disclosed in the high-level description. This mismatch can mislead users and reviewers about what the skill really does, reducing trust and making risky behavior like local persistence or automation easier to hide.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Config paths
BASE_DIR = Path.home() / '.openclaw' / 'workspace' / 'x-monitor'
CREDS_FILE = BASE_DIR / 'credentials.json'
HANDLES_FILE = BASE_DIR / 'handles.json'
LAST_CHECK_FILE = BASE_DIR / 'last-check.json'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Config paths
BASE_DIR = Path.home() / '.openclaw' / 'workspace' / 'x-monitor'
CREDS_FILE = BASE_DIR / 'credentials.json'
HANDLES_FILE = BASE_DIR / 'handles.json'
LAST_CHECK_FILE = BASE_DIR / 'last-check.json'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Config paths
BASE_DIR = Path.home() / '.openclaw' / 'workspace' / 'x-monitor'
CREDS_FILE = BASE_DIR / 'credentials.json'
HANDLES_FILE = BASE_DIR / 'handles.json'
LAST_CHECK_FILE = BASE_DIR / 'last-check.json'
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Config paths
BASE_DIR = Path.home() / '.openclaw' / 'workspace' / 'x-monitor'
CREDS_FILE = BASE_DIR / 'credentials.json'
HANDLES_FILE = BASE_DIR / 'handles.json'
LAST_CHECK_FILE = BASE_DIR / 'last-check.json'
The skill instructs the agent to read/write local files and make network calls to the X API, but it declares no explicit tool scope or permissions boundary. That increases the chance the agent will exercise broader capabilities than users expect, especially when combined with automation and credential handling.
The skill directs the agent to set up cron jobs, introducing persistent scheduled execution rather than a one-shot monitoring action. Persistent automation broadens the attack surface because it can continue making network requests and processing data without a fresh user approval each time.
Using agentTurn-based cron payloads creates a durable automation channel that can repeatedly invoke the agent with tools and context over time. Even if intended for monitoring, this capability is broader than the stated purpose and can amplify mistakes, misconfigurations, or later prompt manipulation into recurring actions.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_recent_tweets(handle, bearer_token, since_time=None):
"""Fetch recent tweets from a handle using X API v2."""
url = 'https://api.x.com/2/tweets/search/recent'
query = f'from:{handle}'
if since_time:
The documentation tells users to store an API bearer token in a local JSON file but does not warn about filesystem permissions, secret leakage, or avoiding accidental commits and exposure. While not an exploit by itself, poor secret-handling guidance increases the likelihood of credential compromise.
This JSON config fixes the skill's locale behavior to America/Los_Angeles. Under the policy, forcing a specific locale without user opt-in or clear justification can be a natural-language policy violation, and this file provides neither an alternative nor explanatory context.
This code loads credentials.json and accesses the bearer token to authenticate outbound API requests. While the module docstring says it fetches tweets, there is no explicit warning in this file about reading sensitive credentials from the user's home directory.
The script writes last-check.json and tweet_history.json under the user's home directory, persisting fetched content and metadata across runs. Although the code behavior is visible, there is no explicit user-facing disclosure in comments, docstrings, or output that the script creates and updates local history files.
No suspicious patterns detected.