T09 · Insecure Skill Coding Practices
- Location
tools/login/login.js:126- Finding
Authentication QR Payload Disclosed to an Unrelated Third-Party Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill matches its stated Aiding Shifu login and work-order purpose, but it handles account tokens and personal data in unsafe, under-disclosed ways that need review before installation.
Do not install this version unless you are prepared to review and contain credential exposure. The publisher should remove the packaged config.json secret, revoke the exposed token, stop sending login payloads to third-party QR services, avoid logging or displaying raw tokens, replace wildcard postMessage token transfer, and store credentials in a protected secret store with clear user consent.
tools/login/login.js:126Authentication QR Payload Disclosed to an Unrelated Third-Party Service
config.json:1Bearer Token and Personal Phone Number Shipped in Plaintext Configuration
tools/login/qr-login.html:345Bearer Tokens and User Information Exposed Through Wildcard Cross-Window Messaging
tools/login/sms-login.html:397Bearer Tokens Persisted in Script-Readable Plaintext Storage
tools/login/sms-login.html:310Phone Number and One-Time Verification Code Transmitted in Request URLs
tools/login/run-login.js:51Authentication Tokens and Raw Login Responses Written to Console Output
The skill metadata and documentation describe a broad platform-management skill, but the analyzed behavior includes risky login-centric actions such as fetching QR content from a third-party service, invoking a local application via exec, and exposing authentication artifacts to console output. This mismatch is dangerous because users and reviewers may grant broad trust and permissions based on the stated purpose while the implemented behavior handles credentials and local execution in ways not clearly disclosed.
Referenced artifact was not completely inspected
**工具路径**:`tools/login/sms-login.html`
Referenced artifact was not completely inspected
**工具路径**:`tools/login/qr-login.html`
This login page explicitly exposes the token to the user interface, clipboard, local storage, and window.opener without any warning or minimization. Authentication tokens are bearer secrets; any unnecessary exposure enables account takeover if another script, window, extension, or local user obtains the value.
The script prints authentication material such as a token or identifier directly to stdout after login. Console output is often captured in terminal history, logs, CI systems, or screen recordings, which can enable session hijacking or unauthorized account access if the token is reusable.
Printing the login token without masking or warning exposes sensitive credentials to anyone with access to the terminal session or its logs. Because this is a login helper, the exposed value is especially sensitive and may grant direct authenticated access to the platform.
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<div class="logo">艾登<span>师傅</span></div>
<div class="subtitle">短信验证码登录 WorkBuddy</div>
<!-- 登录表单 -->
<div id="loginForm">
<div class="form-group">
<label>手机号</label>
The page exposes the authentication token directly in the UI, copies it to the clipboard, stores it in localStorage, and sends it to window.opener using a wildcard target origin. This creates multiple easy exfiltration paths for bearer credentials via XSS, malicious parent/opener windows, shoulder-surfing, browser extensions, or shared-device access; in this skill context, the page is explicitly for platform login, so token theft would directly enable account/session compromise.
The skill explicitly states that access tokens are saved to a local config.json path but does not present this as a user-facing security warning or explain retention, access controls, or risks. Local token storage can enable session theft or unauthorized reuse if the file is readable by other tools, users, or processes on the host.
The skill processes sensitive personal data during login and work-order creation, including phone numbers, customer names, addresses, and potentially technician contact details, but does not clearly warn users about transmission and handling of this data. In this business context, undisclosed collection and transfer of personal information increases privacy, compliance, and misuse risk.
Broad trigger phrases for login can cause the skill to activate unexpectedly during ordinary conversation, increasing the chance that users are funneled into an authentication workflow without clear intent. In a skill that stores tokens and transmits login data, unintended activation raises the risk of accidental credential handling and privacy-impacting actions.
The script sends the full login QR payload URL to a third-party QR generation service, exposing authentication material outside the intended platform. Anyone with access to that URL content may be able to render the QR code and potentially complete or interfere with the login flow, and it also leaks usage metadata to an unrelated external service.
This external transmission sends login-related QR content to https://api.qrserver.com/, a third party unrelated to the primary authentication service. Because the QR encodes the login URL/ticket, the transmission increases exposure of sensitive authentication state and creates unnecessary dependency on an outside service during login.
// 生成二维码图片(使用在线 API)
function generateQrCodeUrl(text) {
// 使用腾讯的 API 生成二维码
return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(text)}`;
}
// 检查登录状态
The skill is described as helping users log in to the 艾登师傅 platform and manage installation-service workflows. While opening a QR image is related to login, this implementation uses OS shell commands through exec() to launch arbitrary paths/URLs, which introduces a general local command-execution capability not inherently required by the skill's stated business purpose.
The script stores the access token and associated user data in plaintext under the user's home directory without warning, consent, or permission hardening. Local malware, other users on a shared system, backups, or accidental disclosure could expose the token and allow unauthorized access to the account or APIs.
The page handles the authentication token in multiple unsafe ways: it displays the token in the UI, stores it in localStorage, and propagates it to another window. For a login flow, this greatly expands the token exposure surface, making theft via XSS, malicious parent/opener windows, shared-device access, or browser extensions much easier.
The page sends authentication-flow data to https://api.qrserver.com/ to create the QR image. In a login skill, external transmission of login URLs is more dangerous because it leaks sensitive workflow data to an unnecessary third party and can aid replay, tracking, or abuse of the login session.
// 生成二维码图片 URL
function generateQrCodeUrl(text) {
return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(text)}`;
}
async function createQRCode() {
The QR code is generated by embedding the login URL into a third-party QR service request, which transmits the login URL to an external domain. Even if the URL is not itself a final token, it is clearly part of the authentication flow and may contain identifiers or one-time login material that should not be disclosed to unrelated third parties.
Multiple user-facing strings are hard-coded in Chinese, and the script does not offer an alternate locale or let the user choose their preferred language. This is a natural-language policy issue because it imposes a specific language on all users without documented justification or opt-in.
The script sends the login URL returned by the platform to a third-party QR generation service, exposing authentication-related login state to an external domain outside the primary service. Even if the URL is intended for scanning, sharing it with a separate provider increases privacy and account security risk because that provider can observe or log the login URL and associated metadata.
console.log('SceneId:', data.data.sceneId);
console.log('请用微信扫码...\n');
const qrUrl = 'https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=' + encodeURIComponent(data.data.url);
const qrPath = path.join(os.tmpdir(), 'aiding-login.png');
https.get(qrUrl, (r) => {
The manifest scope covers aiding-shifu platform login and work-order related tasks, and network access to obtain a login QR code is expected. However, spawning a child process via exec to launch a local file viewer is a broader host-execution capability that is not inherent to that purpose and materially expands what the script can do on the user's machine.
The document language is set to zh-CN and all visible interface text is presented only in Chinese, with no indication that the user can choose another language. This is a natural-language policy concern because it imposes a specific language/locale without opt-in or documented justification.
This code makes an HTTPS request to an external server using a login status endpoint and includes the sceneId in the request path. Although it logs the returned data, there is no user-facing disclosure or confirmation before transmitting this login-related value off-host, which is a safety-relevant network operation.
Natural-language strings in the file, including the title, usage context, status messages, and errors, are presented only in Chinese. This forces a specific language on users without opt-in or a documented justification for the locale constraint.
The document is explicitly marked as zh-CN and all user-facing text is in Chinese, with no indication that users can select another language. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern unless the locale limitation is clearly justified.