Bailian Usage Proxy

WarnAudited by ClawScan on May 10, 2026.

Overview

The skill matches its stated proxy/usage-tracking purpose, but its admin API can create and expose access keys without authentication, which could let anyone who reaches the service use the shared Bailian account.

Install only if you are prepared to operate it like a real internal service: add authentication to every admin endpoint before exposing it, bind admin access to a private network, set strong database and application secrets, protect the Bailian master API key, and prefer pinned dependency installation.

Findings (6)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

Anyone who can reach the service could call administrative endpoints, create accounts, view usage data, and enable further use of the proxy.

Why it was flagged

These management routes create users, list users, and return usage reports, but their signatures do not include verify_api_key or another administrator authorization dependency.

Skill content
@app.post("/admin/users", response_model=UserResponse)
async def create_user(user_create: UserCreate): ...
@app.get("/admin/users", response_model=List[UserResponse])
async def list_users(department: Optional[str] = None): ...
@app.get("/admin/usage/report")
async def get_usage_report(
Recommendation

Require strong admin authentication and authorization for all /admin routes, separate the admin interface from the public proxy, and expose it only on a trusted network or behind an authenticated reverse proxy.

What this means

An unauthorized person could generate their own proxy key and spend the organization’s shared Bailian quota or costs.

Why it was flagged

The unauthenticated admin endpoint mints and returns a usable internal API key, which grants access to the shared Bailian-backed proxy.

Skill content
@app.post("/admin/users", response_model=UserResponse)
async def create_user(user_create: UserCreate):
    api_key = f"bl-{uuid.uuid4().hex}"
    ...
    await db.create_user(user)
    return user
Recommendation

Gate key creation behind administrator login, restrict maximum limits, audit key issuance, support revocation, and avoid returning full keys except at creation time.

What this means

If deployed with these defaults, attackers on the reachable network could attempt to access or modify stored users, internal API keys, and usage records.

Why it was flagged

The optional MySQL profile exposes a database port and provides predictable fallback passwords if the operator does not override them.

Skill content
MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-rootpassword}
MYSQL_PASSWORD=${MYSQL_PASSWORD:-bailianpassword}
ports:
  - "3306:3306"
Recommendation

Remove default database passwords, require explicit secrets, avoid publishing MySQL publicly, and store secrets outside the compose file.

What this means

Future dependency changes or package compromise could affect the running proxy.

Why it was flagged

The one-click setup installs packages from PyPI without version pins or hashes, even though a pinned requirements.txt is present.

Skill content
pip install -q fastapi uvicorn httpx sqlalchemy aiosqlite pydantic python-dotenv jinja2 python-multipart
Recommendation

Install from a pinned lockfile or requirements.txt with reviewed versions, preferably in an isolated virtual environment.

What this means

Prompts and request data sent through the proxy leave the local service and are processed by Alibaba Bailian under the shared account.

Why it was flagged

The proxy forwards full client request bodies to the Bailian provider using the shared master API key; this is disclosed and central to the skill’s purpose.

Skill content
self.client = httpx.AsyncClient(
    base_url=self.settings.bailian_base_url,
    headers={"Authorization": f"Bearer {self.settings.bailian_api_key}"},
    timeout=60.0
)
...
response = await self.client.post("/chat/completions", json=request_data)
Recommendation

Document this data flow clearly, use the provider only for approved data, and protect the master API key and proxy logs.

What this means

The proxy may continue accepting requests after the terminal is closed, increasing the impact of any exposed admin or API endpoint.

Why it was flagged

The skill includes a user-directed daemon mode that keeps the proxy running in the background until stopped.

Skill content
nohup python3 -m app.main >> "$LOG_FILE" 2>&1 &
PID=$!
echo $PID > "$PID_FILE"
Recommendation

Run the daemon only intentionally, monitor the PID/log files, restrict network access, and stop it when no longer needed.