Back to skill

Security audit

Lynse Cli

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Lynse API integration, but it can use a configured API key for powerful account actions without mandatory caller checks, confirmations, or API-host validation.

Install only in a private, trusted agent environment. Use a least-privileged Lynse API key, set LYNSE_API_HOST only to the legitimate HTTPS Lynse endpoint, configure owner binding where available, and require explicit confirmation before delete, unbind, team-management, or message-sending actions.

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
SKILL.md:20
Finding

API Credentials Can Be Transmitted to an Untrusted Configurable Host

Content
View full analysis
Header: X-API-Key: $LYNSE_API_KEY ``` ### Technical Analysis The skill directs the agent to send the API key to the host specified by `LYNSE_API_HOST`. It does not require HTTPS, validate the URL scheme, enforce an allowlist of trusted Lynse domains, or prohibit redirects to another host. Environment variables are configuration inputs rather than trust guarantees. If an attacker, compromised installer, or unsafe configuration file controls `LYNSE_API_HOST`, the API key will be placed in the `X-API-Key` header of a request to the attacker's server. Subsequent business requests may also disclose the temporary access token and API key. The declared homepage does not constrain the runtime API destination. The instruction to avoid constructing or guessing the address does not mitigate a malicious preconfigured value. ### Attack Path 1. The attacker modifies the environment, `.env` file, installation configuration, or process launch configuration. 2. The attacker sets `LYNSE_API_HOST` to an attacker-controlled HTTP or HTTPS endpoint. 3. A user asks the agent to perform any Lynse operation. 4. Following the documented authentication procedure, the agent sends a token-exchange request to the configured endpoint. 5. The request includes `LYNSE_API_KEY` in the `X-API-Key` header. 6. The attacker records the API key and can return a fabricated access token or response. 7. If the key remains valid, the attacker reuses it against the legitimate Lynse service within the permissions assigned to that key. ### Impact Assessment Successful exploitation discloses the long-lived API key and potentially temporary access tokens. T ...[truncated 573 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:64
Finding

Optional Caller Identity Enforcement Permits Unauthorized Privileged Operations

Content
View full analysis
java_backend enableModel java_backend unbindDevice java_backend removeUser java_backend sendSms '' java_backend sendEmail '' ``` ### Technical Analysis The documented caller identity check only applies if `LYNSE_OWNER_ID` has been configured. The instructions do not require that variable to exist and do not require the agent to fail closed when the caller's identity cannot be verified. The API key's server-side scopes authorize the credential itself; they do not establish that the person issuing a request to a shared agent is the credential owner. Consequently, any person able to interact with an agent instance may be able to cause it to execute operations using the configured account credentials when owner binding is absent. The skill also documents destructive and externally visible operations without requiring mandatory owner confirmation. These include deleting users or models, unbinding devices, changing account resources, and sending messages. Privacy-oriented output masking does not prevent the underlying API request from executing. ### Attack Path 1. A Lynse API key is configured in an agent deployed in a shared workspace, group conversation, or other multi-user environment. 2. `LYNSE_OWNER_ID` is absent, misconfigured, or unavailable to the agent. 3. An unauthorized participant asks the agent to perform an authenticated operation, such as unbinding a device, deleting a model, removing a user, or sending a message. 4. Because the owner check is conditional, the s ...[truncated 1015 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 53)May include surrounding context.

export LYNSE_API_KEY="dk_your_api_key_here"

方式二:配置文件(复制模板后填入)

cp .env.example .env

text

配置完成后再继续执行用户原本的请求。

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger description is extremely broad, stating the skill should be used even for simple account or file-list queries. In an agent environment, over-broad routing can cause the agent to invoke a networked, credentialed skill unnecessarily, increasing the chance of unintended external API calls, privacy exposure, and actions taken in the wrong context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

文件整体说明和技能描述均固定为中文语境,且未见提供语言/locale 选择或用户 opt-in 机制。若该技能面向通用用户环境,这可能构成语言/locale 策略上的强制约束。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest lists account info, files/transcription/summaries, devices, AI models, team collaboration, and messaging as the intended uses. The documented commands also expose getRoleList and getMenuTree, which are broader system/administrative functions not clearly covered by that description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest description frames the skill as a CLI for calling lynse.ai backend APIs to manage Lynse resources. However, the skill documentation additionally instructs and enables installation behavior such as detecting the host AI environment, copying files into skills directories, creating local .env files, and changing script permissions, which is outside the stated API-operation scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The entire skill document is written in Chinese and does not mention any language choice, translation option, or region-specific scope. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.