Back to skill

Security audit

GitHub Bug Report

Security checks for vulnerabilities and agentic risk

Overview

The skill is for GitHub bug reporting, but it ships a hardcoded GitHub token and describes recurring automated follow-up comments, so users should review it before use.

Do not install or use this version with the embedded token. The publisher should revoke the exposed GitHub token, replace it with user-supplied credentials, add explicit confirmation before every GitHub write, sanitize logs/configuration before submission, and make follow-up reminders one-time or notification-only.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/submit_issue.py:11
Finding
Hardcoded GitHub Personal Access Token Exposed in Code and Documentation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/submit_issue.py:11-17`; also exposed in `SKILL.md:76-83` and `references/quick-ref.md:17-42` **Vulnerability Type**: Hardcoded credential and plaintext secret exposure **Risk Level**: High ### Vulnerable Code ```python TOKEN = "ghp_[REDACTED_EXPOSED_TOKEN]" REPO = "openclaw/openclaw" BASE_URL = f"https://api.github.com/repos/{REPO}" HEADERS = { "Authorization": f"token {TOKEN}", "Accept": "application/vnd.github+json", "Content-Type": "application/vnd.github+json", } ``` The same plaintext token is repeated in `SKILL.md` and in multiple executable `curl` examples in `references/quick-ref.md`. The credential value is redacted in this report to avoid further disclosure. ## Technical Analysis A GitHub personal access token is embedded directly in executable Python code and distributed documentation. The script automatically includes the token in authenticated `POST`, `PATCH`, and `GET` requests to GitHub. Any party that can read the skill package can extract the credential without executing the script. Because the token is used to create and update issues, it has at least some authenticated repository or issue-management capability. Its complete scope cannot be determined from the audited files. Duplicating the token across three files increases the probability of accidental publication, log exposure, package redistribution, and incomplete remediation. ### Attack Path 1. An attacker obtains a copy of the skill package or reads any of the affected files. 2. The attacker extracts the plaintext GitHub token. 3. The attacker places the token in a GitHub API authorization header. 4. The attacker submits requests to GitHub using the token owner's identity. 5. The attacker performs any operation permitted by the token's configured scopes, including issue creation or modification where authorized. ### Impact Assessment The exposed credential can enable unauthorized authenticated GitHub A ...[truncated 608 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Revoke the exposed token immediately through GitHub. 2. Generate a replacement only if required, using the minimum necessary repository and operation scopes. 3. Remove the credential from: - `scripts/submit_issue.py` - `SKILL.md` - `references/quick-ref.md` - All version-control history, package archives, logs, and published artifacts 4. Load credentials from a protected environment variable or secret manager: ```python import os TOKEN = os.environ.get("GITHUB_TOKEN") if not TOKEN: raise RuntimeError("GITHUB_TOKEN is required") ``` 5. Do not include real credentials in documentation. Use placeholders such as `$GITHUB_TOKEN`. 6. Add automated secret scanning and pre-commit checks. 7. Review the exposed token's GitHub audit activity for unauthorized use. 8. Require explicit user approval before authenticated write operations. ]]>

T06 · System Persistence

Error
Location
SKILL.md:50
Finding
Indefinite Scheduled Agent Task Can Perform Autonomous GitHub Comments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:50-64` **Vulnerability Type**: Persistent scheduled task with autonomous external side effects **Risk Level**: High ### Vulnerable Configuration The source defines the following scheduled-task behavior, rendered in English: ```json { "name": "Bug follow-up-#<issue-number>", "schedule": { "kind": "cron", "expr": "0 10 * * *", "tz": "Asia/Shanghai" }, "payload": { "kind": "agentTurn", "message": "Check whether GitHub issue #<issue-number> has received an official response. If not, bump it by commenting: Any update?" }, "sessionTarget": "isolated", "delivery": { "mode": "announce" } } ``` ## Technical Analysis The documentation describes this as a follow-up reminder after three days, but the expression `0 10 * * *` schedules execution every day at 10:00 in the configured time zone. It is not a one-time three-day schedule. The payload starts an isolated agent turn and directs it to perform an external GitHub write by posting a comment when no official response is found. No expiration, maximum execution count, deduplication rule, cleanup action, or requirement for renewed user confirmation is defined. The scheduled task therefore survives the original skill invocation and can continue causing external side effects across sessions. ### Attack Path 1. A user follows the documented issue-submission workflow. 2. The workflow creates the supplied cron task after issue submission. 3. The task persists beyond the initiating session. 4. At 10:00 each day, an isolated agent checks the selected GitHub issue. 5. If the agent determines that no official response exists, it posts an “Any update?” comment. 6. Because no termination or deduplication condition exists, this process can repeat indefinitely. ### Impact Assessment The task obtains persistent authority to initiate agent activity and potentially perform authenticated GitHub writes without obtaining fresh appr ...[truncated 372 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the recurring cron expression with a one-time task scheduled exactly three days after submission. 2. Make the task notification-only. It should remind the user rather than post to GitHub automatically. 3. Require explicit user confirmation before every external comment or issue update. 4. Automatically delete the task after it runs. 5. If recurring monitoring is genuinely required: - Define a short expiration time - Set a maximum execution count - Stop after an official response is detected - Record whether a follow-up was already posted - Prevent duplicate comments 6. Display the complete schedule, destination, intended comment, and expiration before installation. 7. Provide a documented command or interface for listing and removing created tasks. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:38
Finding
Diagnostic Logs and Configuration May Be Published Without Secret Redaction<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:38-39`; issue transmission occurs at `scripts/submit_issue.py:21-23` **Vulnerability Type**: Unvalidated publication of potentially sensitive diagnostic data **Risk Level**: Medium ### Vulnerable Code The documentation instructs users to place logs, screenshots, and configuration JSON into the issue's additional context. The script then transmits the supplied body without inspection or redaction: ```python def create_issue(title, body): url = f"{BASE_URL}/issues" data = {"title": title, "body": body} resp = requests.post(url, headers=HEADERS, json=data) ``` ## Technical Analysis Diagnostic logs and configuration files commonly contain API keys, session tokens, internal paths, usernames, email addresses, hostnames, private endpoints, and other sensitive information. The workflow encourages users to include these artifacts but implements no: - Secret detection - Personal-data detection - Redaction - Destination visibility warning - Final payload preview - Confirmation immediately before publication The supplied body is placed directly into a GitHub issue creation request. If the target repository is public, the issue contents can become publicly accessible. Even for a private repository, the content is disclosed to all users and integrations with access to that repository. ### Attack Path 1. A user follows the issue template and includes logs or configuration JSON. 2. Those diagnostics contain an overlooked credential or other sensitive value. 3. The script places the complete content into the `body` field. 4. The script sends the body to GitHub without scanning or redaction. 5. The sensitive value becomes visible according to the repository's access controls. 6. A third party can copy and misuse an exposed credential or use disclosed environmental information for further attacks. ### Impact Assessment The issue may disclose secrets or operational data to repository readers. Th ...[truncated 404 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Warn users clearly that GitHub issues may be public. 2. Require users to review a final preview containing the repository, title, body, and attachments before submission. 3. Add automated detection and redaction for common secret formats, including: - GitHub tokens - API keys - Authorization headers - Private keys - Passwords and connection strings 4. Detect and flag likely personal data and internal infrastructure identifiers. 5. Block submission when high-confidence secrets are detected unless they are removed. 6. Recommend minimal, sanitized reproductions rather than complete configuration files. 7. Provide a safe redaction helper for logs and JSON. 8. Require explicit confirmation immediately before transmitting issue contents. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The documented behavior materially diverges from the declared purpose by embedding a fixed GitHub token and by omitting or incompletely implementing the promised workflow safeguards. Description-behavior mismatch is dangerous in agent skills because reviewers and users may approve a seemingly simple reporting skill while it actually contains hidden credential use and under-specified external actions.

Context-Inappropriate Capability

High
Confidence
100% confidence
Finding
A live GitHub personal access token is embedded directly in the skill content, exposing repository access to anyone who can read or reuse the file. Hardcoded credentials are highly dangerous because they enable unauthorized API use, issue spam, repository reconnaissance, and potentially broader account compromise depending on token scope.

Missing User Warnings

High
Confidence
98% confidence
Finding
Credentialed API commands are provided without any warning that the token is sensitive or that reusing the command leaks authentication material into shell history, logs, screenshots, and copy-paste trails. This makes accidental credential disclosure and misuse much more likely in normal operation.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The quick reference embeds a GitHub personal access token directly in example commands, exposing reusable credentials to anyone who can read the file. A live PAT can be abused for authenticated API access well beyond bug reporting, including reading private metadata or modifying repository resources depending on token scope.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The script hard-codes a live GitHub personal access token directly in source and automatically uses it for authenticated API calls. Anyone who can read the file can reuse the credential to create, modify, or potentially perform other repository actions allowed by the token, making this a clear secret exposure and unauthorized access risk.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill invokes network-capable actions such as curl to GitHub and instructs issue submission, but it does not declare any explicit tool scope or permission boundaries. This weakens governance and review because the skill can cause outbound requests and external side effects without transparent capability declaration.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The manifest description and the main skill content are written as mandatory Chinese-language instructions, with no indication that users may choose another language or locale. This creates a natural-language policy concern because the skill appears to enforce a specific language rather than offering a choice or documenting a justified locale restriction.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs external issue submission and creation of scheduled follow-up actions without a clear user-facing warning about those side effects. In an agent context, hidden writes to third-party services and autonomous future actions can cause unintended disclosure, spam, or persistent automation the user did not knowingly approve.

Intent-Code Divergence

Medium
Confidence
99% confidence
Finding
The skill first suggests using an environment-supplied token and then contradicts that guidance by publishing a fixed token inline. This inconsistency is especially risky because it normalizes insecure credential handling and may trick operators into believing the workflow is secret-safe when the credential is already exposed.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
The user-facing checklist and examples are written entirely in Chinese, while the file title is in English and there is no statement that the skill is intended only for Chinese-speaking users. This creates an implicit language constraint without user opt-in or documented justification.

External Transmission

Medium
Category
Data Exfiltration
Content
- [ ] 准备好预期 vs 实际结果
- [ ] 版本号准备好(查 openclaw --version)

## curl 快速命令

### 搜索现有 issue
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The reference includes an authenticated PATCH workflow that allows modifying existing GitHub issues, which expands capability beyond simple reporting and status checking. If used with the embedded token, this can enable unauthorized tampering with issue content, titles, or workflow history.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
Using an authentication token without any credential-handling safeguards is dangerous here because the token is embedded directly in code and silently applied to all API requests. In this context, the absence of warnings is secondary to the larger problem that the credential is exposed and can be abused by anyone with access to the script.

External Transmission

Medium
Category
Data Exfiltration
Content
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"

HEADERS = {
    "Authorization": f"token {TOKEN}",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"

HEADERS = {
    "Authorization": f"token {TOKEN}",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"

HEADERS = {
    "Authorization": f"token {TOKEN}",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"

HEADERS = {
    "Authorization": f"token {TOKEN}",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"

HEADERS = {
    "Authorization": f"token {TOKEN}",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"

HEADERS = {
    "Authorization": f"token {TOKEN}",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"

HEADERS = {
    "Authorization": f"token {TOKEN}",
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The script sends the provided title and body to the GitHub API using authenticated HTTP requests, which transmits user-supplied data to an external service. Although success and failure are printed afterward, there is no prior warning, confirmation, or explanatory comment/docstring disclosing that issue content will be uploaded to GitHub.

External Transmission

Medium
Category
Data Exfiltration
Content
def create_issue(title, body):
    url = f"{BASE_URL}/issues"
    data = {"title": title, "body": body}
    resp = requests.post(url, headers=HEADERS, json=data)
    if resp.status_code == 201:
        issue = resp.json()
        print(f"✅ Issue 创建成功: #{issue['number']}")
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
Natural-language strings in the docstring and console output are presented only in Chinese, which imposes a specific language on users without opt-in or alternatives. This matches the language/locale policy concern because no choice or justification is provided.

Static analysis

No suspicious patterns detected.