Back to skill

Security audit

Gist Share

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it defaults to publishing arbitrary content publicly and recommends persistent plaintext token storage, which users should review before installing.

Install only if you are comfortable with agents using GitHub Gist to publish content externally. Prefer a short-lived or credential-manager-backed GitHub login instead of putting a PAT in shell profile files, use the minimum gist scope, review and redact content before upload, and choose secret gists or access-controlled storage for anything non-public.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:45
Finding

GitHub Personal Access Token Stored in a Plaintext Shell Profile

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:45-49 and README.md:41-46
Vulnerability Type: Plaintext credential storage
Risk Level: Medium

Vulnerable Code

bash
echo 'export GITHUB_TOKEN=ghp_yourTokenHere' >> ~/.zshrc
source ~/.zshrc

The project recommends permanently storing a GitHub Personal Access Token in a shell startup file. A PAT is a bearer credential, so anyone who obtains its value can exercise the permissions granted to it without possessing an additional secret.

Shell profiles are plaintext files and may be exposed through dotfile repositories, workstation backups, support bundles, home-directory read access, accidental file sharing, or overly broad filesystem permissions. Exporting the token also places it in the environment inherited by child processes, increasing the number of processes that may access it.

Technical Analysis

The recommended token only needs the GitHub gist scope, which limits but does not eliminate the consequences of disclosure. A stolen token with that scope can generally be used to create gists under the victim's identity and access, modify, or delete gists authorized by the token. Private or secret gist contents accessible through the credential may consequently be disclosed.

The sample placeholder is not itself a live hardcoded secret. The vulnerability is the documented practice of replacing that placeholder with a real credential and persisting it unencrypted.

Attack Path

  1. A user replaces ghp_yourTokenHere with a valid GitHub PAT and appends the export statement to ~/.zshrc.
  2. The profile is copied into a dotfile repository, included in a backup or diagnostic archive, or read by another account or process with home-directory access.
  3. An attacker extracts the PAT from the plaintext export statement.
  4. The attacker supplies the token to GitHub CLI or the GitHub API.
  5. The attacker performs operations permitted by the token's `gis ...[truncated 641 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the recommendation to append a real PAT to ~/.zshrc, ~/.bashrc, or another plaintext profile.
  • Prefer gh auth login, allowing GitHub CLI to use the operating system's supported credential storage.
  • Where available, use a platform credential manager or dedicated secret manager.
  • If an environment variable is necessary, set it only for the immediate process or session and unset it after use.
  • Retain the least-privilege requirement that the token have only the gist scope.
  • Recommend expiration dates and periodic token rotation.
  • Warn users not to commit, synchronize, log, or include token-bearing files in support archives.
  • Advise users who have already stored a token in a profile to remove it, revoke or rotate it, inspect dotfile history and backups, and review GitHub activity.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:68
Finding

Arbitrary Content Is Published as a Public Gist by Default

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:68-73 and README.md:68-78
Vulnerability Type: Unsafe external publication default
Risk Level: High

Vulnerable Code

bash
gh gist create --public --desc "Your description here" --filename "your-file.md" - << 'EOF'
Your content here.

Supports **markdown** formatting.
EOF

The skill is expressly intended to upload summaries, reports, logs, plans, and other arbitrary agent context to GitHub. Its primary usage example selects --public, making content publicly visible and potentially searchable or indexed.

The workflow does not require the agent to preview the exact payload, check it for secrets or personal data, or obtain explicit confirmation immediately before public publication. Although publication is the declared purpose of the skill and is not covert exfiltration, the unsafe default can expose content whose sensitivity was not recognized by the user or agent.

Technical Analysis

Reports and logs frequently contain credentials, API keys, internal hostnames, private source code, customer information, filesystem paths, conversation history, and operational metadata. Passing such material to gh gist create --public transmits it to an external service and makes it available beyond the local trust boundary.

GitHub Gists are persistent external resources. Deleting a gist after an accidental upload does not guarantee complete recovery because third parties, search engines, notification systems, or caches may already have copied the content.

The documentation mentions --secret, but it is not the default in the principal templates. A secret gist is also unlisted rather than access-controlled: anyone who obtains its URL can read it.

Attack Path

  1. Sensitive information is incorporated into a report, summary, plan, source excerpt, or diagnostic log.
  2. A user asks the agent to share that material using the skill without separately sp ...[truncated 1106 chars]
Remediation
View remediation

Remediation Suggestions

  • Change all primary templates to use --secret by default.
  • Require explicit, informed user confirmation immediately before using --public.
  • Display the exact content, filename, description, destination, and visibility before upload.
  • Scan proposed payloads for common secret formats, private keys, authorization headers, passwords, tokens, personal data, and sensitive internal identifiers.
  • Block or require additional confirmation when likely secrets are detected.
  • Minimize uploaded content and redact sensitive values rather than publishing raw logs or complete conversations.
  • Clearly state that a secret gist is unlisted, not private, and remains readable by anyone possessing its URL.
  • Recommend an access-controlled storage service when the content is confidential or intended for a restricted audience.
  • Provide deletion and incident-response guidance for accidental publication, including credential revocation, gist deletion, repository or service review, and activity-log inspection.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

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 36)May include surrounding context.

md
## Setup (One-Time)

You need a GitHub Personal Access Token (PAT) with the `gist` scope.

### Step 1: Create a PAT

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 26)May include surrounding context.

md
## Setup (One-Time)

You need a GitHub Personal Access Token (PAT) with the `gist` scope.

### Step 1: Create a PAT

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 36)May include surrounding context.

git clone https://github.com/PsiClawOps/gist-share ~/.openclaw/skills/gist-share

text

### 2. Create a GitHub Personal Access Token (PAT)

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly instructs agents to create public gists and emphasizes that they are readable by anyone, but it does not prominently warn users against uploading secrets, tokens, internal prompts, customer data, or other sensitive context. In an agent skill whose purpose is context sharing, this creates a real data exposure risk because users may paste operational or confidential material into a permanently accessible external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill strongly promotes posting content to public GitHub Gists and highlights that they are readable by anyone, but it does not clearly warn users that reports, logs, plans, or other agent-generated content may contain secrets, internal data, or personal information. In this context, omission of a prominent data-exposure warning materially increases the chance of accidental public disclosure.

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 28)May include surrounding context.

md
You need a GitHub Personal Access Token (PAT) with the `gist` scope.

### Step 1: Create a PAT

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

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill recommends permanently storing a GitHub PAT in a shell profile, which increases credential persistence and the blast radius of compromise if the profile is read by other tools, included in backups, synced, or exposed through local compromise. Even with limited gist scope, the token enables ongoing authenticated actions and normalizes insecure credential handling.

Content

No source excerpt is available for this finding.