Back to skill

Security audit

Envelope Sender

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear signing purpose, but it should be reviewed because it runs an unpinned external CLI while handling PDFs, signer emails, and an API key.

Install only if you are comfortable sending the chosen PDF, signer names, signer emails, and envelope metadata to eSignGlobal. Prefer a vetted, pinned, preinstalled version of the CLI, run it with least-privilege access only to the intended PDF, and avoid shell-string interpolation when passing file paths, signer JSON, or subjects.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:12
Finding
Unpinned Runtime-Downloaded CLI Creates a Supply-Chain Execution Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 12-16; additional invocation at lines 124-126 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: High ### Vulnerable Code ```bash npx @esignglobal/envelope-cli <command> ``` The same unpinned package is used in the envelope-sending command: ```bash npx @esignglobal/envelope-cli send-envelope --file <filePath> --signers '<signersJson>' [--subject <subject>] --confirm ``` ### Technical Analysis The skill directs the agent to resolve and execute `@esignglobal/envelope-cli` through `npx` without specifying an exact package version. It provides no lockfile, integrity hash, provenance verification, or requirement that an audited local installation be used. Depending on the local npm and `npx` configuration, the command can download and execute the package version currently resolved by the npm registry. This makes the effective executable mutable after the skill has been reviewed. A compromised package, compromised publisher account, malicious replacement release, or unexpected future version could execute arbitrary code with the privileges of the agent process. The CLI is also expected to run while `ESIGNGLOBAL_APIKEY` is present in the environment and while a sensitive local PDF is accessible. Consequently, compromise of the dependency would expose both authentication material and document data. ### Attack Path 1. An attacker compromises the package publisher, registry distribution path, or a version selected for the unpinned package. 2. The malicious package or release is published under `@esignglobal/envelope-cli`. 3. An agent follows the skill and executes the documented `npx` command. 4. `npx` resolves and, where necessary, downloads the attacker-controlled package. 5. Package installation hooks or CLI entry-point code execute with the agent's operating-system privileges. 6. The malicious code reads `ESIGNGLOBAL_APIKEY`, accesses the selected PDF or other files ava ...[truncated 802 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the CLI to a reviewed exact version, for example: ```bash npx --no-install @esignglobal/envelope-cli <command> ``` The package should first be installed at an exact version through a controlled dependency manifest. 2. Add a `package-lock.json` or equivalent lockfile containing registry integrity metadata, and enforce immutable or reproducible installation in deployment. 3. Prevent implicit runtime downloads by using `npx --no-install` or directly invoking an already installed, verified executable. 4. Verify package provenance, publisher identity, signatures or attestations where available, and expected integrity hashes before deployment. 5. Review new package versions before updating the pinned version. 6. Run the CLI in a restricted environment with access only to the selected PDF and required network destination. 7. Provide the API key with the minimum permissions necessary and rotate it immediately if dependency compromise is suspected. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:124
Finding
Shell Command Construction with User-Controlled Arguments Can Enable Command Injection<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 124-126 **Vulnerability Type**: `T09: Insecure Skill Coding Practices` **Risk Level**: Medium ### Vulnerable Code ```bash npx @esignglobal/envelope-cli send-envelope --file <filePath> --signers '<signersJson>' [--subject <subject>] --confirm ``` ### Technical Analysis The documented pattern places user-controlled values—`filePath`, signer JSON, and the optional subject—inside a shell command. The guidance does not require execution through a direct process API with a discrete argument array, nor does it specify robust platform-specific escaping. The `filePath` and `subject` placeholders are unquoted in the generic pattern. The signer JSON is wrapped in single quotes, but legitimate signer names can contain apostrophes, which terminate single-quoted shell strings on common POSIX shells. Shell metacharacters, command substitutions, quotes, or option-like values may therefore alter command parsing if an agent constructs a command string by literal interpolation. Validation that a path is absolute and ends in `.pdf` does not by itself make the value safe for shell interpolation. Likewise, syntactically valid JSON can contain strings with shell-significant characters. ### Attack Path 1. A user supplies a crafted file path, signer field, or envelope subject containing quotes or shell metacharacters. 2. The agent validates only the documented business rules, such as an absolute `.pdf` path and required signer fields. 3. The agent interpolates the supplied value into the documented command template. 4. The command is passed to a shell rather than executed as a process with a fixed argument array. 5. The shell interprets part of the user input as shell syntax. 6. An attacker-controlled command runs with the same privileges and environment as the agent, including possible access to `ESIGNGLOBAL_APIKEY`. Exploitation depends on the invoking agent using shell-string construction as implied by t ...[truncated 767 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prohibit shell-string construction. Require invocation through a process API that accepts an executable and a discrete argument array. 2. Pass each value as one argument, conceptually: ```text executable: npx arguments: - --no-install - @esignglobal/envelope-cli - send-envelope - --file - <validated file path> - --signers - <serialized JSON> - --subject - <subject> - --confirm ``` 3. If supported by the CLI, provide signer JSON through standard input or a securely created temporary file rather than embedding it in a shell command. 4. Validate that `filePath` is absolute, refers to a regular existing file, has the required PDF type, and is not an option-like value. 5. Validate signer objects against a strict schema, including field types, allowed keys, email format, integer signing order, and reasonable length limits. 6. Apply reasonable length and character controls to the optional subject, while treating validation as defense in depth rather than a replacement for shell-free execution. 7. If a shell is unavoidable, use a well-tested platform-specific escaping library for every argument and explicitly reject unsupported control characters. Direct process execution remains the preferred remediation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill sends a local PDF and signer information to an external signing service but does not provide a clear user-facing warning that document contents and personal data will leave the local environment. This undermines informed consent and can lead to accidental disclosure of confidential files or PII to a third party.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs the agent to execute an external package via `npx` without pinning an exact version, which can pull the latest published code at runtime. If the package is compromised, replaced, or updated with malicious behavior, the agent could execute untrusted code with access to local files and the `ESIGNGLOBAL_APIKEY` secret.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This unpinned `npx` invocation runs code fetched at execution time and therefore extends trust to the current state of the npm supply chain. In this skill, that risk is amplified because the invoked tool handles sensitive PDFs, signer PII, and an API key available in the environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The core send-envelope example uses `npx @esignglobal/envelope-cli` without version pinning, creating a supply-chain execution point in the most security-critical workflow. A malicious or tampered package could exfiltrate the document, signer details, or `ESIGNGLOBAL_APIKEY`, or perform arbitrary commands under the agent's privileges.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
Even the help command uses an unpinned `npx` package, which still causes package retrieval and code execution before displaying help. This means a seemingly harmless diagnostic step can trigger malicious package code in the same environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The example command demonstrates the exact runtime pattern an agent is expected to copy, normalizing execution of an unpinned remote package for a data-sensitive workflow. Because this skill processes local PDFs and personal data, any package compromise can directly lead to data theft or unauthorized envelope actions.

Static analysis

No suspicious patterns detected.