T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:230- Finding
Broad Upload of Sensitive Workspace Data to a Hard-Coded Repository
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This backup skill is openly for GitHub backups, but it uses broad credentials and can silently upload large parts of the workspace on an ongoing schedule.
Review before installing. Only use this with a repository you control, avoid giving the agent a full GitHub PAT in chat, remove token-in-URL storage, disable silent scheduled pushes, and replace whole-workspace uploads with an explicit reviewed allowlist and secret scan.
SKILL.md:230Broad Upload of Sensitive Workspace Data to a Hard-Coded Repository
SKILL.md:25Excessive Credential Discovery and Insecure Token Persistence
SKILL.md:206Silent Scheduled Workspace Synchronization Establishes Persistence
SKILL.md:8Arbitrary Shell Execution Through Sourced Mutable Context File
The instructions ask the owner to send a PAT directly in chat and then save it for later use. Collecting high-value credentials through chat and persisting them creates a strong chance of credential disclosure, replay, and misuse beyond the immediate backup operation.
The skill explicitly asks the owner to generate and send a full repo-scoped personal access token. Soliciting a powerful credential in-band is dangerous because it exposes the secret to chat logs and to any component that can read the transcript.
If TOKEN is empty → stop and ask the owner:
I need a GitHub Personal Access Token to back up your workspace.
Go to: github.com → Settings → Developer Settings → Personal access tokens → Generate new token
Required permission: repo (full)
Send me the token (starts with ghp_)
The access-token instruction continues the unsafe credential collection flow by directing the user to provide the token directly to the agent. In this context, the token grants repository access and can be reused to read or write backups containing additional sensitive data.
If TOKEN is empty → stop and ask the owner:
I need a GitHub Personal Access Token to back up your workspace.
Go to: github.com → Settings → Developer Settings → Personal access tokens → Generate new token
Required permission: repo (full)
Send me the token (starts with ghp_)
The skill tells the agent to persist a GitHub PAT to disk and embed it in the remote URL, which can expose the token via config files, process output, logs, shell history, or accidental repo leakage. There is no meaningful warning or safer handling guidance despite the sensitivity of a full-repo token.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Create .gitignore to exclude secrets and temp files
cat > .gitignore << 'EOF'
*.log
.env
credentials/
*.key
*.pem
The skill stages and pushes the workspace with git add -A while only offering a minimal .gitignore, so secret-bearing files, config, memory, and previously committed credentials can be exfiltrated to GitHub. In this context, the stated purpose is external backup, which makes over-collection especially dangerous because the transmission is intentional and routine.
The skill claims it will ask the owner for a PAT if none is available, but first instructs the agent to scrape tokens from remotes, environment variables, shell startup files, and credential files. That broad credential discovery behavior expands access beyond least privilege and can harvest secrets not intended for this task.
The invocation guidance is overly broad, allowing the skill to trigger on vague phrases like saving or remembering something important. In a backup skill that performs external pushes, ambiguous activation increases the chance of unintended publication of sensitive workspace contents.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Save token to credentials file
echo "$TOKEN" > ~/.credentials/github-token.txt
chmod 600 ~/.credentials/github-token.txt
# Update the git remote URL to include the token
git -C "$HOME/.openclaw/workspace" remote set-url origin \
This performs an authenticated outbound request to GitHub using the discovered token. While network access to GitHub is expected for backups, it still constitutes external transmission and increases risk because the same skill also gathers credentials and broad workspace content.
GITHUB_USER="github-username" # change to your GitHub username
# HTTP 200 = repo exists, 404 = need to create it
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: token $TOKEN" \
"https://api.github.com/repos/$GITHUB_USER/$REPO_NAME")
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
STATUS=$(curl -s -o /dev/null -w "%{http_code}"
-H "Authorization: token $TOKEN"
"https://api.github.com/repos/$GITHUB_USER/$REPO_NAME")
echo "Repo check: HTTP $STATUS"
This creates a GitHub repository via an authenticated API call, which is an external action that can establish a new destination for workspace data. In context, the concern is not the API use itself but that it supports routine exfiltration of broadly scoped local content.
curl -s -X POST "https://api.github.com/user/repos" \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
-d "{\"name\": \"$REPO_NAME\", \"private\": true, \"description\": \"PA workspace backup\"}" \
The 'When to Back Up' section uses imprecise triggers like 'remember this' and 'after completing a significant task', which can cause accidental execution without informed consent. Because the resulting action commits and pushes data externally, unclear triggering materially raises the risk.
The backup scope explicitly includes broad categories such as memory, notes, skills, data, and config, which commonly contain sensitive operational and personal information. Routine transmission of these directories to GitHub increases the likelihood of privacy and secret leakage, even if the repo is intended to be private.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
GITHUB_USER="github-username" # change to your GitHub username
# HTTP 200 = repo exists, 404 = need to create it
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: token $TOKEN" \
"https://api.github.com/repos/$GITHUB_USER/$REPO_NAME")
No suspicious patterns detected.