Back to skill

Security audit

gitverse-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent GitVerse CLI, but it sends a bearer token to a user-configurable API base URL without validating the destination.

Install only if you trust the environment where the agent or CLI will run. Do not set GITVERSE_BASE_URL unless it is a trusted HTTPS GitVerse API endpoint, use a narrowly scoped token, and require explicit confirmation before creating issues, commenting, closing issues, creating pull requests, or merging pull requests.

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
scripts/gitverse.py:11
Finding

Bearer Token Disclosure Through an Unrestricted API Base URL

Content
View full analysis

Vulnerability Details

File Location: scripts/gitverse.py, lines 11 and 28–33
Vulnerability Type: Unvalidated credential-bearing network destination
Risk Level: High

Vulnerable Code

python
BASE_URL = os.environ.get("GITVERSE_BASE_URL", "https://api.gitverse.ru")
python
def request(method, path, body=None):
    url = BASE_URL + path
    data = json.dumps(body).encode() if body is not None else None
    req = urllib.request.Request(url, data=data, method=method)
    req.add_header("Authorization", "Bearer " + get_token())
    req.add_header("Accept", ACCEPT)
    req.add_header("Content-Type", "application/json")
    try:
        with urllib.request.urlopen(req) as resp:

Technical Analysis

The application accepts GITVERSE_BASE_URL without validating its scheme, hostname, port, or trust relationship. The request() function then unconditionally attaches the GitVerse bearer token to requests sent to that destination.

Consequently, an attacker who can influence the process environment or persuade a user to configure a malicious base URL can redirect authenticated requests to an attacker-controlled server. For example, setting GITVERSE_BASE_URL to https://attacker.example causes any subsequent command to transmit the token in the Authorization header to that server. An http:// URL can also transmit the credential without transport encryption.

The use of urllib.request.urlopen() additionally provides no application-level restriction preventing authenticated requests from following redirects to an untrusted origin.

Attack Path

  1. The attacker controls or influences GITVERSE_BASE_URL, such as through a launcher, shell configuration, CI environment, or untrusted setup instructions.
  2. The value is set to an attacker-controlled HTTPS endpoint or a plaintext HTTP endpoint.
  3. The user invokes any CLI operation, including a read-only command such as `repos lis ...[truncated 1025 chars]
Remediation
View remediation

Remediation Suggestions

  • Parse the configured URL with urllib.parse.urlsplit() and require the https scheme.
  • Restrict credential-bearing requests to an explicit allowlist, using api.gitverse.ru by default.
  • If private GitVerse deployments must be supported, require users to register trusted hosts explicitly rather than accepting an unrestricted environment override.
  • Reject URLs containing unexpected user information, fragments, ports, or malformed hostnames.
  • Disable automatic redirects or implement a redirect handler that rejects every cross-origin redirect before resending an authorization header.
  • Build URLs from validated components rather than concatenating an unrestricted base string with a path.
  • Display a clear warning and require explicit confirmation before sending credentials to a newly configured host.
  • Use narrowly scoped, short-lived tokens so that disclosure has limited impact.
  • Document that any configured API server receives the bearer token.
  • Add tests covering HTTP destinations, unapproved hosts, hostname-confusion inputs, and cross-origin redirects.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tainted flow: 'req' from os.environ.get (line 31, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The request destination is derived from BASE_URL, which is sourced from the GITVERSE_BASE_URL environment variable, while the code always attaches a Bearer token before sending the request. This allows an attacker who can influence the environment or execution context to redirect authenticated requests to an arbitrary host and exfiltrate the GitVerse token and repository data.

Content

Scanner excerpt · scripts/gitverse.py (reported line 36)May include surrounding context.

python
req.add_header("Accept", ACCEPT)
    req.add_header("Content-Type", "application/json")
    try:
        with urllib.request.urlopen(req) as resp:
            raw = resp.read()
            return json.loads(raw) if raw else None
    except urllib.error.HTTPError as e:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documents use of environment variables and outbound network access to a third-party API, but it does not declare any explicit tool scope or permission boundaries. In an agent setting, missing scope metadata can cause over-broad execution or make reviewers unaware that the skill can access secrets and perform authenticated remote actions.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# Токен: https://gitverse.ru/settings/tokens
export GITVERSE_TOKEN="..."        # или положить в ~/.gitverse_token (chmod 600)

Скрипт: scripts/gitverse.py (или установить в PATH как gitverse-skill).

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code sends HTTP requests to a remote GitVerse API using a bearer token from the environment or token file, but it provides no confirmation prompt, user-facing notice, or explanatory comment/docstring describing that repository metadata and user-supplied issue/PR content will be transmitted over the network. Because the file includes write operations such as creating issues, commenting, closing issues, creating pull requests, and merging, the lack of disclosure is especially relevant for safety-sensitive actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The exit message is hardcoded in Russian, which imposes a specific language on users without opt-in or any indication that the tool is intentionally region- or locale-specific. This is a natural-language policy concern because the skill does not offer a language choice or justify the language restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The network error output is hardcoded in Russian, which forces a specific locale for operational messaging without user opt-in. No surrounding documentation or configuration indicates that the skill is intentionally limited to Russian-speaking users.

Content

No source excerpt is available for this finding.