Back to skill

Security audit

Scenario First Thinking

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a thinking-framework skill, but it also tells the agent to use undefined memory, publishing/layout pipelines, and to skip normal approval in crisis mode.

Read the routing and pipeline sections before installing. The thinking frameworks themselves are ordinary, but only use this skill in an environment where skill instructions cannot bypass host approvals, cannot write persistent memory without explicit consent, and cannot invoke publishing/layout tools automatically. Prefer a pinned ClawHub installer version.

Vulnerability Patterns
  • 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
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:187
Finding

Crisis Routing Instructs the Agent to Bypass Normal Approval

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 187
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Complete Source Segment (English Translation):

markdown
| Crisis response | Scenario 5 | Prioritize inversion → output an action list and skip normal approval |

Technical Analysis

The crisis-response route explicitly instructs the agent to skip the normal approval process. The trigger is broad and based on language indicating urgency, crisis, or firefighting rather than on a narrowly defined, trusted system condition.

Approval and confirmation controls are security boundaries intended to prevent consequential actions from being performed without authorization. A skill must not weaken these controls merely because a request is described as urgent. The instruction contains no limitation to read-only analysis, no list of permitted actions, and no requirement to preserve host-level authorization and safety checks.

Attack Path

  1. An attacker or untrusted user frames a sensitive request as an emergency.
  2. The skill routes the request to Scenario 5 because it contains crisis-related trigger language.
  3. The Scenario 5 instruction directs the agent to produce an action list while skipping normal approval.
  4. If the host honors this instruction and the agent has access to consequential tools, the requested action may proceed without the confirmation that would ordinarily be required.

Impact Assessment

The skill does not itself grant operating-system privileges. However, it can attempt to alter how an already privileged agent uses its available tools. The resulting scope depends on the host agent's permissions and may include unauthorized file modification, external communications, deployment actions, administrative operations, or other consequential tool calls.

In a correctly designed host, higher-priority safety controls should prevent this instruction from t ...[truncated 146 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the instruction to skip normal approval.
  2. Replace it with an explicit statement that urgency never overrides host authorization, user confirmation, access-control, or safety requirements.
  3. Restrict crisis mode to read-only triage and recommendation generation unless the user separately approves execution.
  4. Define an allowlist of low-risk actions that may be automated, such as collecting diagnostics without modifying state.
  5. Require explicit confirmation before destructive, externally visible, privileged, financial, or irreversible operations.
  6. Add tests verifying that crisis-related trigger words cannot suppress approval gates.

A safer replacement would be:

markdown
| Crisis response | Scenario 5 | Prioritize inversion and produce an action list. Preserve all host safety checks and obtain explicit approval before consequential actions. |

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:186
Finding

Task Content Is Directed into an Undefined Memory Channel Without Safety Controls

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 186
Vulnerability Type: T02: Agent Memory Poisoning
Risk Level: Medium

Complete Source Segment (English Translation):

markdown
| Task planning/prioritization | Scenario 4 | Quadrant matrix → output the task list into Memory_Bus |

Technical Analysis

The skill directs task-planning output into Memory_Bus, but the project does not define that component's scope, lifetime, schema, trust boundary, or sanitization requirements. It also does not require user consent before storage or distinguish transient session state from persistent cross-session memory.

Task lists can contain attacker-controlled text. If Memory_Bus is persistent and later consumed as trusted context or instructions, malicious content may influence future sessions. This creates a memory-poisoning path in hosts where the referenced channel maps to long-term agent state.

The finding is conditional on the host providing a writable and persistent Memory_Bus; this repository contains no implementation proving that persistence exists. Nevertheless, the skill-level instruction requests the unsafe write without appropriate controls.

Attack Path

  1. An attacker submits a task-planning request containing embedded instructions or manipulated task entries.
  2. The request is routed to Scenario 4.
  3. The skill directs the resulting task list into Memory_Bus.
  4. If the host implements this channel as persistent memory, the attacker-controlled content survives beyond the immediate response.
  5. A later agent session retrieves the stored content and may treat it as trusted context, allowing the poisoned entry to influence subsequent decisions or tool use.

Impact Assessment

No direct system privilege is obtained from the repository alone. In a vulnerable host integration, the attacker could gain persistent influence over future agent reasoning within the memory scope availa ...[truncated 360 chars]

Remediation
View remediation

Remediation Suggestions

  1. Default to returning the task list in the current response rather than writing it to memory.
  2. Require explicit user consent before persisting any task content.
  3. Define whether the destination is session-local or persistent; use session-local storage by default.
  4. Store task data as a validated structured schema rather than as executable natural-language instructions.
  5. Record provenance, owner, creation time, expiration time, and trust level for every stored item.
  6. Escape or reject content that attempts to introduce agent directives into data fields.
  7. Ensure retrieved memory is treated as untrusted data and cannot override system, developer, or current-user instructions.
  8. Provide review and deletion mechanisms and enforce tenant isolation.

A safer replacement would be:

markdown
| Task planning/prioritization | Scenario 4 | Use the quadrant matrix and return the task list in the current response. Persist it only with explicit user consent and validated session-scoped storage. |

T08 · Insecure Dependencies

Warning
Location
README.md:10
Finding

Installation Documentation Uses an Unpinned npx Package

Content
View full analysis

Vulnerability Details

File Locations: README.md, line 10; README.zh-CN.md, line 22
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Complete Code Snippet:

bash
npx clawhub install scenario-first-thinking

The same command appears in both installation documents.

Technical Analysis

The documented command invokes clawhub through npx without specifying a package version or integrity value. Depending on the local package-manager state and registry configuration, npx may download and execute the currently resolved release.

Because the resolved package is mutable over time, the code executed during installation may differ from the version reviewed when this project was published. A compromised maintainer account, malicious registry package, unexpected package update, or registry substitution could therefore alter the effective installer payload.

No evidence in the audited repository shows that the current clawhub package is malicious. The issue is the lack of dependency pinning and integrity verification in an execution-bearing installation command.

Attack Path

  1. A user follows the documented installation instructions.
  2. npx resolves clawhub through the configured package registry.
  3. The registry supplies the latest or otherwise resolved package because no exact version is specified.
  4. If that package or its dependency chain has been compromised, its CLI or lifecycle code executes under the installing user's account.
  5. The malicious package can act with the filesystem, network, environment-variable, and process privileges available to that user.

Impact Assessment

Successful supply-chain compromise could execute arbitrary code with the privileges of the user running the installation command. This may permit access to user-readable files, environment variables, development credentials, network resources, and writable project or home-directory co ...[truncated 229 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin clawhub to an exact audited version rather than resolving a mutable latest release.
  2. Document the expected package registry and avoid untrusted registry mirrors.
  3. Verify package integrity through a lockfile, trusted checksum, signature, or equivalent provenance control.
  4. Review the package's dependency tree and lifecycle scripts before recommending execution.
  5. In CI environments, install with least privilege and without unnecessary secrets in the process environment.
  6. Update both installation documents together so that the security guidance remains consistent.
  7. Establish a controlled process for reviewing and deliberately updating the pinned installer version.

Example of a safer version-pinned form:

bash
npx --yes clawhub@AUDITED_EXACT_VERSION install scenario-first-thinking

The placeholder must be replaced with a specifically reviewed release, and version pinning should be combined with registry and integrity verification.

Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (17)

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The README instructs users to run npx clawhub install scenario-first-thinking without pinning a specific version of the package. This creates a supply-chain risk because npx will fetch and execute the latest published package, so a compromised or malicious update to clawhub could run arbitrary code on the user's machine during installation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The scenario trigger words are broad terms like 'Write', 'Urgent', and 'New ideas', which are common in normal conversation and can cause the skill to activate or route behavior too aggressively. In an agent skill, ambiguous invocation scope can lead to unintended tool use, misrouting of tasks, or execution of logic in contexts the user did not intend, which increases the attack surface for prompt-triggering and unsafe automation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This README is entirely in Simplified Chinese and does not indicate whether users may choose another language or locale. Per the policy, language-specific behavior should include user choice or a clearly justified locale constraint.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger condition states the skill should activate for '任何需要思考和决策的任务输入' ('any task requiring thinking and decision-making'), which is so broad that it could match a large portion of user interactions. Over-broad activation increases the chance the skill will run in unintended contexts, potentially hijacking routing, overriding more appropriate skills, or causing unsafe tool use due to premature scenario selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description and the operational instructions are entirely in Chinese, and the skill does not indicate that language selection is optional or limited to a justified Chinese-language context. This can violate language/locale policy because it effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill asserts it is self-contained and does not require external files, but later sections describe dependencies on external pipelines and components such as render flows, Memory_Bus, Layout_Editor, and other content systems. This mismatch can mislead an agent or reviewer about the true execution boundary, causing unreviewed external integrations to be invoked under the assumption the skill is self-contained.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file claims no external file is needed, yet the later workflow requires integration with external resources and processing pipelines for writing, layout, memory, and publishing. This creates an integrity and review gap where operators may skip assessing those downstream systems because the skill advertises itself as standalone.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad and colloquial, such as general terms for strategy, learning, urgency, or ideas, which increases the chance the skill activates on unrelated user input. Unintended invocation is risky here because the skill can route into downstream workflows and prescribe mandatory execution sequences, potentially influencing actions beyond the user's intent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill expands from scenario routing into content-production orchestration and explicitly includes a '跳过常规审批' path for crisis handling. Bypassing normal approval introduces a direct governance and safety control failure, especially when paired with automatic routing into publishing, memory, or action pipelines.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description on L06 is written entirely in Chinese and provides no indication that language choice is optional or limited to a justified region-specific use case. This creates a natural-language policy concern because the skill appears to impose a specific language/locale without user opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger rules for the efficiency/sorting scenario rely on broad everyday phrases such as requests for help or arrangement, which can match many unrelated user prompts. In a routing skill, this can cause the wrong tool chain to execute, degrading reliability and potentially steering users into inappropriate reasoning patterns for their actual task.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The crisis-routing conditions include generic help-seeking language like '怎么办/怎么处理' plus broad risk or time-pressure cues, making accidental activation likely for ordinary troubleshooting requests. Misclassifying normal tasks as crisis mode can push the agent into emergency-oriented reasoning and shortcuts that are not appropriate for the user's real needs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The crisis/救火 scene is intentionally designed for high-pressure situations, but its keyword set includes very common expressions that can appear in routine work discussions. Because this route changes behavior toward rapid response, false positives can distort outputs, reduce deliberation, and amplify mistakes in non-emergency contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The idea-exploration triggers depend on very common conversational phrases like asking whether something is possible, which appear in many non-brainstorming requests. This increases the chance of routing practical or decision-oriented tasks into an exploratory mode, causing mismatch between user intent and tool selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown handbook is written entirely in Chinese and the title provides no indication that other languages are supported. Under the policy, forcing a specific language without user opt-in or an explicitly documented locale constraint 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

All natural-language instructions, trigger examples, and routing logic are presented exclusively in Chinese, with no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-language context. Under the stated policy, forcing a specific language without opt-in can be a language/locale policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.