Back to skill

Security audit

Smart Model Routing for Z.AI

Security checks for vulnerabilities and agentic risk

Overview

This is a cost-saving model-routing guide with no executable code; the main caveat is that some routing rules are subjective.

Before installing, confirm that cost-saving routing is what you want. For sensitive, safety-critical, security, legal, financial, or production-impacting work, configure a stricter default to Standard or Plus/32B rather than relying on the cheapest tier.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Confidence
89% confidence
Finding
The Flash and Standard categories overlap for common requests like simple file operations, factual Q&A, summarization, and general conversation, while many real user prompts are underspecified at first turn. That ambiguity can lead to misrouting toward the cheapest model before the task's real complexity is known, producing low-quality or unsafe handling of requests that need better reasoning.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The routing rule uses subjective thresholds like '>30 seconds of focused thinking' and terms such as 'architecture' or 'deep reasoning' without precise operational criteria. This can cause inconsistent downgrading of tasks that actually require stronger reasoning, increasing the chance of incorrect outputs for sensitive work such as security reviews or production decisions.

Static analysis

No suspicious patterns detected.