Back to skill

Security audit

PocketLens

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its expense-tracking purpose, but it needs review because it handles sensitive financial data with a write-capable API key and has unsafe command and endpoint handling.

Review before installing. Use a write-only key rather than full access, avoid setting a custom API URL unless you fully trust that server, redact unnecessary card or statement details before upload, and confirm transactions before allowing the skill to record them.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/pocket-lens.mjs:21
Finding

Arbitrary API Endpoint Can Receive Bearer Credentials and Financial Data

Content
View full analysis
`. ``` ### Technical Analysis `POCKET_LENS_API_URL` is trusted without validating its scheme, hostname, port, path, or ownership. The script subsequently attaches the PocketLens bearer credential to every request made through this endpoint. When creating a transaction, the request body can contain sensitive personal financial information, including merchant names, transaction amounts, timestamps, card issuer names, categories, and descriptions. Read operations can also expose account identity, spending summaries, category information, and card billing details. Although network transmission to the default PocketLens service is necessary for the declared functionality, allowing an arbitrary endpoint to receive the production bearer credential and financial records is not necessary for normal operation and exc ...[truncated 1624 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:42
Finding

Shell Command Injection Through Untrusted Transaction JSON

Content
View full analysis
' ``` Where `` is a JSON object with the transaction fields. For multiple transactions, wrap them in a `transactions` array: ```bash node pocket-lens.mjs create-transaction '{"transactions": [{"merchant": "스타벅스", "amount": 5500, "date": "2025-12-05T14:30:00+09:00", "cardName": "신한카드", "categoryHint": "카페"}]}' ``` ``` The receiving command in ...[truncated 2662 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
1. Log in to [PocketLens](https://pocketlens.app).
2. Go to **Settings > API Keys**.
3. Click **Create New Key**.
4. Set the permission to **write** (or **full**).
5. Copy the generated key (starts with `pk_`).

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README encourages users to upload receipts and card-statement screenshots and states these will be analyzed by AI and recorded to PocketLens, but it does not clearly warn that sensitive financial data in those images may be transmitted to external services and stored automatically. This can lead to uninformed consent, accidental disclosure of card or transaction data, and privacy/compliance issues when users share highly sensitive financial documents.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes external code paths and uses sensitive environment credentials plus network access, but it does not declare an explicit tool scope such as allowed tools or permissions. That creates an authorization gap where the runtime may permit broader execution than users or reviewers expect, increasing the chance of unintended command execution or data egress involving financial data and API keys.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to process receipts, card statements, and payment screenshots and send extracted transaction data to an external service, but it does not require an explicit user-facing warning or consent step before that transfer. Because the data includes highly sensitive financial information, users may unknowingly disclose card billing details, merchants, spending patterns, and other personal data to a third party.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/pocket-lens.mjs:20