Back to skill

Security audit

Add Flashcard

Security checks for vulnerabilities and agentic risk

Overview

This flashcard skill needs Review because it depends on an unprovided local Python executor and vague reporting integrations, so its real behavior cannot be verified from the package.

Install only if you already trust the exact local capability_executor.py that will be imported and understand what it sends to MetaClaw, SEAL, or any confidence-tracking system. The skill should ideally bundle or pin its executor, narrow its triggers, and document telemetry and data changes before normal use.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:23
Finding

Unverifiable External Capability Executor Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 23-44
Vulnerability Type: Untrusted and unpinned external executable dependency
Risk Level: Medium

Vulnerable Code

markdown
## Implementation
Calls `memento_flashcards_capability()` from `capability_executor.py`

## Usage
```python
from capability_executor import execute_capability
execute_capability("add flashcard")

Dependencies

  • capability_executor.py in D:\coze-local\db
  • capability_executor.py (registration + dispatch)

Linkage

  • Reports failures to skill_evolver (MetaClaw) and seal_coevolution (SEAL)
  • Confidence tracked via capability_executor
text

### Technical Analysis

The Skill delegates its core behavior to `capability_executor.py`, but that module is not included in the audited project. The documented Python example imports it through the generic module name `capability_executor`, without a package-relative path, pinned version, integrity hash, signature, or other source-verification mechanism.

Python resolves such imports through its module search path. If an attacker can place a different `capability_executor.py` in the working directory or another earlier search-path location, the attacker's module can be imported instead of the intended implementation. Because top-level Python module code runs during import, code execution may occur even before `execute_capability()` is called.

The external implementation is also documented as reporting failures and tracking confidence through other systems. Since neither the executor nor those integrations are included, their network destinations, transmitted data, authorization model, and side effects cannot be verified. This is a supply-chain and dependency-trust weakness; the available evidence does not establish that the missing implementation is itself malicious.

### Attack Path

1. An attacker obtains write access to the Skill's working directory, a user-controlled
...[truncated 1409 chars]
Remediation
View remediation

Remediation Suggestions

  1. Include the reviewed capability_executor.py implementation within the Skill package so its behavior can be audited and distributed atomically.
  2. Place the implementation in a uniquely named package and use an explicit package-relative import rather than a generic top-level import.
  3. If the dependency must remain external, distribute it through a trusted registry and pin its exact version and cryptographic hash.
  4. Verify dependency signatures or hashes before loading the module, and fail closed when verification fails.
  5. Remove the machine-specific D:\coze-local\db dependency path and avoid adding writable or user-controlled directories to PYTHONPATH or sys.path.
  6. Run the capability with least privilege and restrict its filesystem, credential, and network access to what flashcard management requires.
  7. Document all telemetry destinations, transmitted fields, retention rules, and consent controls for MetaClaw, SEAL, and confidence tracking.
  8. Add tests confirming that module resolution selects only the approved implementation and that the capability cannot access unrelated files or transmit unauthorized data.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (1)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The additional trigger phrases are broad and overlap with generic study or memory-related requests such as "flashcard," "记单词," and "复习." This can cause unintended invocation of the flashcard capability when a user is discussing studying generally, leading to incorrect tool activation and unintended data creation or workflow side effects.

Content

No source excerpt is available for this finding.