Back to skill

Security audit

Bestcoffer Ai Redaction

Security checks for vulnerabilities and agentic risk

Overview

This redaction skill does the advertised file upload workflow, but it handles API keys, result links, and logs in ways that can expose sensitive information.

Review before installing. Use this only if you are comfortable sending files and redaction instructions to BestCoffer's external service. Do not paste API keys into chat; configure them only through the platform's secret mechanism. Treat returned task URLs as sensitive, and be aware that local debug logs may retain filenames, file paths, instructions, and result links.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:180
Finding

API Key Solicitation Through Conversation History

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 180-187
Vulnerability Type: Exposure of authentication credentials through plaintext conversation input
Risk Level: Medium

Vulnerable Documentation Excerpt

The following is a faithful English rendering of the complete affected example:

markdown
**Example Conversation 2: New-user guidance**

**User**: I want to redact a file.
**Agent**: To process your file securely, I need access to the BestCoffer AI Redaction Skill. No API key is currently configured. Do you have an API key?
**User**: No.
**Agent**: You can obtain one at https://apiconsole.bestcoffer.com.cn/. After obtaining an API key, return here and tell me your API key so I can redact the file for you.
*(The user obtains a key and returns.)*
**User**: I have registered. My API key is sk-123456.
**Agent**: Thank you. Now upload the file that you want to redact.

This workflow is also reinforced at SKILL.md:121, where the instructions assume that the user enters an API key before uploading a file.

Technical Analysis

The documented workflow explicitly directs users to paste an API key into the conversational interface. Authentication credentials entered into chat can become part of model context, application telemetry, conversation history, support exports, debugging logs, or other storage systems that are not intended to function as secret managers.

This instruction conflicts with the safer guidance at SKILL.md:58-59, which states that marketplace deployments should use platform secrets or environment variables and should avoid asking users to paste API keys into chat. Because both instruction paths exist in the same Skill, an agent following the example or authentication workflow may choose the insecure path.

No hardcoded credential or executable credential-exfiltration logic was identified. The vulnerability is the insecure collection and handling workflow prescribed by the ...[truncated 1336 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove every instruction and example that asks users to enter API keys into chat.
  2. Require API keys to be configured exclusively through the host platform's secret manager, protected Skill configuration, or environment-variable mechanism.
  3. Replace the affected example with instructions that direct the user to a secure configuration interface without requesting that the credential be returned in the conversation.
  4. Add an explicit runtime rule requiring the agent to reject or redact apparent API keys supplied in chat and direct the user to rotate any key already disclosed.
  5. Ensure logs, errors, command output, and returned objects never include credential values.
  6. Apply least-privilege scopes, expiration periods, usage limits, and rotation support to issued API keys.
  7. Add automated documentation checks that fail packaging when phrases requesting secrets in chat are detected.
  8. Reconcile the authentication instructions with the secure configuration guidance at SKILL.md:58-59 so that only one unambiguous secret-handling workflow remains.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
---
name: bestcoffer-ai-redaction
description: 一款专为个人用户设计的智能文件脱敏工具,强调纯个人独立模式。支持通过自然语言指令,脱敏用户上传的文件,对 PDF、Word、图片等多种格式的文件进行快速、精准、安全的隐私信息处理。处理完成后返回查询链接,可查看处理进度和下载结果
author: BestCoffer

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list contains broad, everyday terms such as '脱敏', '屏蔽', and '擦除' that can match many benign conversations unrelated to this skill. In a file-handling skill that uploads user documents to an external service, overbroad activation increases the chance the agent invokes the workflow unexpectedly and solicits or processes sensitive files without sufficiently clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly claims broad global coverage, fuzzy matching, and support for many synonymous natural-language requests without defining strict activation boundaries. This raises the risk of accidental invocation in ambiguous contexts, which is especially dangerous because the skill is designed to collect files and send them to a third-party processing environment.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The workflow tells the agent to have the user provide an API key in chat, even though the runtime and metadata already support secret or environment-based configuration. Asking users to paste credentials into chat risks exposure through conversation logs, agent memory, screenshots, support tooling, and other observers, turning a sensitive secret into ordinary message content.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The example dialogue explicitly normalizes pasting a live API key into the conversation, which trains agents and users into an unsafe credential-handling pattern. Because the skill processes sensitive documents through an external service, compromise of that key could enable unauthorized access, misuse of paid resources, or abuse of the associated account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says uploaded files will be redacted and a query/download link returned, but it does not clearly disclose that files and instructions are sent to an external service for processing. Users may reasonably assume local or first-party handling, which creates informed-consent and privacy risks when sensitive documents are involved.

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 says the agent must not use one wording and prescribes one exact Chinese response as the 'correct' phrasing. This forces a specific language output regardless of the user's language or locale, which is a natural-language policy issue when no opt-in or language choice is offered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The workflow instructs the agent to return a downloadable result URL and possibly resend processed files, but it does not warn about the security implications of external links or downstream sharing. If such links are exposed in chat history, logs, screenshots, or shared channels, sensitive redacted outputs or task metadata could be accessed by unintended parties.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill writes detailed operational data to persistent local log files under the user's home directory and temp directory, including uploaded file names, paths, sizes, raw field names, task URLs, and error details. Because this skill handles redaction workflows and uploads user documents to a remote service, those logs can expose sensitive document metadata and potentially internal filesystem structure to other local users, support tooling, backups, or later compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill transmits the uploaded file, user-supplied redaction instruction, and bearer API key to hard-coded external domains (bestcoffer.com.cn) without any in-code consent flow or disclosure. More seriously, it AES-encrypts the API key with a hard-coded key/IV and embeds the result as a 'k' query parameter in the returned task URL, which can leak via logs, browser history, referrers, screenshots, and intermediaries.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill reads API credentials from process.env (apiKey, API_KEY, OPENCLAW_SKILL_API_KEY), which gives it ambient access to secrets not supplied directly by the caller. In isolation that is common practice, but in this skill the secret is then used to call an external service and is also transformed into a query parameter for a returned URL, increasing the sensitivity of granting environment access.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
dist/index.js:2