T09 · Insecure Skill Coding Practices
- Location
scripts/run.js:3- Finding
Reusable Skill Token Disclosed to Arbitrary Caller-Supplied Domains
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent as a Pearl payments client, but it gives other skills a broad way to send a reusable Pearl skill token to arbitrary HTTPS domains.
Review before installing. This skill stores Pearl tokens locally and lets Pearl-powered skills send a limited reusable token to third-party provider servers. Only use it with Pearl skills and providers you trust, set strict Pearl spending limits, monitor approvals and transactions, and protect ~/.pearl/config.json as a credential file.
scripts/run.js:3Reusable Skill Token Disclosed to Arbitrary Caller-Supplied Domains
scripts/io.js:7Existing Credential and State Files May Retain Insecure Permissions
The description frames the skill as setup, balance, and transaction support, but the documented behavior also includes acting as a generic paid-skill runner that sends a bearer skill token to developer-provided remote URLs and persists pending charge state. That mismatch can mislead users or higher-level policy systems into granting trust to a much more capable component, increasing the chance of unintended token disclosure, external data transfer, or unreviewed paid execution.
Referenced artifact was not completely inspected
ctions, and setup requests go to **https://pearlcash.ai** (the Pearl API). The `run.js` module sends requests to skill-developer-provided URLs, attaching a limi
Referenced artifact was not completely inspected
ctions, and setup requests go to **https://pearlcash.ai** (the Pearl API). The `run.js` module sends requests to skill-developer-provided URLs, attaching a limi
Referenced artifact was not completely inspected
ctions, and setup requests go to **https://pearlcash.ai** (the Pearl API). The `run.js` module sends requests to skill-developer-provided URLs, attaching a limi
Referenced artifact was not completely inspected
ctions, and setup requests go to **https://pearlcash.ai** (the Pearl API). The `run.js` module sends requests to skill-developer-provided URLs, attaching a limi
Referenced artifact was not completely inspected
ctions, and setup requests go to **https://pearlcash.ai** (the Pearl API). The `run.js` module sends requests to skill-developer-provided URLs, attaching a limi
Referenced artifact was not completely inspected
| `scripts/transactions.js` | Lists recent charges (read-only). Uses the read-only Pearl API token. |
Referenced artifact was not completely inspected
| `scripts/transactions.js` | Lists recent charges (read-only). Uses the read-only Pearl API token. |
Referenced artifact was not completely inspected
| `scripts/setup.js` | One-time login flow — creates a session, saves credentials to `~/.pearl/config.json`. |
On approval, the script writes read_token and skill_token to ~/.pearl/config.json without an explicit warning that long-lived authentication credentials are being stored locally. If that file is readable by other local users, included in backups, or exfiltrated by malware, an attacker could reuse the tokens to access the user's Pearl-linked resources or paid-skill functions.
The skill advertises network-capable behavior, including contacting Pearl and third-party skill-provider endpoints, but does not declare tool scope such as permissions or allowed-tools. This weakens policy enforcement and user visibility, making it easier for an agent to perform network actions that are broader than the manifest suggests.
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.
node {baseDir}/scripts/balance.js
Do NOT create `~/.pearl/config.json` manually. The file is generated by this setup flow and contains server-issued tokens that cannot be fabricated.
## Usage
This code writes configuration and pending-state files and deletes pending files using synchronous filesystem calls, but it provides no confirmation prompt, logging, comments, or docstrings disclosing those actions. For a code-file audit under this rule, local file modification and deletion are safety-relevant operations that should have some visible warning unless clearly disclosed elsewhere.
The script sends host-identifying metadata (hostname and platform/architecture) to a remote Pearl service during setup without clearly informing the operator before transmission. While this may be intended for device labeling or session management, it leaks local environment details that can aid fingerprinting, correlation across sessions, or disclosure of internal naming conventions if hostnames contain sensitive information.