Back to skill

Security audit

Openclaw Skills Github Sync

Security checks for vulnerabilities and agentic risk

Overview

This skill is a GitHub sync helper with purpose-aligned behavior, but its scripts can publish broad local repository contents and contain unsafe shell/config handling that users should review before installing.

Install only if you are comfortable with a script committing and pushing all non-ignored changes from the configured skill repositories to GitHub. Before each sync, run git status and git diff yourself, expand .gitignore for secrets such as .env and token files, verify the remote repository visibility, and treat scripts/config.sh as security-sensitive.

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
scripts/setup.sh:31
Finding

Shell Command Injection Through Generated Configuration File

Content
View full analysis
"$config_file" << EOF PRIVATE_PATH="$private_path" PUBLIC_PATH="$public_path" EOF ``` The generated file is subsequently executed as shell code: ```bash if [ -f "$CONFIG_FILE" ]; then source "$CONFIG_FILE" else ``` ### Technical Analysis The setup script accepts arbitrary path values and writes them directly into `config.sh` as shell assignment statements. The values are not escaped for use in shell source code. Because `sync.sh` loads the resulting file with `source`, shell metacharacters embedded in a configured path are interpreted as executable shell syntax. For example, an input containing command substitution such as `$(command)` is written inside the double-quoted assignment and is executed when `config.sh` is sourced. This crosses a trust boundary: data supplied as a filesystem path is converted into executable shell code. The use of double quotes around the generated value does not prevent command substitution, backtick substitution, or syntax injection through embedded quotes. ### Attack Path 1. An attacker convinces a user to enter a crafted private or public repository path during setup, or otherwise controls the setup input. 2. The crafted value contains shell syntax, such as command substitution or an ...[truncated 1184 chars]
Remediation
View remediation
"$config_file" ``` 4. Validate that each supplied value is an acceptable absolute or home-relative path before saving it. 5. Reject control characters and unexpected newlines. 6. Create the configuration with restrictive permissions: ```bash umask 077 ``` 7. Prefer parsing explicitly delimited key/value records over executing the entire configuration file. 8. Document that the configuration file is security-sensitive and must not be writable by untrusted users. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/sync.sh:61
Finding

Incomplete Pre-Commit Preview Can Cause Unintended Sensitive File Publication

Content
View full analysis
/dev/null || echo "(no staged files)" read -p "Continue with sync? (y/n): " confirm if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then echo "Sync cancelled." return fi git add -A git commit -m "Sync $(date '+%Y-%m-%d %H:%M')" git push origin main ``` ### Technical Analysis The script claims to show the files that will be added, but it runs: ```bash git diff --cached --name-only ``` before running `git add -A`. The cached diff only lists content already present in the Git index. It does not represent the final set of unstaged and untracked files that `git add -A` will subsequently stage. Although the preceding porcelain status output provides a compact indication of repository changes, the explicitly labeled final file preview is incomplete and potentially misleading. After confirmation, `git add -A` stages all non-ignored additions, modifications, and deletions in the repository. The automatically generated `.gitignore` only excludes a limited set of patterns. Sensitive files with names such as `.env`, token files, configuration files containing secrets, SSH-related files using unlisted extensions, database exports, or other application-specific credentials can therefore be staged and pushed. ### Attack Path 1. A sensitive or unintended file is created inside one of the synchronized repositories. 2. The file does not match the limited `.gitignore` patterns. 3. The file remains untracked or unstaged when `sync.sh` runs. 4. The ...[truncated 1228 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the skill metadata omits that the scripts modify .gitignore, access local repositories, and push to GitHub, users may grant trust under false assumptions and accidentally expose source code or sensitive files. In a sync skill, incomplete disclosure of filesystem and network side effects materially increases the risk of unintended data publication, especially when users are instructed to run setup/sync scripts with elevated trust.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the skill metadata omits that the scripts modify .gitignore, access local repositories, and push to GitHub, users may grant trust under false assumptions and accidentally expose source code or sensitive files. In a sync skill, incomplete disclosure of filesystem and network side effects materially increases the risk of unintended data publication, especially when users are instructed to run setup/sync scripts with elevated trust.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The user-facing documentation is written entirely in Chinese, including the title, description, setup guidance, and support text. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language content in the description and usage sections is presented exclusively in Chinese, which can impose a language requirement on users without opt-in. The policy allows fixed locale/language only when the skill offers a choice or clearly documents a justified region-specific constraint, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script presents user-facing setup instructions such as the banner and installation/login guidance in Chinese, which forces a specific language experience. The policy allows locale constraints only when users are given a choice or the restriction is clearly documented and justified, neither of which appears here.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/setup.sh (reported line 14)May include surrounding context.

sh
if ! command -v gh &> /dev/null; then
    echo "GitHub CLI 未安装"
    echo "请先安装:"
    echo "  Linux: sudo apt install gh"
    echo "  Mac: brew install gh"
    exit 1
fi