Back to skill

Security audit

AIsa Twitter Research Engage

Security checks for vulnerabilities and agentic risk

Overview

The skill's Twitter research, posting, and engagement purpose is mostly disclosed, but its bundled clients expose the user's AIsa API key in normal command output and allow credentialed relay requests to configurable destinations.

Review before installing. Use only a scoped or disposable AISA_API_KEY, avoid running status/authorize/post commands where output is logged, and do not use a custom TWITTER_RELAY_BASE_URL unless you fully trust it and it uses HTTPS. Treat posting, media upload, likes, follows, and unfollows as live actions on the connected X/Twitter account.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/twitter_oauth_client.py:332
Finding

API Key Disclosed in Command Output

Content
View full analysis
None: config = load_config(args) response = { "ok": True, "relay_base_url": config["base_url"], "aisa_api_key": config["aisa_api_key"], "timeout": config["timeout"], "supported_commands": ["autho ...[truncated 3320 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/twitter_oauth_client.py:46
Finding

API Key Can Be Sent to an Arbitrary Plaintext Relay

Content
View full analysis
str: value = base_url.strip().rstrip("/") if not value: raise RelayConfigError("TWITTER_RELAY_BASE_URL is required.") parsed = urllib.parse.urlparse(value) if parsed.scheme not in {"http", "https"} or not parsed.netloc: raise RelayConfigError("TWITTER_RELAY_BASE_URL must be a valid http(s) URL.") return value ``` The key is then sent as a bearer credential: ```python def build_auth_headers(aisa_api_key: str, extra_headers: Optional[Dict[str, str]] = None) -> Dict[str, str]: headers = { "Authorization": f"Bearer {aisa_api_key}", "User-Agent": DEFAULT_CHROME_USER_AGENT, } if extra_headers: headers.update(extra_headers) return headers def send_json_request( url: str, payload: Dict[str, Any], timeout: int, aisa_api_key: str, ) -> Dict[str, Any]: request = urllib.request.Request( url, data=json.dumps(payload).encode("utf-8"), headers=build_auth_headers( aisa_api_key, {"Content-Type": "application/json", "Accept": "application/json"}, ), method="POST", ) try: with urllib.request.urlopen(request, timeout=timeout) as response: raw = response.read().decode("utf-8") return parse_response_body(raw, response.status, "ok") ``` Engagement actions use this configurable destination: ```python def relay_action(config: Dict[str, Any], endpoint: str, payload: Dict[str, Any]) -> Dict[str, Any]: ...[truncated 2749 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding indicates the skill may perform engagement actions such as like/follow relay operations that are not disclosed in the description, while also falsely advertising OAuth posting and trend support. Undeclared account-affecting actions are dangerous because users and platforms may authorize the skill for research purposes without realizing it can mutate social accounts or trigger external actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

This finding indicates the skill may perform engagement actions such as like/follow relay operations that are not disclosed in the description, while also falsely advertising OAuth posting and trend support. Undeclared account-affecting actions are dangerous because users and platforms may authorize the skill for research purposes without realizing it can mutate social accounts or trigger external actions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding indicates the skill may perform engagement actions such as like/follow relay operations that are not disclosed in the description, while also falsely advertising OAuth posting and trend support. Undeclared account-affecting actions are dangerous because users and platforms may authorize the skill for research purposes without realizing it can mutate social accounts or trigger external actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The status command returns the raw configured AISA API key in JSON output. Any user, log collector, transcript, or downstream tool invoking this command can obtain a reusable credential, which can enable unauthorized API use and lateral access beyond the intended Twitter engagement workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Printing the raw AISA API key without masking or warning is a direct secret disclosure vulnerability. In this skill context, the risk is heightened because agent/tool outputs are often surfaced to users, stored in logs, and passed through orchestration layers, making credential exfiltration easy and durable.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The authorize/post flows include the raw AISA API key in command output, and authorize also includes the raw relay response. This exposes a live bearer token during normal operation, making accidental leakage through logs, transcripts, agent tool output, CI captures, or user-visible responses very likely; an attacker who obtains the key can impersonate the client against the relay service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares access to an API key and implies networked Python script execution, but it does not declare any explicit tool scope such as allowed-tools or permissions. That creates an authorization ambiguity where an orchestrator may permit broader execution than intended, increasing the chance of unexpected network use or environment-variable access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The invocation guidance is broad enough to match many common social-media requests, which increases the chance the skill is selected in contexts beyond its safest intended use. Because this skill touches networked APIs and potentially account-affecting workflows, overbroad routing can lead to unnecessary credential use, unintended data sharing, or accidental triggering of higher-risk actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow enables real account-changing actions such as like, unlike, follow, and unfollow, but it does not clearly warn that these operations will affect the user's live X/Twitter account. In an agent setting, missing disclosure increases the chance of unintended social actions, especially when users may interpret the skill as research-only or low-risk automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The Quick Start instructs users to export an API key but provides no guidance on secure credential handling, such as avoiding shell history leaks, shared terminals, or committing secrets into files. While common in documentation, this omission can still lead to accidental credential exposure and unauthorized use of the relay-backed account actions.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/engage_twitter.md (reported line 64)May include surrounding context.

md
When the user asks to like, unlike, follow, or unfollow on X/Twitter:

1. Do not ask the user for tweet IDs, tweet links, or user IDs.
2. If the user specifies a direct account such as `@elonmusk`, call the `--user` based command.
3. If the user asks for the latest tweet, use `like-latest` or `unlike-latest`.
4. If the user first asked to query tweets, keep the returned `tweets[]` structure in agent context.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/engage_twitter.md (reported line 76)May include surrounding context.

md
When the user asks to like, unlike, follow, or unfollow on X/Twitter:

1. Do not ask the user for tweet IDs, tweet links, or user IDs.
2. If the user specifies a direct account such as `@elonmusk`, call the `--user` based command.
3. If the user asks for the latest tweet, use `like-latest` or `unlike-latest`.
4. If the user first asked to query tweets, keep the returned `tweets[]` structure in agent context.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/post_twitter.md (reported line 147)May include surrounding context.

md
When the user asks to like, unlike, follow, or unfollow on X/Twitter:

1. Do not ask the user for tweet IDs, tweet links, or user IDs.
2. If the user specifies a direct account such as `@elonmusk`, call the `--user` based command.
3. If the user asks for the latest tweet, use `like-latest` or `unlike-latest`.
4. If the user first asked to query tweets, keep the returned `tweets[]` structure in agent context.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill describes media upload and publishing flow but does not clearly warn that tweet text and attached files are transmitted to external services, including the relay backend and X/Twitter. Users may unknowingly expose sensitive text, images, or videos to third parties and publish them publicly, which is especially risky in an autonomous agent context where the system may act on user-provided workspace files.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill’s agent instructions say to default to --type quote for publishing, which directly contradicts earlier documented behavior that normal standalone posts should not send relationship fields and that quote posting should only occur when the user explicitly wants to quote another tweet. In an externally publishing skill, this contradiction can cause unintended quoting behavior, malformed posts, or accidental inclusion of relationship metadata that changes what gets published to a public third-party platform.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file-level docs and CLI description repeatedly frame the utility as a read-only Twitter client, yet the implementation contains generic POST capability. In an agent skill context, deceptive or inaccurate capability descriptions are security-relevant because orchestration layers may grant broader trust to a supposedly non-mutating tool, enabling unintended posting or other side effects through future code paths.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module documentation presents the client as read-only, but the shared request helper supports POST and automatically injects the API key into POST request bodies. This mismatch can cause downstream agents or reviewers to trust the tool as non-mutating while hidden write-capable behavior exists, increasing the risk of unintended state-changing operations and credential exposure if POST endpoints are later added or invoked.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code sends usernames, tweet IDs, search queries, and other user-supplied parameters to https://api.aisa.one via HTTP requests. Although the module docstring says it uses read APIs and bearer authentication, there is no runtime notice, confirmation, or explicit disclosure that these inputs are transmitted to an external service.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The command is presented as a harmless configuration/status view, but it also discloses the full API key. That mismatch increases the chance operators will run it casually, share its output, or include it in debugging artifacts, causing inadvertent secret leakage.

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/twitter_client.py (reported line 36)May include surrounding context.

python
DEFAULT_TIMEOUT = 30
DEFAULT_BASE_URL = "https://api.aisa.one/apis/v1/twitter"
DEFAULT_CHROME_USER_AGENT = (
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
    "AppleWebKit/537.36 (KHTML, like Gecko) "

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/twitter_oauth_client.py (reported line 27)May include surrounding context.

python
DEFAULT_TIMEOUT = 30
DEFAULT_BASE_URL = "https://api.aisa.one/apis/v1/twitter"
DEFAULT_CHROME_USER_AGENT = (
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
    "AppleWebKit/537.36 (KHTML, like Gecko) "

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script exposes the API key in user-facing output without masking or warning, which violates safe secret-handling practices and increases the chance of inadvertent credential disclosure. Although this overlaps with the stronger secret-disclosure findings, the lack of masking/warning is itself a real weakness because it normalizes unsafe handling and makes leaks easier in operational environments.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The status command prints the raw AISA API key, unnecessarily disclosing a bearer credential to anyone who can invoke the script, view terminal output, shell history captures, logs, or downstream tooling that records stdout. In this skill’s context, the key is not needed for normal Twitter status reporting, so exposing it creates a direct secret-leak path that can enable unauthorized use of the AIsa Twitter relay and any permissions attached to that account.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.