Back to skill

Security audit

Philidor — DeFi Vault Intelligence

Security checks for vulnerabilities and agentic risk

Overview

This skill is a read-only DeFi research integration whose external CLI/API use is coherent with its purpose, but users should understand that wallet analysis queries go to Philidor’s service and the CLI dependency is not pinned.

Install this only if you are comfortable trusting Philidor’s npm CLI and API. Avoid submitting wallet addresses you do not want associated with Philidor service queries, and treat vault recommendations as research support rather than financial advice.

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:18
Finding
Unpinned External CLI Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 18–22 **Vulnerability Type**: Unpinned third-party npm package installation **Risk Level**: Medium ### Vulnerable Code ```yaml { 'kind': 'node', 'package': '@philidorlabs/cli', 'bins': ['philidor'], 'label': 'Install Philidor CLI', }, ``` ### Technical Analysis The skill delegates its operational behavior to the external npm package `@philidorlabs/cli`, but does not pin the package to an exact version or provide an integrity hash or lockfile. The CLI implementation is not included in this project, so its installation-time and runtime behavior cannot be verified from the audited files. Consequently, installation may resolve to a future, mutable package release. If the package publisher account, npm distribution channel, or package itself is compromised, malicious code could be introduced after this skill has already been reviewed. Depending on the package configuration, such code could execute through npm lifecycle scripts during installation or when the `philidor` binary is invoked. This finding does not establish that the current package is malicious. It identifies an avoidable supply-chain trust boundary caused by installing unaudited, unpinned external code. ### Attack Path 1. An attacker compromises the npm publisher account or another component of the distribution process for `@philidorlabs/cli`. 2. The attacker publishes a malicious version under the legitimate package name. 3. A user or agent installs the skill's required CLI without an exact version constraint. 4. The package manager resolves the mutable package reference to the malicious release. 5. Malicious code executes through an installation lifecycle script or when the agent invokes the installed `philidor` binary. 6. The code runs with the privileges of the account performing the installation or invocation. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the local ...[truncated 459 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `@philidorlabs/cli` to a reviewed, exact version rather than resolving a mutable release. 2. Verify the package using a trusted integrity hash or package-manager lockfile. 3. Audit and retain the source corresponding to the pinned CLI release. 4. Disable npm lifecycle scripts during installation where operationally feasible, and explicitly review any required scripts before permitting them. 5. Install and run the CLI in a least-privilege sandbox with restricted filesystem access, environment exposure, and outbound network connectivity. 6. Use automated dependency monitoring and require review before updating the pinned version. 7. Consider vendoring the reviewed CLI implementation or distributing it through a controlled, signed artifact channel. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Confidence
91% confidence
Finding
The skill description uses very broad trigger language such as 'find safe DeFi vaults', 'compare yields', and 'analyze a wallet's DeFi positions' without clear boundaries on when the skill should be invoked. In an agent environment, this can cause over-selection of the skill for generic finance or wallet-related requests, leading to unnecessary external tool use and unintended disclosure of user financial context to the Philidor CLI/API.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly encourages running portfolio analysis on a wallet address but does not warn that the address and associated portfolio query will be sent to an external CLI/API. Wallet addresses are sensitive financial identifiers; transmitting them without clear notice or consent can expose a user's holdings, activity patterns, and cross-chain positions to third parties.

Whitespace Padding

Medium
Category
Prompt Injection
Content
Every vault receives a composite risk score from 0 to 10, grouped into three tiers:

| Tier        | Score Range | Meaning                                                                                        |
| ----------- | ----------- | ---------------------------------------------------------------------------------------------- |
| **Prime**   | 8.0 - 10.0  | Institutional-grade. Battle-tested protocols, blue-chip assets, strong governance controls.    |
| **Core**    | 5.0 - 7.9   | Solid fundamentals with some trade-offs in asset quality, audit coverage, or decentralisation. |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## Error Handling

| Error                   | Cause                                     | Fix                                                                                                                      |
| ----------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `Connection refused`    | API server unreachable                    | Check network connectivity. Verify `--api-url` if using a custom endpoint. The default is `https://api.philidor.io`.     |
| `404 Not Found`         | Invalid vault ID, protocol ID, or address | Verify the vault ID exists with `philidor vaults`. Check that the network slug is correct (e.g., `ethereum`, not `eth`). |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## Resources

- **Website**: [https://philidor.io](https://philidor.io)
- **API Documentation**: [https://api.philidor.io/v1/docs](https://api.philidor.io/v1/docs)
- **Risk Methodology**: `philidor risk explain` or [https://philidor.io/risk](https://philidor.io/risk)
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.