T09 · Insecure Skill Coding Practices
- Location
scripts/prediction_market_client.py:66- Finding
Bearer API Credential May Be Disclosed Through Cross-Origin Redirects
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent prediction-market data client, but it needs review because it can send wallet identifiers and a bearer API key to a third-party service without enough privacy and credential-safety guardrails.
Install only if you are comfortable sending market queries, wallet addresses, and related portfolio/P&L lookups to AIsa using your AISA_API_KEY. Use it only for wallets you own or are authorized to analyze, avoid logging or retaining wallet results unnecessarily, and consider hardening redirect handling before using a valuable API key.
scripts/prediction_market_client.py:66Bearer API Credential May Be Disclosed Through Cross-Origin Redirects
Without declared permissions the skill's intent is opaque and cannot be validated.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
class PredictionMarketClient:
"""Cross-Platform Prediction Market Data - AIsa API Client."""
BASE_URL = "https://api.aisa.one/apis/v1"
def __init__(self, api_key: Optional[str] = None):
self.api_key = api_key or os.environ.get("AISA_API_KEY")
The skill explicitly promotes wallet-level activity, positions, and P&L tracking without any privacy warning, consent guidance, or data-minimization advice. Even if wallet addresses are public on-chain, aggregating them through a third-party analytics API makes it easier to profile an individual's financial behavior, holdings, and trading history.
This example transmits a wallet address to an external API to retrieve user activity, which can expose trading behavior and enable profiling when used without consent or warning. In the context of a skill intended for autonomous agents, the lack of guardrails increases the chance of querying third-party services with sensitive financial identifiers automatically.
# Fetch activity data for a specific user
curl -X GET "https://api.aisa.one/apis/v1/polymarket/activity?user={wallet_address}" \
-H "Authorization: Bearer $AISA_API_KEY"
This endpoint sends a wallet address to a third party to retrieve positions, directly exposing potentially sensitive portfolio holdings and investment behavior. Because the skill frames this as a standard capability without warning or consent checks, an autonomous agent could disclose or profile users more easily than raw on-chain access would.
# Fetch all Polymarket positions for a proxy wallet address
curl -X GET "https://api.aisa.one/apis/v1/polymarket/positions/wallet/{wallet_address}" \
-H "Authorization: Bearer $AISA_API_KEY"
This wallet-information lookup transmits a wallet address to an external service for enrichment, enabling third-party observation and aggregation of a user's financial identity. The danger is increased by the absence of any privacy notice, consent requirement, or limitation on whose wallet can be queried.
# Fetch wallet information
curl -X GET "https://api.aisa.one/apis/v1/polymarket/wallet?eoa={wallet_address}" \
-H "Authorization: Bearer $AISA_API_KEY"
This example sends a wallet address to obtain realized P&L, which is especially sensitive because it reveals financial performance rather than just public market state. Making this a routine documented workflow without privacy cautions increases the risk of unauthorized financial surveillance or oversharing by downstream agents.
# Fetch realized profit and loss (PnL) for a specific wallet address
curl -X GET "https://api.aisa.one/apis/v1/polymarket/wallet/pnl/{wallet_address}?granularity=day" \
-H "Authorization: Bearer $AISA_API_KEY"
The client reads the AISA_API_KEY from the environment, which is access to a sensitive credential source. Although this is typical for API clients, there is no explicit warning or disclosure beyond the requirement message, and the skill file does not inform users that the script depends on and consumes a bearer token from environment state.
This code sends user-supplied wallet addresses and related query parameters to a remote API endpoint, which is a form of network transmission of user data. While the script's purpose is to retrieve market data, there is no explicit user-facing warning in the code that wallet identifiers and activity lookups will be sent to the external AIsa service.
No suspicious patterns detected.