Back to skill

Security audit

Github Api Toolkit Free

Security checks for vulnerabilities and agentic risk

Overview

This GitHub API helper is mostly purpose-aligned, but it repeatedly shows commands that would send a GitHub token to non-GitHub hosts and recommends broad token permissions.

Review before installing. Use only fine-grained GitHub tokens limited to the exact repositories and permissions needed, and do not run any example that sends Authorization headers anywhere except https://api.github.com. Replace the incorrect hosts before use, avoid workflow scope unless explicitly needed, and revoke any token already used with the affected examples.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:71
Finding

GitHub Personal Access Token Disclosed to Non-GitHub Network Destinations

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 71, 88, 92, 98, 104, 117, 121, 127, 133, 139, 152, 156, 162, 168, 181, 185, 189, 213, 226, 238, 275, 283, and 300
Vulnerability Type: Credential disclosure through incorrect API destinations
Risk Level: Critical

Vulnerable Code

Representative complete vulnerable requests include:

bash
curl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.user
bash
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.user/repos?sort=updated&per_page=10"
bash
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
python
response = requests.get(
    'https://api.user/repos',
    headers=headers,
    params={'sort': 'updated', 'per_page': 10}
)

Technical Analysis

The Skill is intended to access the GitHub REST API, whose correct base URL is https://api.github.com. The document correctly uses that destination in some later examples, but 23 other examples attach the GITHUB_TOKEN bearer credential to unrelated or invalid hosts such as api.user, api.repos, and api.search.

TLS only protects a request while it travels to the selected destination; it does not prevent the destination server from reading the Authorization header. If one of these names resolves directly, through a configured DNS search suffix, or through attacker-influenced DNS or proxy infrastructure, the resulting server can receive the complete GitHub token. Even when the names do not resolve, instructing an agent to forward a credential to an unapproved host violates destination binding and least-privilege requirements.

The behavior is unnecessary for the declared GitHub integration functionality. All authenticated requests should be restricted to the exact GitHub API hostname. The risk is aggravated by the Skill's recommendation that users grant broad repo, read:org, and workflow scopes.

...[truncated 1470 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace every affected destination with an endpoint under the canonical base URL https://api.github.com.
  2. Construct requests from a fixed base URL rather than repeating manually entered hostnames.
  3. Parse and validate every outbound URL before attaching credentials. Require:
    • The https scheme.
    • An exact hostname match of api.github.com.
    • No embedded user information.
    • An expected port.
  4. Do not forward Authorization headers during redirects. Disable automatic redirects or revalidate the destination after every redirect.
  5. Prefer fine-grained GitHub tokens restricted to the specific repositories and permissions required by each operation.
  6. Remove blanket recommendations for repo, read:org, and workflow access. Document operation-specific permissions instead.
  7. Add automated documentation tests that extract URLs from command and Python examples and reject credential-bearing requests to unapproved hosts.
  8. Ensure logs, command tracing, exception output, and debugging tools redact the Authorization header.
  9. Revoke and replace any token that has already been used with an affected example, then inspect GitHub audit and security logs for unauthorized activity.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (34)

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The skill requires a Personal Access Token and provides instructions that normalize handing high-value GitHub credentials to an exec-capable automation context. Because such tokens can grant broad access to private code, issues, PRs, and possibly workflows, mishandling them can result in repository compromise or unauthorized changes.

Content

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

md
### 认证机制

所有API调用需要Personal Access Token(PAT)认证:

## 输入格式
| 参数名 | 类型 | 必填 | 说明 |

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The step-by-step guidance to create and copy Personal Access Tokens increases the likelihood that users will provision long-lived credentials and place them into an agent-operated environment. In the context of this skill's exec capability and remote-write operations, overprivileged PATs substantially increase the impact of accidental exposure or misuse.

Content

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

md
### Step 1:获取Token

1. 登录GitHub,进入Settings → Developer settings → Personal access tokens
2. 生成新token,勾选所需scope(建议`repo`、`read:org`)
3. 复制token,保存到安全位置

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs users to provision a Personal Access Token with broad scopes such as repo and workflow, which can grant extensive access to private repositories and automation pipelines. In the context of an exec-capable agent skill, encouraging over-scoped credentials materially increases the blast radius if the token is mishandled, logged, or used unexpectedly.

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

export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"

...

验证token有效性

curl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.user

text

Token权限建议:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

技能描述和免费版限制部分将该版本定位为仓库、Issue、PR、分支/提交管理,并明确写明“不支持GitHub Actions API”。但认证权限建议中又要求 workflow scope,并注明“管理Actions工作流”,这向使用者传达了该免费版具备 Actions 管理能力,与已声明能力边界不一致。

Content

No source excerpt is available for this finding.

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

bash
# 列出认证用户的仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.user/repos?sort=updated&per_page=10"
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \

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

bash
# 列出认证用户的仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.user/repos?sort=updated&per_page=10"
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \

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

bash
# 列出认证用户的仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.user/repos?sort=updated&per_page=10"
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \

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

bash
# 列出认证用户的仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.user/repos?sort=updated&per_page=10"
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \

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

md
# ...
# 查看指定仓库
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.repos/owner/repo"
# ...
# 创建新仓库
curl -X POST -H "Authorization: Bearer $GITHUB_TOKEN" \