Back to skill

Security audit

Ag Model Usage

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because its public description says it summarizes local CodexBar costs, but its code reads OpenClaw OAuth credentials and contacts a Google quota API.

Install only if you intentionally want a Google Antigravity quota checker that can read your OpenClaw auth profile and make authenticated Google API requests. Do not treat it as a local CodexBar cost-summary skill unless the metadata and code are rewritten to remove credential and network access.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/model_usage.py:17
Finding

Direct extraction and network use of a centrally stored OAuth access token exceeds the Skill's declared local usage scope

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This is a strong description-behavior mismatch: the metadata says the skill summarizes local CodexBar cost JSON, while the body describes harvesting OAuth tokens from auth-profiles.json and querying a Google API for live quota data. That mismatch can deceive users and reviewers into authorizing a skill that accesses credentials and external services under a benign pretext, creating a high risk of covert credential misuse or data exfiltration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill promises a narrow, local reporting feature but expands into remote API access using OAuth credentials, which is a materially different and far more sensitive capability. In the context of agent skills, this is especially dangerous because users may invoke it expecting harmless local summarization while it instead touches secrets and external services.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation internally contradicts itself: one part claims local CodexBar JSON processing, while another states the skill reads OAuth tokens and performs Google quota queries. Security-significant inconsistencies like this are dangerous because they obscure the real trust boundary and can cause users to expose credentials without understanding the actual operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill describes credential access and outbound network activity without clearly warning users, which undermines informed consent for sensitive operations. In this context, the omission is dangerous because the skill is framed as a local usage-summary helper, so users are less likely to expect secret handling or external transmission.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The referenced file is materially unrelated to the declared skill purpose of summarizing local CodexBar per-model usage. Instead, it documents Google Antigravity quota APIs, which creates a dangerous capability mismatch: an agent using this reference could be steered toward remote API interaction, OAuth token handling, and project discovery rather than local cost JSON analysis. In a security review, this kind of off-purpose documentation is high risk because it can enable data exfiltration, unauthorized API use, or prompt/instruction confusion under the guise of a benign local-reporting skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The implementation does not match the stated skill purpose. Instead of summarizing local CodexBar usage data, it reads local OpenClaw authentication material and calls a Google endpoint to fetch model quota information, indicating deceptive functionality and unauthorized access to unrelated credentials/services. In a local usage-summary skill, this mismatch is especially suspicious because the networked credential use is unnecessary for the advertised task.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code accesses credential-bearing auth profiles and uses the extracted bearer token in an authenticated external request, even though the skill is described as a local reporting utility. This creates unnecessary exposure of sensitive credentials and enables actions against external services under the user's identity without informed consent. The mismatch between stated purpose and behavior makes the risk materially worse.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises local CodexBar usage summarization but its documented behavior includes reading local authentication material and making outbound requests, yet it declares no explicit tool scope or permission boundaries. In an agent environment, undeclared file-read and network capabilities materially increase the risk of secret access and exfiltration because the operator is not clearly informed of what the skill can touch.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language instructions and usage examples are presented in Chinese, and there is no indication that users may choose another language. Under the policy, a skill should not impose a language or locale unless it offers opt-in choice or clearly documents a justified regional limitation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file includes example invocations, and one of them is a generic natural-language phrase without any product or tool qualifier. Because the phrase does not clearly limit itself to CodexBar or model-usage context, it could cause unintended activation when users ask about unrelated quotas.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Reading OAuth tokens and calling Google internal APIs is not justified by the stated purpose of summarizing local model-usage data, so the documented capability exceeds functional necessity. Unnecessary access to credentials is a classic overprivilege issue that increases the blast radius if the skill is misused, compromised, or invoked unexpectedly.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This documentation adds explicit remote access instructions, including OAuth bearer tokens, Google API scopes, and external endpoints, even though the skill is supposed to summarize local CodexBar usage data. That unjustified expansion of capability increases the chance that an agent will request sensitive tokens, make outbound calls, or access unrelated cloud resources, which is especially dangerous in a local-analysis skill where users would not expect networked behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script returns status, error, and report text entirely in Chinese, such as '未知', '错误', and 'AI 模型用量报告'. There is no natural-language indication that the locale is configurable or intentionally restricted to a Chinese-speaking context, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script reads a local authentication file, extracts access and project identifiers, and transmits them in an HTTP request without any in-file disclosure or user-facing notice. Even if the token is only placed in an Authorization header rather than the body, the skill silently uses sensitive local credentials for an unrelated remote call, which violates user expectations for a local summary tool.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

The code performs an external POST request using local bearer credentials. External transmission is not inherently unsafe, but in this context it is unjustified by the advertised local-only function and therefore increases the chance of silent data/credential misuse and unexpected remote side effects.

Content

Scanner excerpt · scripts/model_usage.py (reported line 45)May include surrounding context.

python
}
        payload = {"project": project_id}
        
        response = requests.post(url, headers=headers, json=payload, timeout=15)
        
        if response.status_code == 200:
            data = response.json()

Static analysis

No suspicious patterns detected.