T09 · Insecure Skill Coding Practices
- Location
SKILL.md:131- Finding
OAuth Credentials Are Exposed Through AI Conversation Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a Meego project-management helper, but it repeatedly tells users to reveal OAuth credential files to an AI assistant and uses privileged, unpinned npm installation patterns.
Review carefully before installing. Do not paste OAuth credentials or credentials.json into any AI chat. Use a dedicated service account, least-privilege OAuth scopes, an unprivileged runtime user, pinned package versions, and a secret manager or direct secure file transfer with restrictive permissions.
SKILL.md:131OAuth Credentials Are Exposed Through AI Conversation Content
SKILL.md:145OAuth Credentials Are Stored Through a Root-Privileged Agent Workflow
SKILL.md:65Unpinned npm Packages Are Installed and Executed with Elevated Privileges
meego-config.example.json:1Example Configuration Encourages Plaintext Storage of Long-Lived Secrets
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.mcporter/credentials.json(本地电脑)预期输出:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.mcporter/credentials.json(本地电脑)预期输出:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.mcporter/credentials.json(本地电脑)预期输出:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.mcporter/credentials.json(本地电脑)预期输出:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.mcporter/credentials.json(本地电脑)预期输出:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.mcporter/credentials.json(本地电脑)预期输出:
The skill instructs the user to display the contents of credentials.json, which contains OAuth access and refresh tokens. Prompting disclosure of that file is effectively asking for secret extraction and materially enables account and data compromise.
授权完成后,在本地电脑执行:
type %USERPROFILE%\.mcporter\credentials.json
# Windows PowerShell:
# Get-Content $env:USERPROFILE\.mcporter\credentials.json
This PowerShell variant also exposes the credential file contents for copy-paste. Since OAuth tokens are bearer credentials, anyone who obtains them can reuse them until expiry and possibly refresh them for continued access.
type %USERPROFILE%\.mcporter\credentials.json
# Windows PowerShell:
# Get-Content $env:USERPROFILE\.mcporter\credentials.json
The cat ~/.mcporter/credentials.json instruction explicitly reveals sensitive OAuth material for onward sharing. In a chat-driven workflow, this creates an unnecessary exfiltration path into logs, transcripts, or third-party systems.
# Mac/Linux:
cat ~/.mcporter/credentials.json
把完整 JSON 内容发给 AI助手(粘贴到聊天里),AI会自动写入服务器的 /root/.mcporter/credentials.json。
This line explicitly asks for the full credential JSON to be sent to the AI assistant and stored on the server. That crosses trust boundaries, exposes long-lived authentication artifacts, and grants the assistant or anyone with transcript access the ability to act as the user against Meego.
cat ~/.mcporter/credentials.json
把完整 JSON 内容发给 AI助手(粘贴到聊天里),AI会自动写入服务器的 `/root/.mcporter/credentials.json`。
> **服务器credentials路径:** `/root/.mcporter/credentials.json`(Linux服务器)
> **本地 credentials 路径:** `~/.mcporter/credentials.json`
The documentation explicitly tells users to paste the full OAuth credentials.json into chat so the AI assistant can write it to the server. This is direct credential exfiltration: bearer tokens and refresh tokens grant access beyond a single command and can be reused, copied, or mishandled outside the user's intended trust boundary.
The skill asks users to paste OAuth credential JSON into chat with no meaningful warning that these are sensitive bearer and refresh tokens. This unsafe prompt pattern can cause accidental disclosure of long-lived access material to the model provider, logs, plugins, or other systems handling the conversation.
Instructing users to provide full OAuth credentials so the AI can place them on /root/.mcporter/credentials.json gives the assistant access to reusable authentication secrets and enables persistence on a privileged path. In context, this is more dangerous because the skill is for operational access to a project system, so the stolen tokens can be used to read or modify business data.
The troubleshooting section again tells users to export credentials, which exposes OAuth tokens for manual handling. Requiring users to reveal raw secret material increases the chance of leakage through terminal history, screenshots, clipboard sync, or chat transmission.
第二步:导出 credentials
# 本地电脑执行
type $env:USERPROFILE\.mcporter\credentials.json
第三步:发给 AI助手,AI自动写入服务器 /root/.mcporter/credentials.json
This line instructs the user to send exported credentials to the AI assistant for placement on the server. That is a direct secret-sharing workflow and creates an unnecessary high-risk trust dependency on the assistant and conversation handling pipeline.
type $env:USERPROFILE.mcporter\credentials.json
**第三步:发给 AI助手**,AI自动写入服务器 `/root/.mcporter/credentials.json`
---
The error-handling guidance repeatedly normalizes sending refreshed credentials to the AI assistant whenever auth breaks or tokens expire. That turns troubleshooting into an ongoing credential collection channel and broadens the skill from Meego operations into secret handling without necessity or clear safeguards.
The troubleshooting flow reinforces the practice of exporting credentials and sending them to the AI assistant, which increases the chance of repeated secret disclosure and persistence in chat history. Because refreshes may happen regularly, the pattern can continuously renew the assistant's access to the user's project account.
The token refresh section explicitly instructs users to send updated credentials to the AI for server updates, effectively making the AI a credential relay and repository. That is unnecessary for the stated purpose and exposes both access and refresh tokens to unauthorized retention or reuse.
The token-refresh guidance asks users to export the newest credentials file, again surfacing bearer and refresh tokens for manual transfer. Repeated exposure of refreshed credentials extends the effective attack window and makes persistent unauthorized access more likely.
# 本地执行,导出最新 credentials
type $env:USERPROFILE\.mcporter\credentials.json
把新 credentials 发给 AI助手 更新到服务器。
Documenting that the server-side OAuth token file is 'AI助手写入' confirms the design expects the assistant to handle and place secrets. That institutionalizes insecure secret handling and makes the skill materially more dangerous because credential access is outside its stated project-management function.
| 环境 | 文件路径 | 用途 |
|------|---------|------|
| 服务器(Linux) | `/root/.mcporter/credentials.json` | OAuth token(AI助手写入) |
| 本地电脑 | `~/.mcporter/credentials.json` | OAuth token(auth 命令自动写入) |
> **配置格式不是** `app_id + app_secret` JSON,而是 OAuth credentials JSON(由飞书授权流程自动生成)。
The skill instructs use of npx @lark-project/meego-mcporter without pinning a specific version, so execution will fetch and run whatever package version is current at invocation time. That creates a software supply-chain risk where a compromised, typosquatted, or newly malicious upstream release could execute arbitrary code in the user's environment.
The skill recommends sudo npm install -g, which executes package installation scripts with elevated privileges. If the package or one of its dependencies is malicious or compromised, this can lead to full system compromise rather than a user-scoped install issue.
# Mac/Linux 终端
sudo npm install -g mcporter
sudo npm install -g @lark-project/meego-mcporter
This second privileged install command compounds the same risk: arbitrary postinstall code would run as root. In combination with unpinned dependencies, this materially raises the chance and severity of supply-chain compromise.
# Mac/Linux 终端
sudo npm install -g mcporter
sudo npm install -g @lark-project/meego-mcporter
验证安装(服务器或本地都行):
This unpinned npx invocation pulls and executes the latest available package at runtime. In a skill that already requests OAuth setup and privileged tooling, that increases the blast radius of an upstream package compromise into credential theft or arbitrary command execution.
Running an unversioned package through npx makes builds and execution non-reproducible and exposes users to silent upstream changes. Because this skill handles project-management access tokens, any malicious update could harvest credentials or manipulate project data.