Back to skill

Security audit

iStore Build OpenClash

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it asks for broad GitHub credentials and creates a write-capable build pipeline that can publish privileged router installers from unverified remote code.

Review this carefully before installing. Do not paste a broad classic GitHub PAT into the agent; prefer a fine-grained, single-repository, short-lived token or make the repository changes yourself. Inspect the workflow before running it, avoid enabling repository-wide write permissions or workflow PR approvals, and only run generated router installers if the downloaded binaries are pinned and verified.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:19
Finding

Repository-wide GitHub permissions exceed the Skill's functional requirements

Content
View full analysis
" \ -H "Accept: application/vnd.github+json" \ https://api.github.com/repos///actions/permissions/workflow \ -d '{"default_workflow_permissions":"write","can_approve_pull_request_reviews":true}' ``` The generated workflow also requests write access: ```yaml permissions: contents: write ``` ### Technical Analysis Creating a workflow file requires write access to the selected repository, and publishing a release requires repository contents write access for the relevant job. It does not require: - A classic PAT with broad `repo` access across every repository available to that token. - Write permissions as the default for every workflow in the repository. - Permission for GitHub Actions to approve pull-request reviews. The `can_approve_pull_request_reviews` setting is unrelated to building or publishing OpenClash. Enabling it expands the authority of all workflows in the repository and can weaken branch-protection controls when combined with a compromised or attacker-controlled workflow. Although the authorization header is sent to `api.github.com`, which is consistent with the declared repository-management operation, the requested scope and repository-wide permission changes violate least privilege. ### Attack Path 1. The user creates or supplies a classic PAT with the `repo` scope. 2. The Skill receives that token and uses it to modify the selected repository. 3. The Skill enables write permissions by default for repository workflows and permits workflow-based pull-request approvals. 4. An attacker compromises a dependency, modifies another work ...[truncated 814 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/build-openclash.yml:299
Finding

Workflow-dispatch inputs are interpolated directly into shell source

Content
View full analysis
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
references/build-openclash.yml:307
Finding

Mutable and arbitrary remote executables are packaged without authenticity verification

Content
View full analysis
/dev/null 2>&1; then tar -xzf tmp_core/core.pkg -C tmp_core elif tar -tf tmp_core/core.pkg >/dev/null 2>&1; then tar -xf tmp_core/core.pkg -C tmp_core fi CORE_BIN="$(find tmp_core -type f -maxdepth 2 -perm -111 2>/dev/null | head -n1)" [ -z "$CORE_BIN" ] && CORE_BIN="$(find tmp_core -type f -name 'clash*' 2>/dev/null | head -n1)" cp -f "$CORE_BIN" "openclash-cores/${CORE_NAME}" chmod +x "openclash-cores/${CORE_NAME}" ``` The default payload follows the same trust model: ```bash curl -L "$CLASH_META_URL" -o "tmp_core/core.tar.gz" tar -xzf "tmp_core/core.tar.gz" -C "tmp_core" CORE_BIN="$(find tmp_core -type f -maxdepth 2 -perm -111 2>/dev/null | head -n1)" cp -f "$CORE_BIN" "openclash-cores/${CORE_NAME}" chmod +x "openclash-cores/${CORE_NAME}" ``` The executable is later installed into a privileged router directory: ```bash mkdir -p /etc/openclash/core cp -f "$CLASH_CORE" /etc/openclash/core/ chmod 755 /etc/openclash/core/"$CLASH_CORE" chown -R root:root /etc/openclash/core/ ``` ### Technical Analysis The URLs under `raw.githubusercontent.com` point to the mutable `master` branch. A later upstr ...[truncated 2186 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
references/build-openclash.yml:54
Finding

GitHub Actions dependencies are referenced by mutable tags

Content
View full analysis
Remediation
View remediation
``` 2. Record the corresponding release version in a comment for maintainability. 3. Use Dependabot or Renovate to propose reviewed SHA updates. 4. Minimize third-party actions, especially in jobs holding write-capable tokens. 5. Separate build and publication into distinct jobs with different permissions. 6. Give checkout and artifact-building jobs `contents: read`; grant `contents: write` only to the narrowly scoped release job. 7. Verify artifact hashes between the build and release jobs so the publishing action cannot silently substitute files. 8. Consider using GitHub CLI or a small reviewed script for release publication instead of a third-party action with repository write access. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (29)

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The skill instructs the user to provide a Personal Access Token directly to the agent, which is a request for a highly sensitive credential. Because the token has repo-related power, exposure can allow unauthorized repository access, code changes, workflow abuse, and potential downstream supply-chain impact.

Content

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

md
## 工作流程

1. **收集配置** — 请求用户的 GitHub 仓库地址和 Personal Access Token
2. **写入 workflow** — 通过 GitHub API 直接创建 `.github/workflows/build-openclash.yml`
3. **设置 Workflow permissions** — 通过 GitHub API 开启 Read and write permissions

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs the agent to request and handle the user's GitHub Personal Access Token in plain language for repository writes and permission changes. This creates a clear secret-handling anti-pattern: the agent becomes a conduit for a high-value credential that can be used to alter code, workflows, and potentially other repository assets.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The skill tells the user to generate a classic Personal Access Token with repo permission, encouraging use of a broad-scope, long-lived secret. This increases blast radius if the token is leaked and is especially risky because the skill's purpose is to perform repository modifications and permission changes.

Content

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

md
## 使用前提

- 已在 GitHub 上 fork `istoreos/istoreos`
- 生成了 Personal Access Token(需开启 `repo` 权限)

## 获取 GitHub Token

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

The prompt explicitly asks the user to submit a repository URL together with a Personal Access Token for pushing code and changing settings. In this context, the credential request is more dangerous because the skill is not merely reading metadata; it is performing authenticated writes and privilege modifications on the user's repository.

Content

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

md
当用户触发此 skill 时,要求提供:

- **GitHub 仓库地址**:格式 `https://github.com/YOUR_USER/istoreos.git`
- **Personal Access Token**:用于推送代码和设置仓库权限

---

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
# 从 references/build-openclash.yml 读取内容,然后通过 API 创建文件

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/build-openclash.yml (reported line 61)May include surrounding context.

yaml
run: echo "date=$(date)" >> "$GITHUB_OUTPUT"

      - name: 准备环境
        run: |
          sudo apt-get update
          sudo apt-get install -y makeself unzip curl jq
          rm -rf artifact/installer

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/build-openclash.yml (reported line 64)May include surrounding context.

yaml
run: |
          sudo apt-get update
          sudo apt-get install -y makeself unzip curl jq
          rm -rf artifact/installer
          mkdir -p openclash-ipk artifact/installer staging

      - name: 下载 OpenClash 包并解析版本

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/build-openclash.yml (reported line 129)May include surrounding context.

yaml
echo "✓ 下载成功: apk 格式(已验证为有效 ipk)"
            else
              echo "! apk 文件格式无效,不是标准的 ipk 包"
              rm -f openclash-ipk/luci-app-openclash.ipk
              DOWNLOAD_SUCCESS=0
            fi
          else

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/build-openclash.yml (reported line 476)May include surrounding context.

yaml
# 温和地刷新 LuCI 缓存(不重启服务,避免丢失登录状态)
          refresh_luci() {
            # 清理缓存文件
            rm -f /tmp/luci-indexcache 2>/dev/null || true
            rm -rf /tmp/luci-modulecache/* 2>/dev/null || true
            
            # 优先使用 luci-reload(如果可用)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/build-openclash.yml (reported line 477)May include surrounding context.

yaml
refresh_luci() {
            # 清理缓存文件
            rm -f /tmp/luci-indexcache 2>/dev/null || true
            rm -rf /tmp/luci-modulecache/* 2>/dev/null || true
            
            # 优先使用 luci-reload(如果可用)
            if command -v luci-reload >/dev/null 2>&1; then

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/build-openclash.yml (reported line 477)May include surrounding context.

yaml
refresh_luci() {
            # 清理缓存文件
            rm -f /tmp/luci-indexcache 2>/dev/null || true
            rm -rf /tmp/luci-modulecache/* 2>/dev/null || true
            
            # 优先使用 luci-reload(如果可用)
            if command -v luci-reload >/dev/null 2>&1; then

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/build-openclash.yml (reported line 477)May include surrounding context.

yaml
refresh_luci() {
            # 清理缓存文件
            rm -f /tmp/luci-indexcache 2>/dev/null || true
            rm -rf /tmp/luci-modulecache/* 2>/dev/null || true
            
            # 优先使用 luci-reload(如果可用)
            if command -v luci-reload >/dev/null 2>&1; then

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/build-openclash.yml (reported line 609)May include surrounding context.

yaml
echo "GitHub Actions运行ID: ${{ github.run_id }}" >> version.txt
          echo "构建选项: ${{ inputs.build_option }}" >> version.txt

          rm -rf artifact/installer/*
          mv -f "$OUTPUT" artifact/installer/
          mv -f version.txt artifact/installer/
          echo "构建产物:"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is designed to directly write a workflow into the user's repository and then enable write-level workflow permissions, yet it does not clearly warn about the security implications of changing CI configuration or expanding automation privileges. Malicious or unsafe workflow content could later execute with elevated repository capabilities, affecting code integrity, releases, and supply-chain trust.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to collect a GitHub Personal Access Token with repo scope and use it to modify a repository, but provides no warning about credential sensitivity, minimum scope, secure handling, or alternatives. This is dangerous because it normalizes sharing long-lived secrets with the agent and creates a direct path to credential misuse or repository compromise if the token is exposed, retained, or mishandled.

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

bash
# 从 references/build-openclash.yml 读取内容,然后通过 API 创建文件
curl -s -X PUT \
  -H "Authorization: token <TOKEN>" \
  -H "Accept: application/vnd.github+json" \
  -H "Content-Type: application/json" \

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

md
-H "Authorization: token <TOKEN>" \
  -H "Accept: application/vnd.github+json" \
  -H "Content-Type: application/json" \
  https://api.github.com/repos/<USER>/<REPO>/contents/.github/workflows/build-openclash.yml \
  -d '{
    "message": "Add OpenClash build workflow",
    "content": "<BASE64_encoded_content>"

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 · references/build-openclash.yml (reported line 82)May include surrounding context.

yaml
-H "Authorization: token <TOKEN>" \
  -H "Accept: application/vnd.github+json" \
  -H "Content-Type: application/json" \
  https://api.github.com/repos/<USER>/<REPO>/contents/.github/workflows/build-openclash.yml \
  -d '{
    "message": "Add OpenClash build workflow",
    "content": "<BASE64_encoded_content>"

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 · references/build-openclash.yml (reported line 88)May include surrounding context.

yaml
-H "Authorization: token <TOKEN>" \
  -H "Accept: application/vnd.github+json" \
  -H "Content-Type: application/json" \
  https://api.github.com/repos/<USER>/<REPO>/contents/.github/workflows/build-openclash.yml \
  -d '{
    "message": "Add OpenClash build workflow",
    "content": "<BASE64_encoded_content>"

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 · references/build-openclash.yml (reported line 199)May include surrounding context.

yaml
-H "Authorization: token <TOKEN>" \
  -H "Accept: application/vnd.github+json" \
  -H "Content-Type: application/json" \
  https://api.github.com/repos/<USER>/<REPO>/contents/.github/workflows/build-openclash.yml \
  -d '{
    "message": "Add OpenClash build workflow",
    "content": "<BASE64_encoded_content>"

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 · references/build-openclash.yml (reported line 201)May include surrounding context.

yaml
-H "Authorization: token <TOKEN>" \
  -H "Accept: application/vnd.github+json" \
  -H "Content-Type: application/json" \
  https://api.github.com/repos/<USER>/<REPO>/contents/.github/workflows/build-openclash.yml \
  -d '{
    "message": "Add OpenClash build workflow",
    "content": "<BASE64_encoded_content>"

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 · references/build-openclash.yml (reported line 202)May include surrounding context.

yaml
-H "Authorization: token <TOKEN>" \
  -H "Accept: application/vnd.github+json" \
  -H "Content-Type: application/json" \
  https://api.github.com/repos/<USER>/<REPO>/contents/.github/workflows/build-openclash.yml \
  -d '{
    "message": "Add OpenClash build workflow",
    "content": "<BASE64_encoded_content>"

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This API call changes repository Actions settings to grant default workflow write permissions and permit pull request review approval behavior, materially increasing what automation can do in the repository. In the context of creating a workflow, this privilege expansion is dangerous because a compromised or malicious workflow can make persistent, trusted changes to repository content and development processes.

Content

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

curl -s -X PUT
-H "Authorization: token "
-H "Accept: application/vnd.github+json"
https://api.github.com/repos///actions/permissions/workflow
-d '{"default_workflow_permissions":"write","can_approve_pull_request_reviews":true}'

text

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 · references/build-openclash.yml (reported line 62)May include surrounding context.

yaml
- name: 准备环境
        run: |
          sudo apt-get update
          sudo apt-get install -y makeself unzip curl jq
          rm -rf artifact/installer
          mkdir -p openclash-ipk artifact/installer staging

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 · references/build-openclash.yml (reported line 63)May include surrounding context.

yaml
- name: 准备环境
        run: |
          sudo apt-get update
          sudo apt-get install -y makeself unzip curl jq
          rm -rf artifact/installer
          mkdir -p openclash-ipk artifact/installer staging