Back to skill

Security audit

opencli-adapter-author

Security checks for vulnerabilities and agentic risk

Overview

This is a real adapter-authoring workflow, but it gives agents broad access to browser session credentials and captured private responses without enough scoping or consent guardrails.

Install only if you are comfortable letting the agent work inside active browser sessions for sites you are authorized to inspect. Avoid using it on sensitive personal, financial, or enterprise accounts unless you can supervise what cookies, tokens, response bodies, and fixtures are captured; clear ~/.opencli caches and fixtures after use.

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 (3)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/api-discovery.md:205
Finding

Broad Enumeration of Browser Cookies and Storage Credentials

Content
View full analysis
{const[k,v]=x.split('=');o[k]=v;return o},{})" ``` ```bash opencli browser eval "Object.keys(localStorage).map(k=>k+' => '+localStorage.getItem(k).slice(0,50))" ``` ### Technical Analysis The discovery workflow enumerates every script-readable cookie and returns every local-storage key together with the first 50 characters of its value. It does not initially restrict access to known authentication keys such as a specific CSRF token or session-cookie name. This violates least-privilege principles because adapter discovery normally requires identifying and using only the credential associated with the selected endpoint. The output may include unrelated session identifiers, bearer tokens, personal preferences, tenant identifiers, or credentials belonging to other applications hosted under the same origin. Because these values are returned through `opencli browser eval`, they may also enter terminal output, agent context, conversation logs, or diagnostic records. ### Attack Path 1. A user opens an authenticated target site in the browser session. 2. The agent encounters an authenticated API and follows the token-discovery procedure. 3. The cookie command returns all non-HttpOnly cookies for the current document. 4. The storage command returns every local-storage key and a portion of every value. 5. Unrelated credentials become visible to the agent and may be retained in tool output or logs. 6. A malicious or compromised adapter-authoring process could reuse the exposed values outside the intended API request. ### Impact Assessment The exposed scope is limited to cookies accessible to page JavaScript and storage associated with the current origin. HttpOnly cookies are not exposed by the first ...[truncated 388 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/adapter-template.md:180
Finding

Cookie Adapter Template Collects and Forwards the Entire Domain Cookie Set

Content
View full analysis
`${k}=${v}`).join('; '); } async function fetchHtml(url, { cookie, encoding = 'utf-8', headers = {} } = {}) { const resp = await fetch(url, { headers: { 'User-Agent': 'Mozilla/5.0', 'Accept-Language': 'zh-CN,zh;q=0.9', Referer: `${BASE}/`, ...(cookie ? { Cookie: cookie } : {}), ...headers, }, redirect: 'follow', }); ``` ### Technical Analysis The template queries both the host and root-domain cookie stores, merges every returned cookie by name, serializes the complete set, and manually attaches it to a Node-side request. This approach does not limit collection to the authentication cookies required by the endpoint. It may include analytics identifiers, CSRF values, unrelated application sessions, feature flags, or cookies whose original path and subdomain restrictions would have prevented them from being sent by a normal browser request. Manual serialization also discards browser-enforced cookie attributes and selection behavior. The helper accepts a URL argument without independently verifying that its origin matches `BASE` or `HOST`. Although the supplied example uses a fixed same-origin URL, copied adapters could pass anothe ...[truncated 1148 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/api-discovery.md:50
Finding

Authenticated Network Response Bodies Are Persisted Without Mandatory Redaction

Content
View full analysis
``` The documented workflow states that network capture includes response bodies, status values, and content types. It also states that captures are persisted at: ```text ~/.opencli/cache/browser-network/.json ``` with a default retention period of 24 hours. ### Technical Analysis The Skill supports authenticated adapters for private resources, including watchlists, viewing history, favorites, user timelines, and tenant-specific APIs. Running network discovery in such a session can therefore capture complete private response bodies. The capture is automatically persisted locally for later `--detail` access. The documentation does not require redaction before this cache is written, does not exclude authenticated responses, and does not specify encryption or restrictive file permissions. A separate fixture policy requires removing cookies, tokens, and personal fields before saving fixtures, but that policy does not cover this automatic network cache. Response bodies can themselves contain user identifiers, email addresses, private activity, tenant data, embedded access links, or reflected tokens. ### Attack Path 1. The user authenticates to a target site in the browser session. 2. The target page requests a private API resource. 3. The agent runs `opencli browser network`. 4. The tool captures the complete authenticated response body. 5. The capture is written to the workspace cache for up to 24 hours. 6. Another local process, later agent session, backup process, or user with access to the same account may read the cached private content. ### Impact Assessment The accessible data is limited to response b ...[truncated 317 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (16)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `references/adapter-template.md` | Step 9 文件结构 + 活例子 `convertible.js` |

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

These sections provide step-by-step methods to extract and reuse authentication material from cookies, localStorage, session state, and JS bundles, including guidance for bypassing normal browser protections by reading from CDP cookie jars. In the context of adapter authoring for arbitrary sites, this materially enables credential misuse and unauthorized API access if applied to targets without clear permission.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill directly instructs the agent in Chinese ('你是要给一个站点写 adapter 的 agent') and the rest of the document is written in Chinese, which imposes a specific language/locale on operation. There is no indication that the user can opt into another language or that the constraint is justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s instructional content is written as a directive in Chinese, establishing a single required language for the skill documentation/template without any opt-in or alternative locale. The policy allows fixed locale behavior only when clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The example request sets Accept-Language: zh-CN,zh;q=0.9, which forces a specific language/locale in network behavior. There is no indication that the user can choose the locale or that the locale restriction is required for a documented regional purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document explicitly instructs users to inspect authentication cookies and tokens from document.cookie, browser storage, and CDP cookie jars, but provides no guardrails about authorization, consent, secure handling, or redaction. In a skill for building adapters against third-party sites, this guidance can normalize credential harvesting and increase the chance that sensitive session material is copied, logged, or reused beyond its intended scope.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The fallback workflow escalates from observation to interception, culminating in installInterceptor-based man-in-the-middle style capture of responses when signatures cannot otherwise be obtained. That is bypass-oriented tradecraft: it teaches users to let the page authenticate and then siphon the protected response, which can defeat intended access controls and anti-automation measures.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire markdown file is written in Chinese and provides operational guidance without indicating that other languages are supported or that Chinese is required for a region-specific purpose. This creates a natural-language locale policy issue because users are implicitly forced into a specific language with no opt-in or alternative.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The playbook's operative instructions are written in Chinese and assume Chinese-language use, but there is no statement that the skill is region-specific or that users may opt into another language. This can violate language/locale policy when a skill imposes a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Line L011 states "camelCase,全英文", which is a natural-language rule forcing a specific language for field names. The policy allows locale or language constraints only when the skill offers choice or clearly documents a justified region-specific need, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file is entirely written as an instruction document in Chinese and does not indicate that language selection is optional or constrained by a documented regional requirement. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document explicitly notes endpoints for watching history and favorites that require a logged-in session, but it gives no privacy warning, consent guidance, or data-minimization constraints. In the context of an adapter-authoring skill, this can normalize collection of highly sensitive behavioral data from authenticated accounts and make it easier for downstream adapters to access user activity without clear safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation instructs adapter authors to perform authenticated browser-backed requests using cookies, including the identity-bearing xq_a_token, but does not warn that these requests may access user-specific data or operate in a logged-in context. In a skill designed to build adapters, this increases the chance of unintentionally collecting account-scoped data, exposing private watchlists or timelines, or normalizing unsafe handling of session credentials.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The markdown instructions are written entirely in Chinese and do not indicate that another language is available or that Chinese is a deliberate opt-in. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This markdown file is written primarily in Chinese while also embedding English labels such as field names and section titles, but it does not state that the skill is intended only for Chinese-speaking users or offer any language/locale option. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file’s instructional content is written entirely in Chinese and does not indicate that language selection is optional or limited to a China-specific audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.