Back to skill

Security audit

Expanso sentiment-score

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but its server mode listens on all network interfaces without authentication and can spend the operator's OpenAI quota.

Install only if you are comfortable sending analyzed text to OpenAI or another configured backend. Do not run the MCP/server pipeline on a reachable network without adding authentication, ingress restrictions, request limits, and OpenAI budget controls; prefer local-only binding for personal use.

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

Warning
Location
pipeline-mcp.yaml:5
Finding

Unauthenticated Public Endpoint Can Consume Operator OpenAI Quota

Content
View full analysis

Vulnerability Details

File Location: pipeline-mcp.yaml, lines 5–12 and 25–27
Vulnerability Type: Unauthenticated externally bound service
Risk Level: Medium

Vulnerable Code

yaml
http:
  enabled: true
  address: "0.0.0.0:${PORT:-8080}"

input:
  http_server:
    path: /score
    allowed_verbs: [POST]
    timeout: 60s

Every accepted request invokes the configured remote model:

yaml
- openai_chat_completion:
    api_key: "${OPENAI_API_KEY}"
    model: gpt-4o-mini

Technical Analysis

The HTTP service binds to 0.0.0.0, making it reachable through every available network interface unless an external firewall prevents access. The /score endpoint has no configured authentication or authorization. The configuration also shows no application-level rate limit or request-size limit.

Each request reaching this endpoint causes a remote OpenAI operation authenticated with the operator-provided OPENAI_API_KEY. Consequently, an untrusted network client can cause chargeable API activity using the operator's account. The 60-second timeout limits individual request duration but does not prevent repeated or concurrent requests.

Attack Path

  1. The operator starts pipeline-mcp.yaml on a system whose configured port is reachable by an attacker.
  2. The service listens on all interfaces, using port 8080 by default.
  3. The attacker repeatedly sends unauthenticated POST requests containing arbitrary text to /score.
  4. Each accepted request reaches openai_chat_completion.
  5. The pipeline authenticates upstream requests with the operator's OPENAI_API_KEY.
  6. Repeated or concurrent requests consume OpenAI quota, incur costs, and consume local and upstream service capacity.

Impact Assessment

A remote unauthenticated attacker can submit arbitrary sentiment-analysis input and consume resources associated with the service and the operator's OpenAI account. The likely impact includes unexpected API charges, quota exhaustion, ...[truncated 407 chars]

Remediation
View remediation

Remediation Suggestions

  1. Bind the service to loopback by default, such as 127.0.0.1:${PORT:-8080}, unless external access is explicitly required.
  2. Require strong authentication for /score, using an API token, authenticated reverse proxy, or equivalent mechanism.
  3. Enforce authorization so each caller can use only its assigned service scope and quota.
  4. Add per-client and global rate limits, concurrency limits, and bounded request quotas.
  5. Configure a strict request-body size limit and validate that the submitted text is a bounded string before invoking OpenAI.
  6. Deploy the endpoint behind a TLS-enabled reverse proxy and restrict ingress with firewall rules or private-network controls.
  7. Configure OpenAI account budget alerts and spending limits, and use a dedicated API key with the minimum necessary project scope.
  8. Add monitoring and alerting for anomalous request rates, repeated failures, unusual token consumption, and unexpected spending.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The pipeline forwards raw stdin content directly to an external OpenAI API, which can expose sensitive user-provided data to a third-party service without any disclosure, consent, or filtering indicated in this file. In CLI usage, operators may paste secrets, personal data, or proprietary text, making unintended data exfiltration plausible.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This pipeline exposes an HTTP endpoint that accepts arbitrary user text and forwards it directly to the OpenAI API. Even though this is the intended function of a sentiment-scoring service, the file contains no disclosure, consent, minimization, or policy controls around transmitting potentially sensitive user content to a third-party processor, creating a real privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This is a manifest file, so vague-trigger review applies. The file defines the skill name and type but provides no activation description, trigger phrases, scope limits, or exclusion conditions, making it unclear when the skill is intended to activate versus not activate.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.