Back to skill

Security audit

Github Ops

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly for GitHub automation, but it gives an agent broad unattended authority to create public repositories, push code, create releases, and use stored credentials in unsafe ways.

Review this skill carefully before installing. Use only narrowly scoped, revocable GitHub credentials; avoid token-in-URL git remotes; require explicit approval before repository creation, public pushes, releases, or deployment-triggering changes; and replace broad git add . workflows with reviewed file allowlists and secret scanning.

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

Error
Location
SKILL.md:62
Finding

GitHub Token Persisted in Git Remote URL

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 62
Vulnerability Type: Credential exposure through insecure Git authentication configuration
Risk Level: High

Vulnerable Code

bash
git remote add origin https://${GITHUB_TOKEN}@github.com/username/repo.git
git push -u origin main

Technical Analysis

The documented push procedure interpolates GITHUB_TOKEN directly into the Git remote URL. Git persists remote URLs in the repository's .git/config file. Consequently, the token can remain stored in plaintext after the command completes.

The credential may also be exposed through command logging, diagnostic output, backups, support bundles, or tooling that prints the configured remote. Although the token value is read from a protected secret file elsewhere in the document, embedding it in a persistent URL defeats that protection.

The audit did not identify a hardcoded token value. Exploitation requires access to the resulting Git configuration, logs, backups, or equivalent process artifacts.

Attack Path

  1. The Skill reads a valid token into GITHUB_TOKEN.
  2. It adds an HTTPS remote containing the token.
  3. Git saves the complete URL in .git/config.
  4. An attacker with access to the workspace, a backup, logs, or collected diagnostics reads the URL.
  5. The attacker extracts the token and authenticates to GitHub.
  6. The attacker performs operations allowed by the token's scopes and repository access.

Impact Assessment

A recovered token may permit unauthorized access to repositories available to the associated GitHub identity. Depending on its scope, an attacker could read private source code, push malicious commits, alter releases, create repositories, or modify other GitHub resources.

The maximum impact is constrained by the token's scopes, organization policies, expiration, and repository authorization. The Skill metadata requires GITHUB_TOKEN, but the reviewed files do not establish its exact privileges.

Remediation
View remediation

Remediation Suggestions

  • Do not place credentials in Git remote URLs.
  • Configure the remote as https://github.com/username/repo.git.
  • Authenticate through GitHub CLI, Git Credential Manager, a secure credential helper, or an ephemeral HTTP authorization header.
  • Prefer short-lived, repository-scoped credentials with only the permissions needed for the requested operation.
  • Ensure automation does not print credentials or authenticated URLs.
  • Remove existing authenticated remote URLs from .git/config, logs, backups, and diagnostic artifacts where feasible.
  • Revoke and rotate any token previously used in this manner.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:109
Finding

Unbounded Workspace Staging Can Publish Sensitive Files

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 109–115
Vulnerability Type: Unsafe bulk staging and unattended publication
Risk Level: High

Vulnerable Code

bash
### 测试 2: 推送代码
```bash
cd /home/node/.openclaw/workspace
git add .
git commit -m "Test commit"
GITHUB_TOKEN=$(cat /home/node/.openclaw/secrets/github_token.txt)
git push

Related public-repository defaults appear at lines 51–57 and 101–105:

bash
curl -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/user/repos \
  -d '{"name":"repo-name","description":"描述","private":false}'
bash
curl -s -X POST \
  -H "Authorization: token ${GITHUB_TOKEN}" \
  https://api.github.com/user/repos \
  -d '{"name":"test-repo","private":false}' | jq '.name'

Technical Analysis

The procedure changes to the broad OpenClaw workspace and runs git add ., staging every unignored file beneath the current repository. It does not restrict staging to user-requested paths, validate the repository root, inspect the staged diff, or perform secret scanning before committing and pushing.

The risk is amplified because repository-creation examples explicitly set "private": false, while the Skill repeatedly promotes fully unattended operation. If the workspace contains credentials, environment files, agent state, unrelated source code, generated artifacts, or other sensitive material not covered by .gitignore, those files can be committed and sent to GitHub.

This is a documented unsafe workflow rather than proof that a particular secret has already been published. Exploitation depends on sensitive or attacker-planted material being present within the staged tree.

Attack Path

  1. Sensitive data is legitimately present in the workspace, or an attacker places a file inside the repository tree.
  2. The automated push workflow runs from /home/node/.openclaw/workspace.
  3. git add . stages the sensitive ...[truncated 1045 chars]
Remediation
View remediation

Remediation Suggestions

  • Stage only paths explicitly requested and validated for publication; replace git add . with an exact allowlist.
  • Resolve and verify the repository root before staging, and reject paths outside the intended project.
  • Review git diff --cached --name-only and git diff --cached before committing.
  • Run secret scanning and sensitive-file policy checks against staged content.
  • Maintain a restrictive .gitignore, but do not treat it as the sole security control.
  • Default newly created repositories to private unless the user explicitly authorizes public publication.
  • Require confirmation before the first push, public-repository creation, or publication of newly detected files.
  • Use branch protection or a review branch for automated changes.
  • If sensitive data has already been pushed, revoke affected credentials, remove the data from Git history with an appropriate history-rewriting tool, force-update affected refs carefully, and account for forks, clones, caches, and release artifacts.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill emphasizes "fully automatic, no user intervention" for repository creation, code push, and deployment, but does not warn about the irreversible and externally visible effects of these actions. This is dangerous because users may trigger publication or infrastructure changes without informed consent, especially when stored credentials are used automatically.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The description uses broad activation language for fully automated GitHub operations, which can cause the agent to invoke the skill for loosely related requests and take high-impact actions such as repository creation or code push. In a skill that uses privileged credentials and network access, overbroad triggering materially increases the risk of unintended destructive or public-facing changes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

1. 创建仓库

bash
# 函数:create_repo
curl -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/user/repos \

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

curl -X POST
-H "Authorization: token $GITHUB_TOKEN"
-H "Accept: application/vnd.github.v3+json"
https://api.github.com/user/repos
-d '{"name":"repo-name","description":"描述","private":false}'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

curl -X POST
-H "Authorization: token $GITHUB_TOKEN"
-H "Accept: application/vnd.github.v3+json"
https://api.github.com/user/repos
-d '{"name":"repo-name","description":"描述","private":false}'

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation explicitly describes reading a GitHub token from a local secrets file and exporting it into the shell environment, without warning about secret exposure risks. This is dangerous because it normalizes direct secret access and may lead agents or operators to surface, log, or misuse credentials that enable repository modification and data exfiltration.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
82% confidence
Finding

The test case instructs reading the GitHub token from a local secrets file and immediately using it in a live API call to create a repository. In context, this is more dangerous than a generic endpoint reference because it operationalizes secret access and external side effects in a reproducible snippet, encouraging real credential use during testing without safeguards.

Content

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

GITHUB_TOKEN=$(cat /home/node/.openclaw/secrets/github_token.txt) curl -s -X POST
-H "Authorization: token ${GITHUB_TOKEN}"
https://api.github.com/user/repos
-d '{"name":"test-repo","private":false}' | jq '.name'

预期输出:"test-repo"

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

测试 3: 创建 Release

bash
GITHUB_TOKEN=$(cat /home/node/.openclaw/secrets/github_token.txt)
curl -s -X POST \
  -H "Authorization: token ${GITHUB_TOKEN}" \
  https://api.github.com/repos/sandmark78/v61-docs/releases \
  -d '{"tag_name":"v1.0.0","name":"v1.0.0"}' | jq '.tag_name'

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

This test snippet uses a locally stored GitHub token to perform a real Release creation against a named repository, combining secret retrieval with immediate external mutation. That makes the context materially riskier than a normal API example because it promotes direct use of privileged credentials in documentation and can trigger unintended publication actions.

Content

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

GITHUB_TOKEN=$(cat /home/node/.openclaw/secrets/github_token.txt) curl -s -X POST
-H "Authorization: token ${GITHUB_TOKEN}"
https://api.github.com/repos/sandmark78/v61-docs/releases
-d '{"tag_name":"v1.0.0","name":"v1.0.0"}' | jq '.tag_name'

预期输出:"v1.0.0"

text

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as a GitHub operations capability, but its documented workflow extends into Vercel deployment and returning deployment URLs without declaring corresponding scope, controls, or required credentials. This scope creep is dangerous because an agent may perform additional external actions beyond the user’s expected GitHub-only intent, increasing the chance of unauthorized publication or deployment.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

The file states that the skill is truly present on the server and includes a concrete filesystem path for verification. This leaks internal environment structure and confirms skill enumeration details that can help an attacker map the host layout and target local files, secrets, or adjacent skills more effectively.

Content

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

md
---

*此技能已真实写入服务器*
*验证:cat /home/node/.openclaw/workspace/skills/github-ops/SKILL.md*

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
70% confidence
Finding

The primary description and key operating statements are written entirely in Chinese, with no indication that language choice is optional or user-selectable. That can be a natural-language policy issue if the skill effectively assumes a specific language or locale without documenting user choice.

Content

No source excerpt is available for this finding.