Back to skill

Security audit

笔记工具包基础版

Security checks for vulnerabilities and agentic risk

Overview

This note-management skill is not clearly malicious, but it makes strong local-only privacy claims while also allowing exec, API/network use, callback URLs, and broad credential-check commands.

Review before installing. Use it only if you are comfortable with a notes skill that has exec capability and unclear local-vs-network data handling. Do not run the provided broad environment-variable checks, especially the PowerShell example, and avoid using sensitive notes unless network/API behavior is clarified or disabled.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:174
Finding

Sensitive Environment-Variable Enumeration May Expose Credentials

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 174-181
Vulnerability Type: Sensitive environment-variable reconnaissance
Risk Level: Medium

Vulnerable Code

bash
### 3. 验证配置

配置完成后,可通过以下方式验证是否正常工作:

```bash
# 验证环境变量是否设置
echo "配置检查:"
env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/"  # Linux/macOS
# 或 PowerShell
# Get-ChildItem Env: | Where-Object {$_.Name -match "API|KEY|TOKEN"} | Format-Table

Technical Analysis

The skill instructs the agent to enumerate all environment variables whose names contain broad secret-related terms such as API, KEY, TOKEN, or SECRET. This operation is not required for the stated local note-management functionality and violates least-privilege principles by inspecting unrelated process credentials.

The Linux/macOS command masks values before displaying the result, but it still reveals the names and presence of potentially sensitive credentials. More critically, the PowerShell command formats complete matching environment-variable objects without redacting their values. Depending on the PowerShell output format, credential values may therefore be exposed directly in the terminal, agent context, conversation transcript, or execution logs.

No credential transmission or unauthorized account access is implemented in the audited file. Nevertheless, exposing a valid credential can enable subsequent access with the permissions assigned to that credential.

Attack Path

  1. A user or agent follows the skill's configuration-verification instructions.
  2. On Windows, the agent executes the provided PowerShell command.
  3. PowerShell locates every environment variable whose name contains API, KEY, or TOKEN.
  4. The formatted output may include both the names and values of matching variables.
  5. These values enter the agent's context, terminal history, session transcript, or centralized execution logs.
  6. Any party able to read those ou ...[truncated 861 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove broad environment enumeration from the configuration-verification procedure.

  2. Identify the exact environment variable required by the skill and test only whether that variable exists.

  3. Never print, format, log, or return credential values to the agent or user.

  4. Use a presence-only check, such as:

    bash
    if [ -n "${EXPECTED_API_KEY:-}" ]; then
      echo "EXPECTED_API_KEY is configured"
    else
      echo "EXPECTED_API_KEY is not configured"
    fi
    
    powershell
    if (Test-Path Env:EXPECTED_API_KEY) {
        Write-Output "EXPECTED_API_KEY is configured"
    } else {
        Write-Output "EXPECTED_API_KEY is not configured"
    }
    
  5. Prevent command output containing secrets from being added to conversation transcripts, telemetry, or persistent logs.

  6. Document the minimum required credential scope and recommend short-lived, least-privileged tokens.

  7. If the PowerShell command has previously been executed, inspect relevant transcripts and logs and rotate any credentials that may have been exposed.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The FAQ states that all data remains local and is never uploaded, yet later dependency sections state that some features require network access and external APIs. For a note-taking skill handling potentially sensitive personal knowledge, this contradiction is dangerous because users may provide confidential content believing it cannot leave the machine.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest and summary claim 'purely local storage' and imply privacy protection, but the skill later declares exec capability, external API dependence, and network-required features. This mismatch can mislead users and downstream agents into handling sensitive note data under false privacy assumptions, increasing the risk of unintended exfiltration.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The documentation says the FREE version does not support batch operations, but the skill grants unrestricted exec and presents command-style examples without enforceable limits. In practice, an agent with exec can perform arbitrary loops, scripts, or bulk file operations, so the documented restriction is not a real safety boundary and may create false trust about operational scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The line states that users can trigger the skill through natural-language instructions, but it does not define a bounded set of trigger phrases or clarify what should not trigger the skill. For a markdown skill file, this lack of specificity can cause everyday phrasing to overlap with activation conditions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger text says to use the skill for '数据分析、报表生成、统计洞察、数据可视化', which is both broad and mismatched with the rest of the document’s note-management functionality. This ambiguity makes it unclear when the skill should activate and increases the chance of unintended invocation for generic analytics requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill describes operation and dependencies but omits a clear user warning that some features require network access and external APIs. In the context of notes and knowledge management, this omission is risky because users may include sensitive content without realizing that an agent could send it to third-party services.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The display name and the entire instructional content are presented in Chinese, with no indication that users may choose another language or locale. Under the policy, a fixed language without user opt-in can be a natural-language policy issue unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.