T09 · Insecure Skill Coding Practices
- Location
scripts/submit_issue.py:11- Finding
Hardcoded GitHub Personal Access Token Exposed in Code and Documentation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/submit_issue.py:11Hardcoded GitHub Personal Access Token Exposed in Code and Documentation
SKILL.md:50Indefinite Scheduled Agent Task Can Perform Autonomous GitHub Comments
SKILL.md:38Diagnostic Logs and Configuration May Be Published Without Secret Redaction
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
- [ ] 准备好预期 vs 实际结果
- [ ] 版本号准备好(查 openclaw --version)
## curl 快速命令
### 搜索现有 issue
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.
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"
HEADERS = {
"Authorization": f"token {TOKEN}",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"
HEADERS = {
"Authorization": f"token {TOKEN}",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"
HEADERS = {
"Authorization": f"token {TOKEN}",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"
HEADERS = {
"Authorization": f"token {TOKEN}",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"
HEADERS = {
"Authorization": f"token {TOKEN}",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"
HEADERS = {
"Authorization": f"token {TOKEN}",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
TOKEN = "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"
REPO = "openclaw/openclaw"
BASE_URL = f"https://api.github.com/repos/{REPO}"
HEADERS = {
"Authorization": f"token {TOKEN}",
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
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']}")
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.