Back to skill

Security audit

claude-usage-cli

Security checks for vulnerabilities and agentic risk

Overview

This skill has a legitimate usage-reporting purpose, but it should be reviewed because it installs an unpinned deprecated third-party CLI that handles an Admin API key.

Before installing, prefer the maintained replacement named by the skill or verify and pin a specific trusted version of the package. Do not enter an Anthropic Admin API key unless you trust the installed CLI code and are comfortable granting it read-only access to organization usage and cost reports.

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
SKILL.md:4
Finding

Unpinned Third-Party Package and Repository Code Execution

Content
View full analysis
Remediation
View remediation
``` 2. Record and verify the expected package integrity digest before installation. Publish the verified package version and checksum in the Skill documentation. 3. For source installation, pin a full reviewed commit hash: ```bash git clone https://github.com/cyberash-dev/claude-usage-cli.git cd claude-usage-cli git checkout --detach ``` 4. Include and enforce a lockfile for reproducible transitive dependency resolution. Prefer `npm ci` over an unconstrained `npm install`. 5. Review npm lifecycle scripts and dependencies before installation. Use `--ignore-scripts` when lifecycle scripts are unnecessary, and run any required build step separately only after inspection. 6. Avoid global installation where possible. Install into an isolated, least-privileged environment and invoke the pinned executable through an explicit path. 7. Vendor the reviewed implementation into the audited artifact, or provide signed release artifacts with provenance attestations so the installed code can be tied to the reviewed source. 8. Update the Skill's deprecated installation metadata so automated installers do not continue installing an unmaintained and unpinned package. Prefer the actively maintained replacement only after applying the same version-pinning and integrity-verification controls. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

claude-usage config show

text

Remove key from Keychain:
```bash
claude-usage config remove-key

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 · SKILL.md (reported line 64)May include surrounding context.

md
claude-usage usage                                    # Last 7 days, daily, grouped by model
claude-usage usage --period 30d                       # Last 30 days
claude-usage usage --from 2026-01-01 --to 2026-01-31 # Custom date range
claude-usage usage --model claude-sonnet-4            # Filter by model
claude-usage usage --api-keys apikey_01Rj,apikey_02Xz # Filter by API key IDs
claude-usage usage --group-by model,api_key_id        # Group by multiple dimensions
claude-usage usage --bucket 1h                        # Hourly granularity (1d, 1h, 1m)

Static analysis

No suspicious patterns detected.