Back to skill

Security audit

ShareOne HTML & Document Share Links

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches ShareOne publishing workflows, but it needs review because some scripts can send ShareOne credentials to a host taken from a supplied link and deletion lacks an executable confirmation gate.

Review before installing. Use only canonical ShareOne links or an explicitly intended trusted base URL, avoid collaborator/settings operations on unknown full URLs, and keep API keys scoped or disposable until host validation is fixed. Confirm deletions manually and enable the long-running watcher only for a chosen project, share scope, and trusted handler command.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/manage_collaborators.js:76
Finding

Untrusted Share-Link Hosts Can Receive ShareOne API Credentials

Content
View full analysis

Vulnerability Details

File Location: scripts/manage_collaborators.js:76-82, scripts/update_share_settings.js:84-92, and scripts/shareone_client.js:418-449
Vulnerability Type: Credential disclosure through attacker-controlled API origin
Risk Level: High

Vulnerable Code

js
// scripts/manage_collaborators.js:76-82
if (raw.includes('://')) {
    const parsed = new URL(raw);
    if (!explicitBaseUrl) {
        process.env.SHAREONE_BASE_URL = `${parsed.protocol}//${parsed.host}`;
    }
    path = parsed.pathname;
}
js
// scripts/update_share_settings.js:84-92
if (raw.includes('://')) {
    const parsed = new URL(raw);
    if (!explicitBaseUrl) {
        const host = parsed.hostname.toLowerCase();
        process.env.SHAREONE_BASE_URL = host === 'shareone.vip' || host.endsWith('.shareone.vip')
            ? 'https://shareone.app'
            : `${parsed.protocol}//${parsed.host}`;
    }
    path = parsed.pathname;
}
js
// scripts/shareone_client.js:418-449
async function buildShareOneRequest(apiPath, options = {}) {
    const targetUrl = appendPath(getBaseUrl(), apiPath);
    const headers = { ...(options.headers || {}) };
    const credentialMode = await detectCredentialMode();

    if (credentialMode.mode === CREDENTIAL_MODE_SUDOWORK_PROXY && options.authRequired !== false) {
        delete headers['X-API-Key'];
        delete headers['x-api-key'];
        return {
            url: process.env.SUDOWORK_AUTH_PROXY_URL,
            options: {
                ...options,
                headers: {
                    ...headers,
                    Authorization: `Bearer ${process.env.SUDOWORK_AUTH_PROXY_TOKEN}`,
                    'X-Secret-Namespace': 'service:shareone',
                    'X-Remote-URL': targetUrl,
                    'X-Auth-Scheme': 'header',
                    'X-Auth-Header': 'X-API-Key',
                    'X-Secret-Key': 'X-API-Key'
                },
            },
        };
    }

    if (op
...[truncated 3026 chars]
Remediation
View remediation

Remediation Suggestions

  1. Never infer the API origin from a share-link input. Parse only the resource reference and keep the API origin fixed to the configured ShareOne endpoint.
  2. Require full share URLs to use HTTPS and an explicit allowlist of canonical ShareOne hostnames.
  3. Reject unknown hosts instead of treating them as custom API deployments.
  4. If custom deployments are a required feature, accept their origin only through a separate, explicit --base-url option accompanied by clear user approval.
  5. Keep credentials scoped per origin. Never reuse the production ShareOne API key for an arbitrary custom deployment.
  6. Apply the same centralized URL validation to every script that accepts a full ShareOne link.
  7. In the Sudowork proxy layer, independently enforce an allowlist for X-Remote-URL; callers should not be able to select an arbitrary credential-injection destination.
  8. Add regression tests proving that arbitrary domains, HTTP URLs, deceptive suffixes, user-info URLs, and lookalike domains are rejected before any authenticated request occurs.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/delete_share.js:45
Finding

Share Deletion Script Does Not Enforce the Required User Confirmation

Content
View full analysis

Vulnerability Details

File Location: scripts/delete_share.js:45-56; documented confirmation requirement at workflows/delete-share.md:7-10
Vulnerability Type: Missing executable authorization gate for a destructive operation
Risk Level: Medium

Vulnerable Code

The workflow declares confirmation to be blocking:

markdown
## 0. Confirmation before deletion (blocking)

Before executing the deletion command, the target link, share ID, or slug must be repeated to the user and explicit confirmation must be obtained. Do not invoke delete_share.js before confirmation.

The executable script only verifies that credentials exist and then immediately issues the deletion request:

js
// scripts/delete_share.js:45-56
(async () => {
    const credentialMode = await detectCredentialMode();
    if (credentialMode.mode === CREDENTIAL_MODE_SUDOWORK_PROXY && apiKey) {
        emitError('ERROR:SUDOWORK_MANAGED_KEY');
    }
    if (credentialMode.mode !== CREDENTIAL_MODE_SUDOWORK_PROXY && !resolveDirectApiKey(apiKey)) {
        emitError('ERROR:KEY_NOT_FOUND');
    }

    const shareRef = encodeURIComponent(extractShareRef(ref));
    const raw = await requestShareOneBuffer(`/api/v1/pages/${shareRef}`, {
        method: 'DELETE',
        apiKey
    });
    console.log(`SHARE_DELETED:${extractShareRef(ref)}`);

Technical Analysis

Deleting a share is an owner-only destructive operation that immediately invalidates its public link. The project documentation correctly describes explicit user confirmation as a blocking prerequisite. However, this prerequisite exists only as an instruction to the agent.

The script has no confirmation parameter, target-bound confirmation token, interactive prompt, or default dry-run mode. Any caller with access to owner credentials can invoke it directly and bypass the promised authorization gate.

Credential possession proves that the caller can authenticate as the owner, but it does not prove that the user appro ...[truncated 1583 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require an explicit confirmation argument bound to the normalized target, such as: --confirm-ref <normalized-reference>
  2. Reject deletion unless the confirmation value exactly matches the reference that will be placed in the API request.
  3. Make dry-run behavior the default. The dry run should display the normalized target and, where available, any dependent pointers that may be invalidated.
  4. Separate planning and execution into two steps, using a short-lived server-issued confirmation token tied to the owner, target, and operation.
  5. Preserve the workflow-level requirement to ask the user, but treat it as defense in depth rather than the only enforcement mechanism.
  6. Add tests showing that direct invocation without confirmation cannot issue a network deletion request.
  7. Log the normalized target and confirmation state without logging API credentials.
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (96)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Event polling with lease management, stdin-delivered event batches, local handler subprocess execution, and ack/release semantics describe a durable event-consumer framework, not a simple publishing skill. In context, this is highly dangerous because it enables persistent external-triggered local execution, increasing the attack surface for command abuse, data exposure, and stealthy automation under the guise of content sharing.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
本文档中所有 `node scripts/xxx.js` 命令的路径都以 **本 skill 的安装目录**(即本 `SKILL.md` 所在目录)为基准。当前工作目录通常是用户的项目目录,直接执行相对路径会失败。执行前先确定 skill 目录,使用绝对路径或先 `cd` 到 skill 目录,例如:

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.insecure_tls_verification (+1 more)

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/agent_watch.js:55

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/proxy_support.test.cjs:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/publish.js:103

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/scode_receive.js:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests/test_agent_watch.js:40

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests/test_api_contracts.js:29

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/proxy_support.test.cjs:49

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/proxy_support.test.cjs:52

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
workflows/download-file.md:35

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
workflows/publish-binary-file.md:33

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
workflows/publish-text-page.md:59

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
workflows/update-share-settings.md:32