Back to skill

Security audit

Sports Pronostics

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real-time football betting analysis tool, but it handles an API credential in an overbroad way that could send the key to an environment-configured host.

Review this skill before installing if you will provide a real RapidAPI key. Only run it in an environment where RAPIDAPI_HOST cannot be changed by untrusted parties, and expect football-related prompts to be sent to a RapidAPI football data service. The artifact does not show malware-like behavior, but the credential destination should be locked down or allowlisted before production use.

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

Error
Location
sports-pronostics.js:6
Finding

Environment-Controlled Request Host Can Expose the RapidAPI Credential

Content
View full analysis

Vulnerability Details

File Location: sports-pronostics.js, lines 6–8 and 14–21
Vulnerability Type: Unvalidated credential destination
Risk Level: High

Vulnerable Code

js
const RAPIDAPI_KEY  = process.env.RAPIDAPI_KEY;
const RAPIDAPI_HOST = process.env.RAPIDAPI_HOST || "free-api-live-football-data.p.rapidapi.com";
const BASE_URL      = `https://${RAPIDAPI_HOST}`;

async function fetchFootball(endpoint, params = {}) {
  const url = new URL(`${BASE_URL}/${endpoint}`);
  Object.entries(params).forEach(([k, v]) => url.searchParams.append(k, v));

  const res = await fetch(url.toString(), {
    headers: {
      "X-RapidAPI-Key":  RAPIDAPI_KEY,
      "X-RapidAPI-Host": RAPIDAPI_HOST
    }
  });

Technical Analysis

The RAPIDAPI_HOST environment variable controls the outbound request destination without hostname validation or an allowlist. The same function unconditionally attaches the sensitive RAPIDAPI_KEY header to requests made to that destination.

Network access and use of a RapidAPI credential are consistent with the Skill's declared real-time football-data functionality. However, allowing configuration to redirect that credential to an arbitrary HTTPS server is not necessary for that functionality and violates least-privilege credential handling.

An attacker must be able to influence the process environment or deployment configuration. If that prerequisite is met, no code modification is needed to redirect the credential.

Attack Path

  1. An attacker with control over deployment configuration sets RAPIDAPI_HOST to an attacker-controlled HTTPS hostname.
  2. The Skill starts and constructs BASE_URL from the malicious hostname.
  3. A user or Agent invokes any exported football-data tool, such as getUpcomingMatches or getLiveScores.
  4. fetchFootball() sends the request to the attacker-controlled server.
  5. The request includes the victim's RAPIDAPI_KEY in the ...[truncated 484 chars]
Remediation
View remediation

Remediation Suggestions

  1. Hard-code the approved API origin when only one provider is supported:
    js
    const RAPIDAPI_HOST = "free-api-live-football-data.p.rapidapi.com";
    const BASE_URL = `https://${RAPIDAPI_HOST}`;
    
  2. If multiple hosts are required, validate the configured value with an exact allowlist before constructing the URL:
    js
    const ALLOWED_HOSTS = new Set([
      "free-api-live-football-data.p.rapidapi.com"
    ]);
    
    const configuredHost =
      process.env.RAPIDAPI_HOST ||
      "free-api-live-football-data.p.rapidapi.com";
    
    if (!ALLOWED_HOSTS.has(configuredHost)) {
      throw new Error("Unapproved RapidAPI host");
    }
    
  3. Verify the final URL's protocol and hostname immediately before attaching credentials. Require HTTPS and exact hostname equality; do not rely on suffix matching.
  4. Fail closed when RAPIDAPI_KEY is absent rather than sending an undefined credential.
  5. Prevent redirects from forwarding the credential to another origin. Disable automatic redirects or manually validate every redirect destination before resending sensitive headers.
  6. Restrict who can modify the Skill's environment variables and deployment configuration.
  7. Rotate the RapidAPI key if the Skill has previously run with an untrusted RAPIDAPI_HOST value, and review provider logs for unauthorized use.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill forces French output for all interactions without checking the user's preferred language or providing a locale-based justification. This can degrade usability, cause misunderstanding of betting-related information, and override higher-priority expectations that the assistant respond in the user's language.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation condition is broad enough to trigger on general conversation about football, matches, or betting, which can invoke the skill unexpectedly and steer the assistant into specialized behavior without clear user intent. In this context, the skill also mandates tool use and a rigid response format, so accidental activation can cause unnecessary data access, user-friction, and responses that do not match the user's language or needs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill forwards user-influenced inputs such as leagueName, teamId, team1Id, team2Id, matchId, and count to a third-party RapidAPI football service without any disclosure, consent, or minimization controls. While the data here is not obviously highly sensitive, it still exposes user queries and usage patterns to an external provider, creating a privacy and transparency risk in contexts where users may assume the assistant operates locally or first-party only.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

User-facing descriptions, trigger phrases, and analysis text are all in French, which effectively forces a specific language/locale. The file does not offer user opt-in for French nor explain that the skill is intentionally region- or language-specific.

Content

No source excerpt is available for this finding.