Back to skill

Security audit

API Cost Compare

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a simple API price-comparison CLI, but its install path is an unpinned GitHub install and its description advertises commands and tracking features the package does not implement.

Review before installing. Prefer a pinned commit or trusted package release instead of the documented unpinned Git install, and do not expect the advertised spending tracker or `api-cost track/report` commands to work unless the publisher updates the package.

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

T08 · Insecure Dependencies

Warning
Location
pyproject.toml:1
Finding

Mutable Remote Installation and Unbounded Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:23-26, README.md:10-14, README_EN.md:10-14, and pyproject.toml:1-3, 30-33
Vulnerability Type: Supply-chain exposure through a mutable Git installation source and unbounded dependency versions
Risk Level: Medium

Vulnerable Code

SKILL.md:23-26:

bash
## Quick Start

```bash
pip install git+https://github.com/minirr890112-byte/api-cost-compare.git

README.md:10-14:

bash
## Quick Install

```bash
pip install git+https://github.com/minirr890112-byte/api-cost-compare.git

README_EN.md:10-14:

bash
## Quick Install

```bash
pip install git+https://github.com/minirr890112-byte/api-cost-compare.git

pyproject.toml:1-3:

toml
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"

pyproject.toml:30-33:

toml
dependencies = [
    "click>=8.0",
    "rich>=13.0",
]

Technical Analysis

The documented installation command retrieves the project directly from a mutable Git repository reference without selecting a reviewed commit or immutable release tag. The effective package contents can therefore change after the skill has been audited. During installation, pip invokes the configured Python build backend, so a future malicious repository revision could execute attacker-controlled build or package code.

The build and runtime dependencies are also specified only with lower bounds. Consequently, future versions of setuptools, wheel, click, or rich can be selected automatically without prior review or integrity verification. This does not prove that any current dependency is malicious, but it weakens reproducibility and exposes installations to a compromised or unexpectedly incompatible future release.

This finding concerns installation-time supply-chain integrity. The audited application code itself does not retrieve or execute ...[truncated 1338 chars]

Remediation
View remediation

Remediation Suggestions

  1. Publish reviewed, immutable releases to a trusted package registry and document installation using an exact version, for example:

    bash
    pip install api-cost-compare==1.2.0
    
  2. If Git installation remains necessary, pin the command to a reviewed full commit hash rather than the repository's default branch:

    bash
    pip install "git+https://github.com/minirr890112-byte/api-cost-compare.git@FULL_COMMIT_SHA"
    
  3. Generate a lock file or constraints file containing exact transitive dependency versions and cryptographic hashes. Use hash-enforced installation where practical:

    bash
    pip install --require-hashes -r requirements.lock
    
  4. Apply reviewed upper bounds or compatible-release constraints to build and runtime dependencies. Update them through a controlled dependency-review process rather than accepting every future release automatically.

  5. Pin build requirements as well as runtime requirements because build backends execute during installation.

  6. Protect release infrastructure with multi-factor authentication, protected tags, signed commits or tags, and automated dependency and artifact scanning.

  7. Build distributions in an isolated CI environment, publish checksums or signed provenance, and instruct users to verify release artifacts before installation.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
87% confidence
Finding

The README recommends pip install git+https://github.com/..., which installs code directly from a mutable remote repository rather than from a pinned, reviewed release artifact. This creates a supply-chain risk: if the repository, owner account, or referenced branch is compromised, users may execute attacker-controlled code during installation.

Content

Scanner excerpt · README.md (reported line 15)May include surrounding context.

��

Python License

api-cost-compare 是一个轻量级的 CLI 工具,帮助你快速对比 Anthropic、OpenAI、DeepSeek、Google、OpenRouter、Mistral 等主流 LLM 提供商的 API 定价,做出更明智的模型选择。


快速安装

bash
pip install git+https://github.com/minirr890112-byte/api-cost-compare.git

或者从源码安装:

bash
git clone https://github.com/minirr890112-byte/api-cost-compare.git
cd api-cost-compare
pip install -e .

使用方法

安装后,使用 api-cost-compare 命令:

bash
api-cost-compare --help

列出所有模型

bash
api-cost-compare list

输出示例:

text
┌────────────────────────────────────┬──────────────┬───────────�

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
89% confidence
Finding

The README instructs users to install directly from a GitHub repository via pip install git+https://..., which executes setup/build code from a remote source outside the stronger review and immutability expectations of a pinned package release. In an agent-skill ecosystem, encouraging remote bootstrap installation increases supply-chain risk because a compromised repository, force-pushed tag/branch, or malicious dependency update could lead to arbitrary code execution on the installer’s system.

Content

Scanner excerpt · README_EN.md (reported line 15)May include surrounding context.

I pricing across providers

Python License

api-cost-compare is a lightweight CLI tool that helps you quickly compare API pricing across major LLM providers including Anthropic, OpenAI, DeepSeek, Google, OpenRouter, and Mistral.


Quick Install

bash
pip install git+https://github.com/minirr890112-byte/api-cost-compare.git

Or install from source:

bash
git clone https://github.com/minirr890112-byte/api-cost-compare.git
cd api-cost-compare
pip install -e .

Usage

After installation, use the api-cost-compare command:

bash
api-cost-compare --help

List All Models

bash
api-cost-compare list

Compare Two Models

bash
api-cost-compare compare "GPT-4o" "deepseek-chat"

Recommend Best Model

bash
# Chat recommendations
api-cost-compare recommend --task chat

# Coding with $50 budget
api-cost-

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · README.md (reported line 99)May include surrounding context.

Estimate API Cost

bash
api-cost-compare estimate --model "GPT-4o" --input 1000 --output 500
api-cost-compare estimate --model "deepseek-chat" --input 5000 --output 2000

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · README_EN.md (reported line 62)May include surrounding context.

Estimate API Cost

bash
api-cost-compare estimate --model "GPT-4o" --input 1000 --output 500
api-cost-compare estimate --model "deepseek-chat" --input 5000 --output 2000

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · README.md (reported line 100)May include surrounding context.

bash
api-cost-compare estimate --model "GPT-4o" --input 1000 --output 500
api-cost-compare estimate --model "deepseek-chat" --input 5000 --output 2000

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · README_EN.md (reported line 63)May include surrounding context.

bash
api-cost-compare estimate --model "GPT-4o" --input 1000 --output 500
api-cost-compare estimate --model "deepseek-chat" --input 5000 --output 2000

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The code substantially matches the pricing-comparison and cost-estimation aspects of the description: it lists models, compares prices, recommends models by task and budget, and estimates API call costs. However, there are material gaps versus the declared description. First, 'track your API spending' is not implemented in this chunk; there is no persistence, logging, usage ingestion, or ongoing spend tracking—only one-off estimation. Second, the declared use cases include 'writing', but the recommend command only supports chat, coding, and reasoning. Third, the exact marketed scope of 18 models from 6 providers is not established by this code chunk alone. Overall, the primary purpose is close, but the description overstates capabilities, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The code substantially aligns with the pricing-comparison part of the description: it stores provider/model pricing, computes token-based costs, sorts models by cheapest cost for a given task type, and can estimate costs for a specified model. However, there are material mismatches. The declared description says 18 models from 6 providers, but the code includes only about 14 models while still covering 6 providers. It also advertises 'writing' as a supported use case, but the implemented task filtering only supports chat, coding, and reasoning. Most importantly, it claims to 'track your API spending,' yet there is no persistence, usage logging, aggregation, or spending-tracking functionality—only one-off cost estimation. Therefore the description overstates the implemented behavior.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
93% confidence
Finding

The skill instructs users to install and execute code directly from a remote Git repository using pip install git+https://..., which bypasses stronger trust controls such as pinned package versions, hashes, or vetted package registry releases. If the repository is changed, compromised, or replaced, users may unknowingly run attacker-controlled installation code with the privileges of their environment.

Content

Scanner excerpt · SKILL.md (reported line 24)May include surrounding context.

e shifts monthly. You're probably overpaying by 90%+ because you picked the default model. $4,000/year wasted on API costs you didn't need to spend.

The solution: One command compares 18 models across 6 providers for your specific scenario (coding, chat, writing, reasoning). Realistic token estimates per scenario. Spending tracker to know exactly what you're burning.

Quick Start

bash
pip install git+https://github.com/minirr890112-byte/api-cost-compare.git

api-cost list              # All 18 models with pricing
api-cost recommend coding  # Cheapest for your use case
api-cost compare 0 1 chat  # Head-to-head comparison
api-cost track 3.50 openai gpt-4o  # Log spending
api-cost report            # Spending summary

Real Output

text
$ api-cost recommend coding

⭐ #1   Mistral Mistral Small 3        $1.65/month
⭐ #2   DeepSeek DeepSeek V4 Flash     $1.89/month
⭐ #3   OpenAI GPT-4o-mini             $2.92/month

💸 Choosing #1 over Claude Opus 4.7 saves $335.85/m

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly says the tool has a Chinese interface and defaults to Chinese output. Per the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code defines the command descriptions, docstrings, and user-facing output in Chinese only, starting from the module docstring and continuing throughout the CLI. That creates a language policy concern because users are not offered any locale choice or opt-in before the tool communicates exclusively in a single language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README explicitly says the tool has a "Chinese-first interface" and that the default output is in Chinese. This is a natural-language locale policy concern because it imposes a language default without mentioning user opt-in, configurability, or a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring is written entirely in Chinese and serves as the visible skill description, which can imply a fixed language choice without user opt-in. The policy requires flagging language or locale constraints when the skill does not offer a language choice or clearly justify the constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file uses Chinese-only natural-language documentation in the module docstring and function/class docstrings without indicating that the skill is intended specifically for Chinese-speaking users. Under the policy rule, forcing a specific language without user opt-in or a documented regional justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: setuptools has 10 known advisory(ies) (CVE-2013-1633 (Setuptools vulnerable to Man-in-the-middle attacks); CVE-2025-47273 (setuptools has a path traversal vulnerability in PackageIndex.download that lead); CVE-2024-6345 (setuptools vulnerable to Command Injection via package URL) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: wheel has 4 known advisory(ies) (CVE-2026-24049 (Wheel Affected by Arbitrary File Permission Modification via Path Traversal in w); CVE-2022-40898 (pypa/wheel vulnerable to Regular Expression denial of service (ReDoS)); CVE-2022-40898 (An issue discovered in Python Packaging Authority (PyPA) Wheel 0.37.1 and earlie) +1 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This manifest contains natural-language user-facing metadata that appears to force a specific language for the skill description. Under the policy, language or locale constraints should either be optional for users or clearly justified as region-specific; neither is indicated here.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: click has 1 known advisory(ies) (CVE-2026-7246 (Pallets Click, versions 8.3.2 and below, contain a command injection vulnerabili)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.