Back to skill

Security audit

Ai Rag Pipeline

Security checks for vulnerabilities and agentic risk

Overview

This RAG skill is mostly coherent, but its primary setup path asks users to execute a mutable remote installer directly in a shell.

Review before installing. Prefer a manual, pinned, checksum- or signature-verified CLI installation instead of running the pipe-to-shell Quick Start, and avoid sending secrets, private documents, or confidential URLs through the example search and LLM workflows unless those providers are approved for that data.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:16
Finding
Mutable Remote Installer Is Piped Directly into a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 16 **Vulnerability Type**: Remote payload retrieval and immediate execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://cli.inference.sh | sh && infsh login ``` ### Technical Analysis The Quick Start command downloads content from `https://cli.inference.sh` and passes it directly to `sh`. The effective installer is mutable remote content that is neither included in the audited project nor pinned to a reviewed version. It is executed before users can inspect it or independently verify its integrity. The documentation states that the remote installer verifies the SHA-256 checksum of the binary it subsequently downloads. That does not authenticate the installer script itself. A compromised domain, CDN, publication pipeline, DNS/TLS path, or server could return a modified script that executes arbitrary commands before or instead of performing the claimed checksum verification. Installing a CLI is relevant to the Skill's functionality, but executing unaudited remote shell content is not the minimum privilege or safest mechanism necessary to perform that installation. ### Attack Path 1. An attacker compromises the remote installer hosting infrastructure, deployment credentials, CDN, or another component capable of changing the response from `cli.inference.sh`. 2. The attacker replaces the installer response with a malicious shell payload. 3. A user follows the documented Quick Start command. 4. `curl` retrieves the attacker-controlled response and streams it directly into `sh`. 5. The payload executes immediately with all permissions available to the invoking user. 6. The payload can access user-readable files, environment variables, credentials, network resources, and writable configuration locations. ### Impact Assessment Successful exploitation provides arbitrary command execution in the security context of the user running the installation command. This m ...[truncated 532 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `curl | sh` installation workflow. 2. Publish versioned CLI artifacts through an official release channel and require users to select an explicit version. 3. Download the artifact to a local file without executing it automatically. 4. Publish a fixed SHA-256 or stronger cryptographic digest through an independently trusted channel. 5. Verify the downloaded artifact locally before execution. 6. Prefer cryptographically signed releases and verify the signature against a documented, pinned public key. 7. Provide manual installation instructions that disclose all files, permissions, and configuration changes. 8. Ensure installation runs with ordinary user privileges and explicitly warn users not to invoke it as root or through `sudo`. 9. If an installer script remains necessary, version and include it in the reviewed package rather than retrieving mutable code at execution time. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:286
Finding
Unpinned Third-Party Skill Installation Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 286–294 **Vulnerability Type**: Mutable and unverified third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```bash # Web search tools npx skills add inference-sh/skills@web-search # LLM models npx skills add inference-sh/skills@llm-models # Content pipelines npx skills add inference-sh/skills@ai-content-pipeline # Full platform skill npx skills add inference-sh/skills@inference-sh ``` ### Technical Analysis These instructions invoke an `npx`-resolved command and add third-party Skills using symbolic names. The version of the package executed by `npx` is not pinned, and the referenced Skills are not tied to immutable versions or commit hashes in the documented commands. Consequently, the code or instructions installed in the future may differ from what existed when this Skill was audited. The project provides no lockfile, integrity digest, signature-verification procedure, or review gate for these optional installations. This creates a supply-chain boundary in which compromise or unexpected modification of the package registry, repository, publisher account, or referenced Skill can introduce unaudited behavior. ### Attack Path 1. An attacker compromises the package resolved by `npx`, the referenced repository, a publisher account, or an upstream distribution channel. 2. The attacker publishes a malicious or altered package or Skill under one of the mutable names used by the documentation. 3. A user executes one of the documented `npx skills add` commands. 4. The package manager resolves current remote content rather than a specific reviewed revision. 5. The altered installer or Skill is executed or activated in the user's environment. 6. Any resulting behavior occurs outside the scope of this artifact's review and may use the permissions available to the package manager or agent runtime. ### Impact Assessment The exact impact depends on the behavior and permissio ...[truncated 517 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the package invoked by `npx` to an explicit, reviewed version. 2. Pin every referenced Skill to an immutable release identifier or commit hash rather than a mutable symbolic name. 3. Use package lockfiles and integrity hashes where supported. 4. Verify package signatures or checksums against independently published values. 5. Review downloaded Skill contents before enabling them in an agent environment. 6. Prevent automatic activation or execution during installation unless explicitly required and documented. 7. Run installation with ordinary user privileges in an isolated environment. 8. Document the source, expected permissions, data access, and reviewed revision for every recommended dependency. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (7)

External Script Fetching

High
Category
Supply Chain
Content
## Quick Start

```bash
curl -fsSL https://cli.inference.sh | sh && infsh login

# Simple RAG: Search + LLM
SEARCH=$(infsh app run tavily/search-assistant --input '{"query": "latest AI developments 2024"}')
Confidence
98% confidence
Finding
The command `curl -fsSL https://cli.inference.sh | sh` downloads and immediately executes a remote script, which is a classic unsafe installation pattern. If the host, transport path, or served script is compromised, users will execute attacker-controlled shell code on their machine; this skill is especially sensitive because `allowed-tools` includes broad Bash access, normalizing shell execution for users.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The manifest description includes many broad trigger phrases such as generic research, fact-checking, citation, and knowledge retrieval terms that could match ordinary user requests and cause the skill to activate unexpectedly. In this skill, unexpected activation is more dangerous because the workflow routes prompts and retrieved content to multiple external services, increasing unintended data exposure and tool use.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill presents examples that send user queries, extracted web content, and generated prompts to external providers including search services and LLM APIs, but it does not clearly warn users about that data flow. In a research-oriented skill, users may paste sensitive internal questions, URLs, or documents, so missing disclosure materially increases the risk of accidental data exfiltration to third parties.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Static analysis

No suspicious patterns detected.