Back to skill

Security audit

openapi-parser

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent OpenAPI-to-Drift test generator, but its remote reference fetching and broad activation need user review before use.

Install only if you intend to use it for OpenAPI-to-Drift test generation. Keep specs local when possible, do not let it fetch remote `$ref` URLs from untrusted specs without explicit review, and inspect generated Drift hooks before running them against production or privileged APIs.

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
references/schema-patterns.md:189
Finding

Unrestricted Remote OpenAPI Reference Retrieval

Content
View full analysis

Vulnerability Details

File Location: references/schema-patterns.md, lines 189–192
Vulnerability Type: Server-Side Request Forgery through unvalidated remote $ref retrieval
Risk Level: Medium

Vulnerable Code:

markdown
**External refs** (`$ref: './schemas/foo.yaml'` or `$ref: 'https://...'`):

- Local file refs: read the referenced file from the same directory
- Remote refs: fetch the URL if needed, or note it as an unresolvable external dependency

Technical Analysis

The skill instructs the agent to fetch URLs supplied through remote OpenAPI $ref values. These values can be controlled by the author of an OpenAPI document, but the instructions impose no restrictions on URL schemes, destination hosts, resolved IP addresses, redirects, response sizes, or timeouts.

Consequently, a crafted specification could direct an agent with network access to request loopback, private-network, link-local, cloud metadata, or other protected resources. Redirects and DNS rebinding could also bypass a superficial hostname check unless destinations are validated after every resolution and redirect.

Remote content is schema data rather than executable code, so the evidence does not establish remote code execution. The primary issue is unrestricted network access and potential SSRF-style resource retrieval.

Attack Path

  1. An attacker creates or modifies an OpenAPI document containing an external $ref, such as a URL targeting an internal service or metadata endpoint.
  2. The attacker persuades a user to ask the skill to parse the document or generate Drift tests from it.
  3. During recursive reference resolution, the agent follows the instruction to fetch the attacker-controlled URL.
  4. The request reaches a resource accessible from the agent's environment but potentially inaccessible to the attacker directly.
  5. Retrieved content may be exposed through generated analysis, error messages, or subsequent sc ...[truncated 660 chars]
Remediation
View remediation

Remediation Suggestions

  • Refuse remote $ref retrieval by default and require explicit user approval before any network request.
  • If remote retrieval is necessary, permit only HTTPS URLs hosted on an explicit allowlist.
  • Reject URLs containing credentials and disallow non-HTTP schemes such as file, ftp, gopher, and custom protocols.
  • Resolve hostnames before connecting and block loopback, private, link-local, multicast, reserved, and cloud metadata address ranges for both IPv4 and IPv6.
  • Repeat destination validation after every DNS resolution and redirect; preferably disable redirects or restrict them to the original approved origin.
  • Enforce strict connection and read timeouts, maximum redirect counts, maximum response sizes, and supported content types.
  • Process downloaded content strictly as untrusted OpenAPI data and never as agent instructions or executable content.
  • Record the final destination and retrieval decision so users can review network activity.
  • Prefer requiring users to download and inspect external schemas separately, then provide them as local files within an approved project directory.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 24)May include surrounding context.

md
- [`references/schema-patterns.md`](references/schema-patterns.md) — how to interpret and enumerate every complex pattern

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
- [`references/schema-patterns.md`](references/schema-patterns.md) — how to interpret and enumerate every complex pattern

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description uses very broad activation language such as 'use whenever' and lists many generic user phrasings, which can cause the skill to be invoked for a wide range of ordinary API-testing or schema-understanding requests beyond a narrowly scoped purpose. Over-broad routing increases the chance that this skill handles tasks it is not best suited for, potentially leading to incorrect file access, unnecessary processing of untrusted specs, or interference with safer/more appropriate skills in a forked agent context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.