Back to skill

Security audit

Vigil

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent safety-check wrapper, but users should pin and sandbox its external npm dependency before relying on it.

Before installing, pin vigil-agent-safety to a reviewed exact version, avoid unpinned npx execution, and run the checker with minimal filesystem, network, and environment-variable access. Do not pass secrets in tool parameters unless they are required for policy evaluation.

Vulnerability Patterns
  • 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
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding
Unpinned Third-Party Package Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:17`, `SKILL.md:94-95`, `_meta.json:8-10`, and `scripts/vigil-check.js:29` **Vulnerability Type**: Unpinned and unaudited third-party dependency execution **Risk Level**: Medium ### Vulnerable Code `SKILL.md:17`: ```bash npm install vigil-agent-safety ``` `SKILL.md:94-95`: ```bash npx vigil-agent-safety check --tool exec --params '{"command":"ls -la"}' npx vigil-agent-safety policies ``` `_meta.json:8-10`: ```json "requires": { "npm": ["vigil-agent-safety"] } ``` `scripts/vigil-check.js:29`: ```javascript const { checkAction } = await import('vigil-agent-safety'); ``` ### Technical Analysis The Skill instructs users to install and execute `vigil-agent-safety` without specifying an exact package version or an integrity digest. The project also contains no lockfile or vendored dependency source from which the executed implementation could be verified. The `npx vigil-agent-safety` instructions are particularly sensitive because `npx` can download and immediately execute a package from the npm registry when a suitable local copy is unavailable. Consequently, the code that ultimately runs can differ from the implementation reviewed when this Skill was published. The wrapper imports the dependency and passes complete tool-call parameters to it: ```javascript const result = checkAction({ tool, params }); ``` Those parameters may contain shell commands, filesystem paths, URLs, API arguments, or credentials. A compromised or unexpectedly modified dependency could inspect or exfiltrate this information and perform arbitrary actions available to the Node.js process. The dependency implementation is absent from the audited project. Therefore, its advertised rule behavior, lack of side effects, and claimed zero-dependency design cannot be independently established from the supplied files. ### Attack Path 1. An attacker compromises the npm publisher account, registry package, release pipeline ...[truncated 1760 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a reviewed exact version rather than using an unconstrained package name: ```bash npm install --save-exact vigil-agent-safety@<reviewed-version> ``` 2. Commit a `package.json` and `package-lock.json` containing the exact resolved version and npm integrity hash. 3. Replace implicit `npx` retrieval with execution of the pinned local binary: ```bash npm exec --offline -- vigil-agent-safety check --tool exec --params '{"command":"ls -la"}' ``` Alternatively, invoke `./node_modules/.bin/vigil-agent-safety` after a verified installation. 4. Audit or vendor the source code corresponding to the pinned package release so that the implementation included in the security boundary can be reviewed. 5. Install dependencies with lifecycle scripts disabled where compatible: ```bash npm ci --ignore-scripts ``` 6. Run the checker in a restricted environment with: - No unnecessary write access. - No access to SSH keys, cloud credentials, or unrelated secrets. - Denied outbound network access unless explicitly required. - A minimal environment-variable allowlist. - Child-process restrictions where supported. 7. Avoid passing secrets in tool parameters when they are not necessary for policy evaluation. Redact tokens, credentials, and sensitive request data before calling `checkAction`. 8. Add automated dependency review, integrity verification, and vulnerability monitoring for the pinned release. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
const result = checkAction({
  agent: 'my-agent',
  tool: 'exec',
  params: { command: 'rm -rf /' },
});

// result.decision === "BLOCK"
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
const result = checkAction({
  agent: 'my-agent',
  tool: 'exec',
  params: { command: 'rm -rf /' },
});

// result.decision === "BLOCK"
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
const result = checkAction({
  agent: 'my-agent',
  tool: 'exec',
  params: { command: 'rm -rf /' },
});

// result.decision === "BLOCK"
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Credential Access

High
Category
Privilege Escalation
Content
- Destructive commands (rm -rf, mkfs, reverse shells) → BLOCK
- SSRF (metadata endpoints, localhost, internal IPs) → BLOCK
- Data exfiltration (curl to external, .ssh/id_rsa access) → BLOCK
- SQL injection (DROP TABLE, UNION SELECT) → BLOCK
- Path traversal (../../../etc/shadow) → BLOCK
- Prompt injection (ignore instructions, [INST] tags) → BLOCK
Confidence
90% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
- SSRF (metadata endpoints, localhost, internal IPs) → BLOCK
- Data exfiltration (curl to external, .ssh/id_rsa access) → BLOCK
- SQL injection (DROP TABLE, UNION SELECT) → BLOCK
- Path traversal (../../../etc/shadow) → BLOCK
- Prompt injection (ignore instructions, [INST] tags) → BLOCK
- Encoding attacks (base64 decode, eval(atob())) → BLOCK
- Credential leaks (API keys, AWS keys, tokens) → ESCALATE
Confidence
95% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
# Check a tool call
node scripts/vigil-check.js exec '{"command":"rm -rf /"}'
# → BLOCK: Destructive command pattern

# Check a safe call
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
* Usage: node vigil-check.js <tool> <params_json>
 * 
 * Examples:
 *   node vigil-check.js exec '{"command":"rm -rf /"}'
 *   node vigil-check.js read '{"path":"../../../etc/passwd"}'
 *   node vigil-check.js web_fetch '{"url":"http://169.254.169.254/latest/meta-data"}'
 */
Confidence
100% confidence
Finding
This duplicate match points to the same documented destructive command example, which remains dangerous because it provides a copy-paste payload for tool abuse. In an agent skill, such examples are especially risky because they can be treated as canonical usage patterns by integrators or automated systems.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
* Usage: node vigil-check.js <tool> <params_json>
 * 
 * Examples:
 *   node vigil-check.js exec '{"command":"rm -rf /"}'
 *   node vigil-check.js read '{"path":"../../../etc/passwd"}'
 *   node vigil-check.js web_fetch '{"url":"http://169.254.169.254/latest/meta-data"}'
 */
Confidence
95% confidence
Finding
This duplicate match points to the same documented destructive command example, which remains dangerous because it provides a copy-paste payload for tool abuse. In an agent skill, such examples are especially risky because they can be treated as canonical usage patterns by integrators or automated systems.

Credential Access

High
Category
Privilege Escalation
Content
* 
 * Examples:
 *   node vigil-check.js exec '{"command":"rm -rf /"}'
 *   node vigil-check.js read '{"path":"../../../etc/passwd"}'
 *   node vigil-check.js web_fetch '{"url":"http://169.254.169.254/latest/meta-data"}'
 */
Confidence
90% confidence
Finding
The documentation includes a concrete example for reading ../../../etc/passwd, which is a classic sensitive-file access and path traversal target. In a skill wrapper that accepts arbitrary tool and parameter input, this example materially increases the risk of credential or system-information targeting by demonstrating the exact payload shape expected by the interface.

Cloud Metadata Access

High
Category
Server-Side Request Forgery
Content
* Examples:
 *   node vigil-check.js exec '{"command":"rm -rf /"}'
 *   node vigil-check.js read '{"path":"../../../etc/passwd"}'
 *   node vigil-check.js web_fetch '{"url":"http://169.254.169.254/latest/meta-data"}'
 */

async function main() {
Confidence
94% confidence
Finding
The example URL targets 169.254.169.254, the well-known cloud metadata endpoint, which is commonly exploited via SSRF to steal instance credentials and environment details. In the context of an agent-integrated tool wrapper, documenting this exact input can facilitate misuse and signals that requests to sensitive internal addresses are within the expected parameter shape.

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.

Intent-Code Divergence

Low
Confidence
93% confidence
Finding
The file is positioned as a safety-check wrapper, but its documentation advertises obviously dangerous inputs such as destructive shell commands, path traversal to sensitive files, and cloud metadata access. In an agent-skill context, such examples normalize misuse and can be copied directly by users or downstream tooling, increasing the chance the wrapper is used to validate harmful actions rather than discourage them.

Static analysis

No suspicious patterns detected.