Back to skill

Security audit

黑石写作助手·中长篇小说版

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate fiction-writing skill, but it stores a long-lived cloud access token locally and includes a risky self-update flow, so it should be reviewed before installation.

Install only if you trust the Blackstone service and are comfortable with a long-lived cloud token being stored in local WorkBuddy configuration. Keep cloud mode on 'ask' unless you truly want automatic syncing, review any update prompt carefully, and revoke the device from the Blackstone connect page if the machine or config is exposed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
references/account.md:118
Finding

Non-expiring bearer credential stored in plaintext client configuration

Content
View full analysis

Vulnerability Details

File Location: references/account.md:118-138
Vulnerability Type: Plaintext storage of a long-lived bearer credential
Risk Level: High

Vulnerable Code Segment

The relevant instructions, translated into English, are:

json
{
  "blackstone": {
    "type": "http",
    "url": "https://blackstone.wansu.tech/mcp",
    "headers": {
      "Authorization": "Bearer bst_..."
    }
  }
}
text
WorkBuddy: Write the WorkBuddy MCP server configuration. Determine its
configuration file by checking, in order:

~/.workbuddy/mcp.json
~/.workbuddy/config.json
~/.workbuddy/settings.json

Use the first file that exists. If none exists, create a file under
~/.workbuddy/ using the format of existing configuration files in that
directory. Merge mcp_config into the mcpServers object.

1. Read and parse the original file before writing.
2. Replace the complete existing blackstone entry, including the old credential.
3. After writing, read the file again and confirm that the Authorization value
   matches the newly issued value.

The related credential-lifetime instruction at references/account.md:201 states that the device credential does not expire and must be revoked manually.

Technical Analysis

The Skill directs the Agent to place a bearer token directly inside a normal JSON configuration file. It does not require owner-only file permissions, encryption at rest, use of an operating-system keychain, or use of a client-managed secret store.

A bearer credential grants access based solely on possession. Because the credential is documented as non-expiring, disclosure creates a durable compromise until the author notices the issue and manually revokes the device. Re-reading and comparing the complete Authorization value also unnecessarily places the secret back into the Agent or file-tool processing context.

Writing this credential is necessary for the ...[truncated 1478 chars]

Remediation
View remediation

Remediation Suggestions

  1. Store the bearer token in the operating system's credential manager or a WorkBuddy-managed secret store rather than embedding it in ordinary JSON.
  2. If a configuration file must reference the credential, store only a secret identifier or environment-variable reference.
  3. If plaintext storage cannot be avoided, create the file with owner-only permissions and verify that existing files are not readable by groups or other users.
  4. Replace non-expiring credentials with short-lived, scoped access tokens backed by a separately protected refresh mechanism.
  5. Restrict the token to only the MCP operations required by this Skill and bind it to the intended service audience.
  6. Support automatic rotation and immediate revocation after suspected disclosure.
  7. Do not re-read or compare the complete token after writing. Verify the connection entry and compare a non-sensitive fingerprint supplied by the service.
  8. Ensure logs, tool traces, backups, diagnostics, and error messages redact the complete Authorization value.

T08 · Insecure Dependencies

Error
Location
references/updates.md:45
Finding

Remote update archive is extracted before archive safety and integrity validation

Content
View full analysis

Vulnerability Details

File Location: references/updates.md:45-59
Vulnerability Type: Unsafe remote update extraction and supply-chain handling
Risk Level: High

Vulnerable Code Segment

The update procedure, translated into English, is:

text
Only execute the following steps after the author explicitly agrees to update:

1. Confirm that the target is the Blackstone Skill directory.
2. Download the .tar.gz referenced by tarball_url into a temporary directory.
3. Extract it into another temporary directory without directly overwriting the
   currently used Skill directory.
4. Verify each sha256 value, the file count, the Skill name, and the version.
   Abandon the update if any check fails.
5. After successful validation, replace the Blackstone Skill directory and remove
   old Skill files not present in the new manifest.
6. Update skill-state.json.
7. Report the installed version and validation result.

Prefer tar.gz:

tar -xzf <archive> -C <temporary-directory>

Technical Analysis

The procedure performs integrity validation only after extracting the remotely supplied archive. It does not instruct the Agent to inspect archive entries before extraction or reject:

  • absolute paths;
  • parent-directory traversal components such as ..;
  • symbolic links or hard links escaping the staging directory;
  • device nodes, named pipes, or other special files;
  • duplicate or ambiguous paths;
  • unexpected permissions or ownership metadata.

Consequently, a malicious archive may affect paths outside the intended temporary directory before the post-extraction hash check occurs. Rejecting the package afterward does not reverse external file modifications that occurred during extraction.

The manifest supplies tarball_url, but this procedure also does not explicitly require validating the final download URL against the declared blackstone.wansu.tech allowlist after redirect ...[truncated 1950 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require the manifest URL, archive URL, and every redirect destination to use HTTPS and the exact approved hostname.
  2. Authenticate the manifest with a digital signature rooted in a public key bundled with the reviewed Skill. Do not rely exclusively on hashes delivered by the same server as the archive.
  3. List archive entries before extraction and reject absolute paths, .. components, malformed paths, duplicate paths, links, and special files.
  4. Normalize every destination path and verify that it remains beneath a newly created staging directory.
  5. Extract using a library or tool configuration that explicitly prevents path traversal, ownership restoration, unsafe permissions, and link following.
  6. Create the staging directory with restrictive permissions and unpredictable naming.
  7. Perform replacement atomically only after package authentication, archive-structure validation, hash verification, expected-file validation, and Skill identity validation all succeed.
  8. Keep the existing Skill directory unchanged until the new directory is fully verified, then use an atomic rename with a rollback copy.
  9. Run the updater with no more filesystem privileges than required to replace the Skill's own directory.
  10. Add tests containing absolute paths, traversal entries, symlink escapes, hard-link escapes, special files, redirect-to-unapproved-host cases, and mismatched manifests.
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (29)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/account.md (reported line 14)May include surrounding context.

md
| 不要说 | 要说 |
|---|---|
| MCP / MCP 服务器 / 连接器 | 云端故事记忆 |
| access token / 令牌 / API Key | 授权(不出现名词,只说"授权这台设备") |
| 配置 `.mcp.json` / 环境变量 | WorkBuddy 已经帮你设置好;其他客户端需要在设置界面粘贴一次连接配置 |
| 扣 1 分 / 计费 | 每次云端记忆操作 0.01 元 |
| 402 / insufficient_balance | 云端记忆余额用完了 |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger scope is extremely broad, covering generic requests like writing novels, continuing chapters, editing prose, checking consistency, and even account and billing help. Broad triggers can cause the skill to activate unexpectedly for ordinary conversation, increasing the chance that it reads local files, initiates remote-account flows, or steers the session into this skill when the user did not intentionally select it.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language description and trigger guidance are written as if the skill operates in Chinese by default, with Chinese trigger phrases and user-interaction patterns, but no language choice or opt-in is offered. This can violate language/locale policy when used in environments where users have not chosen Chinese as their interaction language.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill gives conflicting instructions about cloud configuration and authorization. Early text says only WorkBuddy auto-merges config and other clients require the user to manually paste configuration, but later it says the assistant must initiate authorization, retrieve authorization, and write local config automatically. In a security-sensitive flow involving credentials and local files, ambiguity about who writes configuration and on which clients can cause unauthorized config changes, misconfiguration, or accidental credential handling beyond the user's expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quick-start section states that no special command is needed and that broad natural-language requests should immediately trigger the skill. This lowers the barrier for unintended activation and can lead to the assistant entering file-management or cloud-connected workflows without a clear user opt-in specific to this skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains user-facing operational instructions entirely in Chinese, and nowhere indicates that the skill is Chinese-only or offers an alternative language/locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The example startup phrase "黑石,开始写作" is very generic and lacks strong boundaries distinguishing this skill from ordinary conversation or other writing-related capabilities. If used as activation guidance, it increases the chance of accidental invocation, especially in systems that rely on phrase matching or intent inference.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guidance says a single natural-language phrase should be enough to launch the skill and emphasizes automatic activation from broad user intents. In a router or multi-skill environment, this can cause the fiction-writing skill to be invoked when the user did not explicitly intend it, leading to context capture, workflow hijacking, or interference with other skills handling adjacent requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file is entirely written as Chinese-only user guidance and examples, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-language audience. Under the policy rule for natural-language violations, forcing a specific language without opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The instruction text is written as a direct response policy and tells the agent how to answer the user's questions, but it does not offer any option to respond in the user's preferred language. This creates a language/locale policy concern because the skill appears to mandate Chinese responses by default rather than allowing user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The section '面向作者的用词' instructs the skill to use specific Chinese wording and forbids alternative terms, effectively enforcing a language/locale choice in user-facing communication. The file does not offer the user any language preference or opt-in mechanism, so this is a natural-language policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown skill forces a specific language/locale for all instructions and outputs, but it does not state that Chinese is optional, user-selected, or required for a justified region-specific purpose. Under the policy rule, a fixed language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The entire document instructs the agent how to answer users in Chinese, including example trigger questions and prescribed reply text, but it does not state that Chinese is optional or limited to a Chinese-language context. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The FAQ says that beyond saying the explicit skill name, users can 'directly提出小说创作、正文写作、续写、修改、立意、人物、主题、结构、场景或风格请求,也应该自动进入对应流程.' This is a wide set of common writing-assistance requests and does not define limits or negative examples, increasing the chance of unintended invocation during ordinary conversation about writing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs sending user feedback to a remote endpoint even when the user is not connected to the cloud, and says this can be done without any credentials. While it does require consent before submission, the guidance does not clearly disclose that free-form feedback plus client metadata such as OS, client name, and version will leave the device and be transmitted to a third party, which creates a privacy and transparency risk. In a writing assistant context, feedback may also accidentally contain sensitive manuscript details unless tightly minimized.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire skill file is written only in Chinese and presents operational instructions exclusively in that language, with no indication that the user may choose another language or that the skill is limited to a Chinese-only context. This can violate language or locale policy when a skill implicitly forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. This markdown file presents all guidance in Chinese and does not indicate that the user can choose another language or that the file is intentionally limited to a Chinese-only regional context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation phrase "黑石,开始写作" is broad and likely to be used in normal conversation, which can cause the skill to trigger when the user did not intend to invoke this specific capability. In a skill that can read prior context and potentially write local files, ambiguous activation increases the risk of unintended actions, especially if later turns proceed with minimal confirmation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The recommended template uses generic verbs such as 开始、设计、分析、写作、续写、修改、润色、检查、保存, which are common authoring words and do not create clear invocation boundaries. This can cause accidental routing into the skill from ordinary chat requests and is more concerning here because the skill supports file operations and continuity checks over user content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quickstart instructs the agent to write confirmed content into a local file and then verify it, but it does not prominently warn users that this modifies local data or require an explicit confirmation immediately before the write. In a writing assistant, accidental overwrites, writes to the wrong path, or persistence of model-generated text can damage user work and create integrity issues even without malicious intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document is written as prescriptive operational guidance entirely in Chinese, including an instruction on how to answer user questions. There is no indication that the user can choose another language or that the Chinese-only behavior is limited to a justified region-specific context, which may violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This markdown file contains user-facing instructions exclusively in Chinese from start to finish. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly 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
95% confidence
Finding

This skill file presents all instructional content in a single language and does not indicate that the user can choose another language or that the skill is intentionally limited to Chinese-language use. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file presents all instructions, workflow, and output requirements exclusively in Chinese. Under the language/locale policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains all operational guidance in Chinese and does not indicate that users may choose another language or that the skill is intentionally limited to a Chinese-language audience. 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.