Back to skill

Security audit

Felo LiveDoc

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Felo LiveDoc purpose, but it can delete or upload knowledge-base data and includes an undocumented API-base override that could send your API key and content to an unintended server.

Install only if you trust the publisher and are comfortable giving this skill Felo API authority to create, update, upload to, search, and delete LiveDocs. Before using it, ensure FELO_API_BASE is unset or points only to the legitimate Felo API, avoid uploading secrets or regulated data unless approved, and require explicit confirmation before any delete command.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_livedoc.mjs:215
Finding

Unvalidated API Base Override Can Exfiltrate Credentials and User Data

Content
View full analysis

Vulnerability Details

File Location: scripts/run_livedoc.mjs, lines 57–59, 74–77, 215, and 346–351
Vulnerability Type: Arbitrary API endpoint override and sensitive-data exfiltration
Risk Level: High

Vulnerable Code

js
async function apiRequest(method, apiPath, body, apiKey, apiBase, timeoutMs) {
  const url = `${apiBase}/v2${apiPath}`;
  const headers = { Accept: 'application/json', Authorization: `Bearer ${apiKey}` };
js
async function uploadFormData(apiPath, formData, apiKey, apiBase, timeoutMs) {
  const url = `${apiBase}/v2${apiPath}`;
  const res = await fetchWithRetry(
    url,
    { method: 'POST', headers: { Accept: 'application/json', Authorization: `Bearer ${apiKey}` }, body: formData },
    timeoutMs,
  );
js
const apiBase = (process.env.FELO_API_BASE?.trim() || DEFAULT_API_BASE).replace(/\/$/, '');
js
const fileBuffer = await fs.readFile(args.file);
const blob = new Blob([fileBuffer]);
const formData = new FormData();
formData.append('file', blob, path.basename(args.file));
const payload = await uploadFormData(`/livedocs/${shortId}/resources/${endpoint}`, formData, apiKey, apiBase, timeoutMs);

Technical Analysis

The script allows the FELO_API_BASE environment variable to replace the intended Felo API origin, https://openapi.felo.ai. The supplied value is used directly to construct request URLs without validating its URL scheme, hostname, port, or origin.

All API requests attach FELO_API_KEY as a bearer credential. Consequently, an arbitrary endpoint selected through FELO_API_BASE receives the API key. Depending on the invoked command, it may also receive LiveDoc metadata, text-document contents, retrieval queries, supplied URLs, or complete uploaded files.

The override is not documented in SKILL.md or README.md, and the implementation does not require explicit confirmation before transmitting sensitive information to a non-Felo origin. It also permits plaintext HTTP, which ca ...[truncated 1977 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the FELO_API_BASE override from production builds and always use:

    js
    const apiBase = 'https://openapi.felo.ai';
    
  2. If a development override is operationally necessary, parse and strictly validate it:

    js
    const candidate = new URL(
      process.env.FELO_API_BASE?.trim() || DEFAULT_API_BASE
    );
    
    if (candidate.protocol !== 'https:') {
      throw new Error('FELO_API_BASE must use HTTPS');
    }
    
    const allowedHosts = new Set(['openapi.felo.ai']);
    if (!allowedHosts.has(candidate.hostname)) {
      throw new Error('Untrusted FELO_API_BASE hostname');
    }
    
  3. Validate the complete origin, including protocol and port, rather than relying only on the hostname. Reject embedded credentials, unexpected ports, fragments, and non-root path prefixes.

  4. Never attach Authorization when the destination origin differs from the approved Felo API origin. Perform this check immediately before every network request, including retries and multipart uploads.

  5. If non-production endpoints must be supported, require an explicit command-line opt-in, document the behavior clearly, and require separate non-production credentials rather than reusing production API keys.

  6. Display the destination origin and require confirmation before sending file contents or document text to any explicitly approved non-production endpoint.

  7. Add automated tests confirming that HTTP URLs, lookalike domains, subdomains, altered ports, credential-bearing URLs, and unrelated origins are rejected.

  8. Rotate any API key that may already have been used while an untrusted FELO_API_BASE value was present.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The markdown states that the skill can 'delete knowledge bases (LiveDocs)' but does not include any warning about destructive or irreversible effects on user data. For markdown files, user-facing documentation should disclose behaviors that could affect data or system integrity.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the agent to execute a Node script that uses environment secrets and external network access, but it declares no tool scope or permission boundaries. In an agent environment, missing explicit allowed-tools/permissions increases the chance of unintended execution with broader capabilities than users expect, especially because the skill says to 'execute immediately' via Bash.

Content

No source excerpt is available for this finding.

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

md
Trigger this skill when users want to:

- **Create/manage knowledge bases:** Create, list, update, or delete LiveDocs
- **Add resources:** Upload documents, add URLs, or create text documents in a LiveDoc
- **Semantic retrieval:** Search across knowledge base resources using natural language queries
- **Resource management:** List, view, or delete resources within a LiveDoc

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation includes destructive delete commands for LiveDocs and resources without requiring a confirmation step or warning the user about irreversible data loss. In an agent workflow, this can lead to accidental deletion from natural-language requests or misinterpreted identifiers, causing loss of knowledge-base contents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill supports file uploads, URL ingestion, and semantic retrieval against an external Felo API but does not warn that document contents, URLs, and queries will be transmitted to a third-party service. This omission can cause users or downstream agents to send sensitive, proprietary, or regulated data without informed consent.

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/run_livedoc.mjs:207