Back to skill

Security audit

FTTR Operator Copilot

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its FTTR operator-support purpose, but it needs review because it can send an operator bearer token and device data to any configured HTTP or HTTPS endpoint.

Install only if you trust the publisher and can control the runtime environment. Keep FTTRAI_RPC_URL on the official HTTPS endpoint or a trusted internal endpoint, never HTTP, and treat FTTRAI_OPERATOR_AUTH_TOKEN as a privileged secret. Use mark_alerts_as_read only after confirming the alert IDs, because it changes FTTRAI state.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
src/config.js:4
Finding

Operator bearer token can be transmitted to an arbitrary or plaintext endpoint

Content
View full analysis
0) { const err = new Error(`缺少必要环境变量: ${missing.join(", ")}`); err.code = "missing_config"; throw err; } let parsedUrl; try { parsedUrl = new URL(baseUrl); } catch { const err = new Error("FTTRAI_RPC_URL 不是有效 URL"); err.code = "invalid_config"; throw err; } if (!["http:", "https:"].includes(parsedUrl.protocol)) { const err = new Error("FTTRAI_RPC_URL 只支持 http 或 https"); err.code = "invalid_config"; throw err; } ``` From `src/connect.js`: ```js async unary(procedure, body = {}) { const url = `${this.config.baseUrl}${procedure}`; let lastError; for (let attempt = 0; attempt <= this.config.maxRetries; attempt += 1) { const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), this.config.timeoutMs); try { const response = await fetch(url, { method: "POST", headers: { "Authorization": `Bearer ${this.config.token}`, "Content-Type": "application/json", "Accept": "application/json", }, body: JSON.stringify(body), signal: controller.signal, }); ``` ### Technical Analysis The configurable `FTTRAI_RPC_URL` is validated only as an HTTP or HTTPS URL. No check requires TLS, restrict ...[truncated 2497 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
src/tools/diagnostics.js:5
Finding

Offline diagnosis retrieves alerts unrelated to the selected device

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description describes a network/API integration skill with multiple FTTR Copilot operational capabilities. The supplied code chunk does not implement any of those behaviors; it only defines generic utility functions for formatting success/failure results and emitting JSON output. This is a materially different primary purpose, so the description does not accurately represent the actual code behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares access to environment variables and relies on networked API calls, but it does not define any explicit tool scope such as permissions or allowed-tools. In a capability-bearing skill, missing scope boundaries can allow broader-than-necessary execution or make review and enforcement of least privilege difficult.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction "Keep answers in Chinese unless the user asks otherwise" imposes a default language choice rather than offering a neutral user-language selection. This matches the policy category for language/locale constraints because the skill forces a specific language unless the user actively opts out.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The example shows a state-changing operation that marks alerts as read without any warning that it mutates operational data and may hide or suppress visibility of active incidents for other operators. In an operator cloud-control context, normalizing this command as a copy-paste example increases the chance of accidental execution against production alerts, reducing incident awareness and audit clarity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The error message 未知工具 is hard-coded in Chinese, and the CLI also presents a mixed-language interface without offering the user any language selection or opt-in. This is a natural-language policy issue because the skill forces a specific language/locale in user-facing text rather than allowing user choice or clearly documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
71% confidence
Finding

Although most help text is in English, this CLI is branded for a specific copilot context and elsewhere uses Chinese-only user-facing messaging, with no documented locale selection. The absence of any user language choice means the skill's interface behavior is not compliant with the requirement to avoid forcing a specific language/locale without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The thrown error strings are written only in Chinese, which imposes a specific language on users regardless of their locale or preferences. Under the natural-language policy rules, forcing a language without offering choice or documenting a justified locale constraint is a policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code performs an HTTP POST and includes a bearer token plus a JSON-serialized body, which may transmit user or system data to a remote service. In this file there is no confirmation prompt, logging, comment, or docstring disclosing that sensitive data and credentials are sent over the network.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code returns Chinese-language titles, summaries, suggestions, and error messages directly in multiple user-facing responses, which enforces a specific language/locale by default. The file does not offer any mechanism for user language selection or document a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code returns user-facing titles, summaries, suggestions, and error messages in Chinese only, such as "Operator 设备列表" and other Chinese guidance text. The file does not provide any locale selection, fallback, or opt-in mechanism, which is a natural-language locale policy concern under the stated rules.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Beyond the list operation, the file continues to hard-code Chinese-only summaries, suggestions, and validation errors, including device status text and the "不能为空" error. Because these messages are embedded across multiple functions with no visible opt-in or locale choice, the skill enforces a single language for all users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code file contains user-facing natural-language output that is consistently forced to Chinese, including titles, summaries, suggestions, and examples. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code performs multiple remote client.unary calls to retrieve network topology, station statistics, and device details, and includes raw responses plus device identifiers/MAC-related data in returned objects. The file contains no confirmation prompt, logging, comment, or docstring warning that network/device data will be queried and exposed, which meets the missing-warning criteria for code files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

User-facing titles, summaries, suggestions, and error messages throughout the file are written in Chinese, forcing a specific locale in responses. Under the policy, a fixed language is a violation unless the skill offers user choice or the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code returns hardcoded Chinese titles and summaries, which imposes a specific language on users. The policy allows locale constraints only when users can opt in or when the regional limitation is clearly documented and justified, neither of which is evident in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The fault statistics response includes Chinese-only titles and summaries. This is a natural-language policy issue because the skill appears to require a specific language rather than allowing user choice or declaring a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The returned title, summary, and suggestions are all Chinese-only, which forces one locale for end users. Under the stated policy, this should either be optional for users or clearly documented as a justified regional specialization.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The usage examples hard-code Chinese natural-language inputs (卧室网慢, 排查区域离线) in a way that implies a specific language expectation. There is no accompanying note that other languages are supported, nor any justification that the skill is intentionally limited to a Chinese locale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code file documents use of the required environment variable FTTRAI_OPERATOR_AUTH_TOKEN, which is a sensitive credential, but provides no warning or disclosure about secure handling, exposure risks, or that the CLI will use it to authenticate outbound requests. Under the code-file criteria, access to sensitive environment variables should have some visible disclosure via comments, logs, prompts, or accompanying documentation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code reads the FTTRAI_OPERATOR_AUTH_TOKEN credential from the environment, which is a sensitive operation under the warning criteria for code files. The file contains no user-facing log, comment, or docstring explaining that credentials will be accessed, so users reviewing only this code would not receive disclosure here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The error messages "RPC 调用失败", "RPC 调用超时", and related text are hard-coded in Chinese. This creates a locale-specific user experience without any visible opt-in, language selection, or justification that the skill is intended only for Chinese-speaking users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The fallback error message string "未知错误" is hardcoded in Chinese, which imposes a specific language on users without any visible opt-in or locale-selection mechanism. This is a natural-language policy concern because the file does not offer alternative language handling or document a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

Even though this is an error path, the message is still user-visible natural language and is fixed to Chinese. That can violate the language-choice policy when no opt-in or documented locale restriction exists.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.