Back to skill

Security audit

AIsa Financial Data

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate financial-data API skill, but it needs review because its Python client can expose the API key if the API redirects across origins.

Review this before installing. Use a limited, rotatable AIsa API key, monitor credit usage, avoid placing sensitive personal or account data in screener filters or query fields, and prefer host/network controls that restrict egress to the intended API host. The publisher should add explicit permission scope and harden the Python client so authenticated requests do not follow cross-origin redirects with the bearer token attached.

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/market_client.py:63
Finding
Bearer API Key May Be Disclosed Through Cross-Origin HTTP Redirects<![CDATA[ ## Vulnerability Details **File Location**: `scripts/market_client.py`, lines 63–75 **Vulnerability Type**: Unrestricted redirect handling with a sensitive authorization header **Risk Level**: Medium ```python headers = { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json", "User-Agent": "OpenClaw-Market/1.0" } request_data = None if data: request_data = json.dumps(data).encode("utf-8") if method == "POST" and request_data is None: request_data = b"{}" req = urllib.request.Request(url, data=request_data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=60) as response: return json.loads(response.read().decode("utf-8")) ``` ### Technical Analysis The client attaches the `AISA_API_KEY` to every request as an `Authorization: Bearer` header and uses `urllib.request.urlopen`, which follows HTTP redirects automatically. The code does not define a redirect policy, validate each redirect destination, or remove sensitive headers when the destination origin changes. Python redirect handling can propagate request headers into redirected requests. If `api.aisa.one` returns a redirect to a different origin, the Bearer credential may consequently be sent to that destination. TLS protects the request in transit but does not prevent credential disclosure when the application voluntarily follows a valid HTTPS redirect. Exploitation requires control over, or compromise of, an API response capable of issuing a redirect. A conventional network attacker without a trusted TLS certificate would not independently satisfy this condition. ### Attack Path 1. A user configures a valid `AISA_API_KEY` and invokes any documented stock or cryptocurrency command. 2. The client sends a request containing `Authorization: Bearer <AISA_API_KEY>` to `https://api.aisa.one`. 3. A compromised or malicious API endpoint responds with an HTTP redirect to an attacker-controlled HTTPS origin. 4. `url ...[truncated 787 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Disable automatic redirect following for authenticated API requests, or implement a custom `HTTPRedirectHandler`. 2. Permit redirects only when all of the following remain true: - The scheme is `https`. - The normalized hostname is exactly `api.aisa.one`. - The effective port and origin satisfy an explicit allowlist. 3. Remove the `Authorization` header whenever a redirect changes the scheme, hostname, or port. 4. Apply a small redirect limit and reject malformed, protocol-relative, downgraded, or user-information-bearing destinations. 5. Prefer treating unexpected redirects as errors because the configured API endpoint is fixed and ordinarily should not require cross-origin redirection. 6. Add automated tests that verify the credential is not transmitted after same-origin-to-cross-origin, HTTPS-to-HTTP, and multi-hop redirects. 7. If exposure is suspected, revoke and rotate the affected `AISA_API_KEY` and review API usage for unauthorized credit consumption. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (28)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill declares required binaries and an API key, and its examples clearly perform outbound network requests, but it does not declare an explicit tool scope such as allowed-tools or permissions. This weakens least-privilege controls and can let a host agent invoke broader capabilities than the skill actually needs, increasing the blast radius if the skill is misused or prompt-injected.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Historical price data (daily)
curl "https://api.aisa.one/apis/v1/financial/prices?ticker=AAPL&interval=day&interval_multiplier=1&start_date=2025-01-01&end_date=2025-12-31" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Weekly price data
Confidence
90% confidence
Finding
This example sends an Authorization bearer token to an external service over the network. While that is expected for an API client skill, it is still a real data-transmission boundary because secrets and user-request parameters leave the local environment and are exposed to a third-party endpoint.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Historical price data (daily)
curl "https://api.aisa.one/apis/v1/financial/prices?ticker=AAPL&interval=day&interval_multiplier=1&start_date=2025-01-01&end_date=2025-12-31" \
  -H "Authorization: Bearer $AISA_API_KEY"

# Weekly price data
Confidence
90% confidence
Finding
This example sends an Authorization bearer token to an external service over the network. While that is expected for an API client skill, it is still a real data-transmission boundary because secrets and user-request parameters leave the local environment and are exposed to a third-party endpoint.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# Screen for stocks matching criteria
curl -X POST "https://api.aisa.one/apis/v1/financial/search/stock" \
  -H "Authorization: Bearer $AISA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filters":{"pe_ratio":{"max":15},"revenue_growth":{"min":0.2}}}'
Confidence
86% confidence
Finding
This POST example transmits structured query criteria and a bearer token to a third-party service. Although expected for a stock screener, POST bodies can include richer user-supplied content and therefore increase the chance of sending sensitive or unvalidated data off-platform if an agent passes through arbitrary user filters.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
class MarketClient:
    """OpenClaw Market - Unified Market Data API Client."""
    
    BASE_URL = "https://api.aisa.one/apis/v1"
    
    def __init__(self, api_key: Optional[str] = None):
        """Initialize the client with an API key."""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.