Back to skill

Security audit

X Trends (using official API)

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it uses a user-provided X API bearer token to fetch trends and includes a local WOEID lookup helper.

Install only if you are comfortable providing an X API bearer token and allowing requests to api.x.com for the WOEID locations you query. Review your token's permissions and prefer a token scoped only for the API access this skill needs.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

A second description-behavior mismatch is present: the skill is presented as a trend-fetching X API integration, yet the documented behavior includes only local place/WOEID lookup rather than the advertised API action. In security terms, deceptive or inaccurate capability descriptions can hide over-privileged access, especially when bearer-token and network expectations are involved.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A second description-behavior mismatch is present: the skill is presented as a trend-fetching X API integration, yet the documented behavior includes only local place/WOEID lookup rather than the advertised API action. In security terms, deceptive or inaccurate capability descriptions can hide over-privileged access, especially when bearer-token and network expectations are involved.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares executable and network-relevant capabilities via Python and an API bearer token, but it does not define any explicit tool scope such as permissions or allowed-tools. That omission weakens least-privilege controls and can allow the skill to access environment secrets and make network requests without clear policy boundaries, which is risky in an agent execution environment.

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 · scripts/test_trends.py (reported line 102)May include surrounding context.

python
raise HTTPError(newurl, code, f"Redirect to {newurl} blocked (auth safety)", headers, fp)


API_BASE = "https://api.x.com/2"
TIMEOUT_S = 30
MAX_TRENDS_MIN = 1
MAX_TRENDS_MAX = 50

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 · scripts/trends.py (reported line 18)May include surrounding context.

python
raise HTTPError(newurl, code, f"Redirect to {newurl} blocked (auth safety)", headers, fp)


API_BASE = "https://api.x.com/2"
TIMEOUT_S = 30
MAX_TRENDS_MIN = 1
MAX_TRENDS_MAX = 50

Static analysis

No suspicious patterns detected.