Back to skill

Security audit

Benchmark Model Provider

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its benchmarking purpose, but its runner can send any configured environment variable as an API bearer token to any configured HTTPS endpoint.

Install only if you will run benchmark specs you trust. Review every spec before execution, keep auth_env set to a dedicated low-privilege benchmark key such as BENCHMARK_API_KEY, avoid sensitive prompts unless the endpoint is approved, and pin dependencies before use in a controlled environment.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_benchmark.py:53
Finding
Specification-Controlled Credential Disclosure to Arbitrary HTTPS Endpoints<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run_benchmark.py:53-65, 107-142` **Vulnerability Type**: Arbitrary environment credential disclosure and insufficient outbound endpoint validation **Risk Level**: High ### Vulnerable Code ```python def call_model(base_url, api_key, model, prompt): url = base_url.rstrip('/') + '/chat/completions' normalized_model = normalize_model_name(model, base_url) payload = {'model': normalized_model, 'messages': [{'role': 'user', 'content': prompt}]} raw_payload = json.dumps(payload).encode('utf-8') headers = {'Content-Type': 'application/json'} if api_key: headers['Authorization'] = f'Bearer {api_key}' start = time.time() try: req = urllib.request.Request(url, data=raw_payload, headers=headers, method='POST') with urllib.request.urlopen(req, timeout=180) as resp: data = json.loads(resp.read().decode('utf-8')) ``` ```python def _is_safe_base_url(base_url: str) -> bool: """Basic safety checks. - Require https - Block raw IPs - Block localhost This is not a complete security solution, but it prevents the most common foot-guns that trigger security scanners and protects against accidental exfiltration to an IP/short endpoint. """ if not base_url: return False base_url = base_url.strip() if not base_url.startswith('https://'): return False lowered = base_url.lower() if 'localhost' in lowered or '127.0.0.1' in lowered or '0.0.0.0' in lowered: return False # crude IP check (blocks http(s)://<digits>.<digits>.<digits>.<digits>) import re if re.search(r'https://\d{1,3}(?:\.\d{1,3}){3}(?::\d+)?(?:/|$)', lowered): return False return True def run_single_model(spec: dict, model: str, run_dir: Path, run_id: str): base_url = spec.get('base_url') or os.environ.get('BENCHMARK_BASE_URL') or '' if not _is_safe_base_url(base_url): raise Syste ...[truncated 3243 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Restrict credential selection** - Remove specification-controlled access to arbitrary environment-variable names. - Use only a fixed variable such as `BENCHMARK_API_KEY`, or maintain a small operator-configured allowlist. - Prefer provider-specific, least-privilege credentials rather than exposing the general process environment. 2. **Restrict outbound destinations** - Require an explicit allowlist of trusted provider hostnames. - Require user confirmation before sending a credential to a previously unapproved endpoint. - Bind each credential to its expected hostname and reject mismatched credential-destination combinations. 3. **Implement robust URL validation** - Parse URLs with `urllib.parse.urlsplit()` rather than string-prefix checks. - Require the exact `https` scheme and a valid hostname. - Reject URL user information, fragments, unsupported ports, malformed hosts, and ambiguous encodings. - Resolve every hostname and reject loopback, private, link-local, multicast, reserved, unspecified, and cloud metadata ranges for IPv4 and IPv6. 4. **Control redirects** - Disable automatic redirects for credentialed requests where possible. - If redirects are required, revalidate every target and remove credentials when the origin changes. 5. **Reduce data exposure** - Display the destination hostname and data categories before execution. - Require explicit approval before transmitting potentially sensitive prompts. - Document that specifications are executable security-sensitive configuration and must not be accepted from untrusted sources. 6. **Add security tests** - Test malicious `auth_env` values. - Test IPv6 loopback and private addresses. - Test hostnames resolving to private addresses, DNS rebinding scenarios, encoded IP forms, and redirects to internal services. ]]>

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding
Unpinned Third-Party Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-2` **Vulnerability Type**: Mutable dependency resolution and supply-chain exposure **Risk Level**: Low ### Vulnerable Code ```text PyYAML reportlab ``` ### Technical Analysis The dependency declarations contain neither exact versions nor integrity hashes. Each installation can therefore resolve to the latest version accepted by the package index at that time rather than to a version that was specifically reviewed and tested. This makes builds non-reproducible and expands supply-chain exposure. A future compromised, malicious, or unexpectedly incompatible package release could be installed without any project change. Because Python packages can execute code during installation and are imported by the scripts at runtime, dependency compromise can affect both installation and execution. No evidence was found that either listed package is currently malicious. The finding concerns the absence of version and integrity controls. ### Attack Path 1. A user or deployment system runs `pip install -r requirements.txt`. 2. The package resolver queries its configured package index. 3. Because no versions or hashes are specified, it selects versions available at installation time. 4. If a selected release or package-index path has been compromised, package-controlled code runs during installation or when imported. 5. The malicious dependency operates with the privileges of the user or service installing or executing the Skill. ### Impact Assessment The potential impact is bounded by the privileges of the installation or runtime account but can include: - Arbitrary code execution during installation or import. - Access to files, environment variables, and benchmark API credentials available to the process. - Modification of generated benchmark results or reports. - Outbound network communication under the host's network permissions. - Build instability and behavioral changes from unreviewed dep ...[truncated 151 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin every dependency to a reviewed exact version. - Generate and commit a lock file containing cryptographic hashes, for example with `pip-compile --generate-hashes`. - Install with hash enforcement, such as `pip install --require-hashes -r requirements.txt`. - Use a trusted package index and prevent unintended fallback to untrusted or public indexes in controlled deployments. - Add automated dependency vulnerability scanning and a documented review process for upgrades. - Test dependency updates in an isolated environment before changing the lock file. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (34)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The declared description promises substantive benchmarking and model/provider evaluation features. The supplied code chunk only contains a placeholder frontend script with a console.log statement indicating a landing page template was loaded. This is materially different from the declared purpose, with none of the described core capabilities present in the code shown.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description describes a full benchmarking and model-comparison capability, but the actual code chunk only implements a basic token estimation helper. It does not benchmark models, compare providers, generate prompt suites, rank outputs, or create reports. While token estimation could be a supporting utility in a larger benchmarking system, this code chunk by itself does not substantively perform the declared primary purpose, so the description materially overstates the behavior shown.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description centers on benchmarking and ranking AI providers/models and generating benchmark reports. This code chunk does not implement any benchmarking, scoring, reranking, model comparison, or prompt-suite derivation. Instead, its primary function is post-processing/publication support for reports: copying a PDF to a published filename and emitting suggestions for hosting static HTML via services like Vercel, Netlify, Cloudflare Pages, and GitHub Pages. While report publication could be tangentially related to benchmark reporting, this chunk’s actual purpose is materially different from the declared benchmark-and-rank functionality, so it should be flagged as a mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description promises a broad benchmark and ranking capability for AI models/providers, driven by user-specific prompts and producing comparative assessments and reports. The supplied code does none of that. It only maps model identifiers to input/output token pricing values using a built-in dictionary and returns fallback estimates when unknown. While pricing could be a supporting component of a benchmarking system, this code chunk by itself has a materially narrower and different primary purpose: pricing resolution. Therefore the description does not accurately represent this code chunk's actual behavior.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- Normalize model ids before calling the endpoint when the provider catalog exposes raw model ids but the user/runtime spec may contain provider-prefixed names.
- If the endpoint returns naming/provider mismatch errors, explain the mismatch clearly instead of leaving only a raw 502/unknown-provider error.

### Output rules
- Mark every estimated metric clearly.
- Rewrite reports/landing pages to the newest snapshot.
- Do **not** append patch fragments to stale output.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill advertises capabilities that imply environment access, file I/O, shell execution, and network use, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates an unclear trust boundary and increases the chance the skill is executed with broader privileges than intended, especially since it can send prompts to arbitrary configured endpoints and handle local artifacts.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The template sets `language: en` directly, which imposes a specific language by default. Because there is no accompanying note that this is optional, user-selectable, or justified by a region-specific purpose, it creates a natural-language policy concern under the language/locale rule.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The template hard-codes `language: zh`, which imposes a specific language/locale choice in the skill definition. The policy allows locale constraints only when they are optional, user-selected, or clearly justified as region-specific; no such opt-in or justification appears here.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The template sets `language: vi` as a fixed default, which is a natural-language locale constraint. Because the file does not offer an explicit user choice or explain that the locale is optional or region-specific, it can violate the policy against forcing a specific language without opt-in.

External Transmission

Medium
Category
Data Exfiltration
Content
mode: agent_context
# IMPORTANT: use a trusted HTTPS OpenAI-compatible endpoint.
# For safety, the runner blocks localhost/raw IP and non-HTTPS URLs by default.
# Example: https://api.openai.com/v1  (or your own trusted gateway)
base_url: https://api.openai.com/v1
auth_env: BENCHMARK_API_KEY
context_profile:
Confidence
50% 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
mode: agent_context
# IMPORTANT: use a trusted HTTPS OpenAI-compatible endpoint.
# For safety, the runner blocks localhost/raw IP and non-HTTPS URLs by default.
# Example: https://api.openai.com/v1  (or your own trusted gateway)
base_url: https://api.openai.com/v1
auth_env: BENCHMARK_API_KEY
context_profile:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The manifest sets `language: vi`, which imposes a fixed language/locale preference in the skill configuration. Under the policy, forcing a specific language without user opt-in or a clearly documented region-specific justification is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The titles and prompts are written entirely in Chinese, indicating a language-specific skill behavior, but the manifest does not document user opt-in for Chinese output or explain a justified locale restriction. This can violate language/locale policy when a skill forces a specific language without offering choice or documenting the constraint.

External Transmission

Medium
Category
Data Exfiltration
Content
name: vietnam-market-5q
version: v1
base_url: https://api.example.com/v1
auth_env: BENCHMARK_API_KEY
models:
  - Qwen3.5-35B
Confidence
50% 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
name: vietnam-market-5q
version: v1
base_url: https://api.example.com/v1
auth_env: BENCHMARK_API_KEY
models:
  - Qwen3.5-35B
Confidence
50% 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
name: vietnam-market-5q
version: v1
base_url: https://api.example.com/v1
auth_env: BENCHMARK_API_KEY
models:
  - Qwen3.5-35B
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The titles and prompts are entirely written in Vietnamese and implicitly require Vietnamese-language interaction, but the file provides no user choice, opt-in, or justification for a locale-specific restriction. This is a natural-language policy concern because the skill appears to enforce a specific language across its user-facing content.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- PDF
- both

Do not auto-deploy to Vercel without asking first at the delivery step.

---
Confidence
75% 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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- PDF
- both

Do not auto-deploy to Vercel without asking first at the delivery step.

---
Confidence
75% 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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- PDF
- both

Do not auto-deploy to Vercel without asking first at the delivery step.

---
Confidence
85% 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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- PDF
- both

Do not auto-deploy to Vercel without asking first at the delivery step.

---
Confidence
85% 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.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This Python file contains multiple user-facing natural-language strings for summaries and recommendations that are written only in Vietnamese. The policy allows locale constraints only when the skill offers user choice or clearly documents a justified regional limitation, neither of which is present here.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script sends full user-supplied prompts to external model endpoints via HTTP requests, but this file provides no explicit user-facing consent, warning, or data-classification guard before transmission. In a benchmarking skill, prompts may contain sensitive business context, proprietary test suites, or personal data, so silent exfiltration to third-party providers is a meaningful privacy and compliance risk.

Static analysis

No suspicious patterns detected.