Back to skill

Security audit

GitHub Skills Assistant

Security checks for vulnerabilities and agentic risk

Overview

This GitHub skill mostly does what it says, but it exposes high-impact write actions using a broad GitHub token, including pull request creation that is not disclosed in the main documentation.

Review before installing. Use a fine-grained GitHub token limited to specific repositories and only the permissions you need, and assume the assistant can create issues, repositories, and pull requests under that token. Avoid broad classic repo tokens unless you accept that account-wide repository write risk.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
index.js:118
Finding

Undocumented Authenticated Pull-Request Creation Capability

Content
View full analysis

Vulnerability Details

File Location: index.js:118-133; implementation in api.js:270-299
Vulnerability Type: Undeclared authenticated repository mutation
Risk Level: Medium

Vulnerable Code

index.js:118-133 exposes the undocumented action:

js
create_pull_request: {
    description: 'Create a pull request',
    parameters: {
        type: 'object',
        properties: {
            owner: { type: 'string', description: 'Repository owner' },
            repo: { type: 'string', description: 'Repository name' },
            title: { type: 'string', description: 'PR title' },
            body: { type: 'string', description: 'PR description' },
            head: { type: 'string', description: 'Source branch' },
            base: { type: 'string', description: 'Target branch', default: 'main' }
        },
        required: ['owner', 'repo', 'title', 'head']
    },
    handler: createPullRequestHandler
},

api.js:270-299 implements the authenticated mutation:

js
async function createPullRequest(args, context) {
    const username = await getUsername(context);
    const { owner, repo, title, body, head, base = 'main' } = args;
    // Use username if owner not specified
    const prOwner = owner || username;
    if (!prOwner || !repo || !title || !head) {
        throw new Error('owner, repo, title, and head are required');
    }
    const url = `${GITHUB_API}/repos/${prOwner}/${repo}/pulls`;
    const response = await fetch(url, {
        method: 'POST',
        headers: getAuthHeaders(context),
        body: JSON.stringify({
            title,
            body: body || '',
            head,
            base
        })
    });
    if (!response.ok) {
        const error = await response.json();
        throw new Error(`Failed to create PR: ${error.message || response.status}`);
    }
    const pr = await response.json();
    return {

...[truncated 2334 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove create_pull_request from the exported action map if pull-request creation is not intended to be part of the Skill.
  2. If the capability is intentional, document it prominently in SKILL.md and README.md, including its state-changing nature and required GitHub permissions.
  3. Require explicit, action-specific user confirmation immediately before sending the authenticated POST request. The confirmation should identify the repository, source branch, target branch, and title.
  4. Recommend fine-grained GitHub tokens restricted to selected repositories and only the permissions needed by enabled actions. Avoid recommending a broad classic repo token where narrower access is sufficient.
  5. Separate read-only and write-capable actions so deployments can disable repository mutations independently.
  6. Validate repository and branch identifiers and impose reasonable length limits on pull-request titles and bodies.
  7. Add audit logging for state-changing actions without logging authorization headers or token values.
  8. Add tests that verify undocumented mutation actions cannot be exported and that all write operations require confirmation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (23)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 19)May include surrounding context.

md
- OpenClaw gateway running
- Node.js 18+
- GitHub account with a Personal Access Token (PAT)

## Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 135)May include surrounding context.

md
- OpenClaw gateway running
- Node.js 18+
- GitHub account with a Personal Access Token (PAT)

## Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- OpenClaw gateway running
- Node.js 18+
- GitHub account with a Personal Access Token (PAT)

## Setup

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- OpenClaw gateway running
- Node.js 18+
- GitHub account with a Personal Access Token (PAT)

## Setup

Credential Access

High
Category
Privilege Escalation
Confidence
72% confidence
Finding

The instructions direct users to create a classic PAT with broad scopes including full repo access, which grants extensive control over private repositories. In an agent-operated skill, encouraging overprivileged long-lived credentials raises the blast radius if the token is exposed, mishandled, or abused by the integration.

Content

Scanner excerpt · README.md (reported line 23)May include surrounding context.

md
## Setup

### 1. Generate a GitHub Personal Access Token

1. Go to https://github.com/settings/tokens
2. Click "Generate new token (classic)"

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The finding indicates the declared functionality does not align with implementation, including omitted authentication validation behavior and missing promised issue creation support. While some of this is integrity/usability mismatch rather than direct exploitation, inaccurate descriptions still create security risk by obscuring real behavior and operational prerequisites.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The finding indicates the declared functionality does not align with implementation, including omitted authentication validation behavior and missing promised issue creation support. While some of this is integrity/usability mismatch rather than direct exploitation, inaccurate descriptions still create security risk by obscuring real behavior and operational prerequisites.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The finding indicates the declared functionality does not align with implementation, including omitted authentication validation behavior and missing promised issue creation support. While some of this is integrity/usability mismatch rather than direct exploitation, inaccurate descriptions still create security risk by obscuring real behavior and operational prerequisites.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · README.md (reported line 10)May include surrounding context.

md
- 📋 **List Repos** — View your repositories with filters
- 📊 **Get Repo Details** — Stars, forks, language, last updated
- 🔄 **Check CI Status** — Monitor CI/CD pipelines
- 📝 **Create Issues** — Open issues from conversation
- 📁 **Create Repos** — Create new repositories
- 🔍 **Search Repos** — Find repos by name/query
- 📊 **Recent Activity** — View recent commits

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README advertises state-changing actions like creating issues and repositories without prominently warning that these operations modify the user's GitHub account and may have lasting effects. In an agent context, unclear disclosure increases the risk of unintended destructive or unauthorized-looking actions being triggered through natural-language requests.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description says the skill can query/manage repositories by listing repos, checking CI status, creating issues, searching repos, and viewing recent activity. The README adds a separate capability, 'Create Repos,' which is a write operation not mentioned in that manifest description, indicating the documented behavior is broader than the declared scope.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares access to sensitive capabilities via required environment/config credentials and clearly implies outbound GitHub API access, but it does not declare an explicit tool scope such as permissions or allowed-tools. Missing scope declarations weaken policy enforcement and user understanding, increasing the chance the skill operates with broader capabilities than intended.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

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

You: Check CI status on my main project Bot: [shows CI/CD status]

You: Create an issue about the bug Bot: [creates the issue]

text

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The declared API surface includes repository creation, which is a state-changing capability beyond the user-facing description of querying and management. Undisclosed write/create actions increase the risk of user deception, over-privileged invocation, and unintended repository creation if an agent or user assumes the skill is primarily read-oriented.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The API exposes pull request creation, but the description only mentions issues and repository queries/activity. Hidden PR creation is dangerous because it can modify development workflows, trigger automation, and create misleading or unauthorized change proposals under the user's identity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The function creates GitHub issues directly from agent-supplied arguments and even merges arbitrary extra fields into the request body, without any visible confirmation or restriction. This enables unintended writes, issue spam, or abuse of additional issue parameters in workflows where an LLM or untrusted input can trigger tool execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes listing repos, checking CI status, creating issues, searching repos, and viewing recent activity. The code also creates repositories and pull requests via POST requests, which are material write capabilities not mentioned in the manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This function performs a remote state-changing action against GitHub by creating a repository immediately with the configured token, but there is no visible confirmation, dry-run, or consent check in this code path. In an agent setting, that makes accidental or prompt-induced repo creation possible, potentially exposing sensitive code or creating unwanted public repositories if parameters are manipulated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Creating a pull request is a consequential remote write that can alter development workflows, trigger CI/CD, and propose code changes to repositories using the configured credentials. Because this code performs the action with no visible confirmation or guardrails, an agent could be induced to open unauthorized or misleading PRs, especially if connected to untrusted prompts or repository data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This skill exposes state-changing GitHub actions such as creating issues, repositories, and pull requests, but the type definition shows no visible confirmation, approval gate, or warning for those operations. In an agent setting, this increases the risk of unintended or prompt-induced actions that can modify external systems, spam repositories, or create reputational and operational impact.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The exported skill description says only 'Query and manage GitHub repositories', while the action set includes clearly state-changing operations such as create_issue, create_repo, and create_pull_request. In an agent ecosystem, understated capability descriptions can mislead users, policy layers, or permission reviewers into approving a skill without recognizing that it can create resources and modify remote systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This declaration file exposes operations that can mutate remote state, including creating issues, repositories, and pull requests. The file contains only brief doc comments and no visible confirmation prompt, warning text, or user-facing disclosure about these write actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This JavaScript code performs outbound network calls to the GitHub API and includes the GITHUB_TOKEN in the Authorization header. Although the file is a test suite and its purpose implies GitHub access, there is no user-facing warning, prompt, or runtime disclosure that credentials from environment variables will be used and transmitted to an external service.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.