T09 · Insecure Skill Coding Practices
- Location
src/utils/api-client.js:68- Finding
Direct-IP Mode Disables TLS Certificate Verification
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent DefiLlama data-query CLI, but users should be aware of insecure optional network configuration and CSV/terminal output hardening gaps.
Install only if you are comfortable with an npm-based CLI that contacts DefiLlama public APIs. Avoid enabling any direct-IP HTTPS configuration, treat CSV exports as untrusted before opening them in spreadsheets, and prefer a lockfile or reviewed pinned dependencies for production use.
src/utils/api-client.js:68Direct-IP Mode Disables TLS Certificate Verification
src/utils/formatter.js:96API-Controlled Terminal Escape Sequences Are Printed Without Sanitization
src/utils/formatter.js:127CSV Export Does Not Neutralize Spreadsheet Formulas
The documented behavior materially mismatches the detected capabilities and claimed features: the skill appears to access additional data classes not disclosed, while some advertised features are not actually implemented. This is dangerous because reviewers and users may make trust decisions based on inaccurate documentation, allowing unexpected network access or hidden functionality to pass under a benign description.
The code silently disables HTTPS certificate verification for IP-direct requests without any warning, confirmation, or guardrail. This makes insecure transport easy to enable accidentally and exposes API responses to tampering or interception, which is especially risky in a data aggregation component that may feed trading, monitoring, or reporting workflows.
The skill declares installation and runtime behavior that require network access and potentially environment interaction, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens sandboxing and reviewability because consumers cannot tell from the manifest what capabilities the skill expects, increasing the chance of overbroad execution in hosts that rely on metadata for policy enforcement.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| Endpoint | Description |
|----------|-------------|
| `https://api.llama.fi/tvl` | Total DeFi TVL |
| `https://api.llama.fi/protocols` | All protocols |
| `https://api.llama.fi/protocol/{name}` | Protocol details |
| `https://api.llama.fi/chains` | All chains |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| Endpoint | Description |
|----------|-------------|
| `https://api.llama.fi/tvl` | Total DeFi TVL |
| `https://api.llama.fi/protocols` | All protocols |
| `https://api.llama.fi/protocol/{name}` | Protocol details |
| `https://api.llama.fi/chains` | All chains |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| Endpoint | Description |
|----------|-------------|
| `https://api.llama.fi/tvl` | Total DeFi TVL |
| `https://api.llama.fi/protocols` | All protocols |
| `https://api.llama.fi/protocol/{name}` | Protocol details |
| `https://api.llama.fi/chains` | All chains |
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| Endpoint | Description |
|----------|-------------|
| `https://api.llama.fi/tvl` | Total DeFi TVL |
| `https://api.llama.fi/protocols` | All protocols |
| `https://api.llama.fi/protocol/{name}` | Protocol details |
| `https://api.llama.fi/chains` | All chains |
In IP-direct mode, the client creates an HTTPS agent with rejectUnauthorized set to false, which disables TLS certificate validation and allows man-in-the-middle interception or spoofed upstream responses. For a DeFi data aggregation skill, upstream integrity matters because manipulated protocol, TVL, or yield data could mislead downstream decisions, and direct-IP access is not justified enough to offset this risk.
The dependency uses a caret range instead of an exact version, which makes builds non-reproducible and can silently pull in newly published releases. In a CLI/data-aggregator skill that depends on external packages, this increases supply-chain risk because a compromised or vulnerable upstream minor/patch release could be installed without review.
"author": "AntalphaAI",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",
"chalk": "^4.1.2",
"cli-table3": "^0.6.3",
"commander": "^11.1.0",
Axios has multiple known advisories, and because the manifest uses an unpinned range, it is impossible to verify from this file whether the installed version is affected. In a DeFi data aggregator that likely makes outbound HTTP requests, axios is a high-value dependency: unresolved SSRF, MITM, or prototype-pollution-related flaws could directly affect fetched data integrity and request handling.
The chalk dependency is specified with a caret range, allowing automatic adoption of later compatible releases. This is more concerning here because static analysis also notes a malicious-package advisory associated with chalk, so leaving the version unpinned materially increases exposure to supply-chain compromise.
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",
"chalk": "^4.1.2",
"cli-table3": "^0.6.3",
"commander": "^11.1.0",
"node-cache": "^5.1.2"
The manifest does not pin chalk, so it is not possible to determine whether installations resolve to a release impacted by the cited malicious-package advisory. Even though chalk is primarily cosmetic, a malicious dependency can execute during installation or runtime and compromise the host environment, making this a meaningful supply-chain concern.
Using a version range for cli-table3 permits non-deterministic dependency resolution across environments. While not an immediate exploit by itself, it increases the attack surface for supply-chain issues and makes it harder to verify exactly what code is being executed.
"dependencies": {
"axios": "^1.6.0",
"chalk": "^4.1.2",
"cli-table3": "^0.6.3",
"commander": "^11.1.0",
"node-cache": "^5.1.2"
},
The commander package is not pinned to an exact release, so future installs may resolve to different code than originally tested. For a CLI entrypoint package, argument-parsing libraries are security-relevant because compromise or regression there can affect all command execution paths.
"axios": "^1.6.0",
"chalk": "^4.1.2",
"cli-table3": "^0.6.3",
"commander": "^11.1.0",
"node-cache": "^5.1.2"
},
"engines": {
The node-cache dependency is declared with a caret range, allowing upstream patch/minor updates to be pulled automatically. This weakens build integrity and may introduce vulnerable or malicious code without any corresponding repository change.
"chalk": "^4.1.2",
"cli-table3": "^0.6.3",
"commander": "^11.1.0",
"node-cache": "^5.1.2"
},
"engines": {
"node": ">=16.0.0"
The manifest describes a DefiLlama data aggregator with output formatting, health monitoring, and security validation. In addition to those functions, the code loads local config files and later checks process.env.DEBUG to alter behavior, which are host-environment access capabilities not clearly justified by the stated purpose in this file.
This code performs network calls to third-party DefiLlama services, but there is no confirmation prompt, user-facing log, or warning in the file indicating that user-supplied query values may be sent externally. For a code file, outbound network transmission is a safety-relevant operation when it lacks any visible disclosure.
The getPoolYields method sends a request to a different third-party host, https://yields.llama.fi/pools, yet this file contains no user-facing warning or notice about the outbound call. This fits the missing-warning criterion for code files because network transmission occurs without visible disclosure.
The constructor exposes a rejectUnauthorized configuration, but the IP-direct HTTPS path ignores it and always sets rejectUnauthorized to false. This creates a security-control bypass and can mislead operators into believing certificate verification is enabled when it is not, increasing the likelihood of insecure deployment.