Back to skill

Security audit

密码生成器(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The skill generates passwords locally, but it also tells the agent to automatically save full generated passwords in a predictable plaintext file.

Review before installing. Use this only if you are comfortable with generated passwords being written to a local plaintext Markdown file, or modify it so history is disabled by default and passwords are stored only in a password manager or secure OS credential store. Avoid invoking it for audits, scanning, API work, or generic automation despite those claims in the artifact.

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

Error
Location
SKILL.md:165
Finding

Generated Passwords Are Stored in Plaintext

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:165-181
Vulnerability Type: Plaintext storage of authentication secrets
Risk Level: High

Vulnerable Code

python
def save_password(password, length):
    """保存密码到本地文件"""
    save_dir = "memory"
    os.makedirs(save_dir, exist_ok=True)
    save_path = os.path.join(save_dir, "passwords.md")

    timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
    entry = f"""
## {timestamp}

- **随机密码**
  - 密码: `{password}`
  - 长度: {length} 位
  - 强度: {evaluate_strength(password)}
"""
    with open(save_path, 'a', encoding='utf-8') as f:
        f.write(entry)

    return save_path

The associated configuration and documentation confirm that password history is intended to be stored at a predictable path:

python
"save_history": True,
"save_path": "memory/passwords.md"

Technical Analysis

The save_password function appends every generated password, in cleartext, to the predictable relative path memory/passwords.md. The file also records timestamps and password metadata.

No encryption, operating-system credential vault, restrictive file-permission handling, retention limit, secure deletion mechanism, or explicit user-consent gate is implemented. Because append mode is used, repeated operation creates an accumulating credential archive.

This behavior conflicts with the document's security assertion that output does not contain keys or tokens. Although Python's secrets module is appropriate for password generation, cryptographically secure generation does not protect a password after it is written unencrypted to disk.

Attack Path

  1. A user invokes the Skill to generate a password.
  2. The user adopts that password for an account.
  3. The Skill passes the password to save_password.
  4. The complete password is appended to memory/passwords.md.
  5. A local process, another user with directory access, a collaborator, a backup or synchronization service, an accidental source-control c ...[truncated 793 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove automatic password-history storage and set save_history to False by default.
  2. Do not write generated passwords to Markdown, logs, command histories, telemetry, or other plaintext destinations.
  3. Return a generated password only through the minimum required protected interface and avoid displaying it longer than necessary.
  4. If persistence is explicitly requested, store the password in an operating-system credential vault or established password manager rather than a project file.
  5. If file-based persistence is unavoidable:
    • Encrypt records using authenticated encryption.
    • Protect encryption keys separately from the encrypted file.
    • Create files with owner-only permissions.
    • Add the storage path to source-control and backup exclusions.
    • Apply short retention periods and provide reliable deletion controls.
    • Require explicit user confirmation before every save.
  6. Remove existing plaintext password-history files and rotate every password that may have been recorded in them.
  7. Update the documentation so its sensitive-output claims accurately reflect actual behavior.
Vulnerability Patterns
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill describes automatic local password history storage but does not prominently warn that this writes live credentials to disk. Silent persistence of secrets materially increases exposure through backups, logs, sync tools, local compromise, shoulder surfing, or accidental file sharing.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The sample code appends plaintext passwords, timestamps, and strength metadata to a predictable markdown log. This is a direct sensitive-data exposure pattern: anyone with local file access, synced backups, repository inclusion, or accidental sharing of the memory directory can recover valid credentials.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The security notes claim output does not contain sensitive data, but the skill explicitly saves generated passwords in plaintext to a local markdown file. This is dangerous because passwords are highly sensitive secrets, and normalizing their storage while denying sensitivity encourages unsafe handling and accidental disclosure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest frames the skill as a simple local password generator, but the description broadens activation into security scanning, compliance auditing, encryption protection, and other unrelated domains. This scope inflation can cause an agent to invoke the skill in contexts where command execution, file access, or other side effects are unnecessary and unexpected, increasing the attack surface and likelihood of misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description includes broad activation triggers such as security detection, compliance audit, vulnerability scanning, and encryption protection, which are unrelated to generating passwords. Overbroad triggers can cause accidental invocation in sensitive workflows and grant the skill influence far beyond its legitimate function.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description states '支持中文交互' as part of the skill behavior, and the document is written as if Chinese interaction is the expected mode without any opt-in or alternative language guidance. This can violate language/locale policy when a specific language is effectively imposed without offering user choice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation states that all operations are local and do not rely on external services, but elsewhere advertises API integration, HTTPS use, and network-related troubleshooting. Contradictory trust claims can mislead users and agents about the real data-flow and security boundary, causing secrets or prompts to be handled under false assumptions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill instructs automatic retention of generated passwords in a persistent local memory file. Persisting credentials by default creates a durable secret store that may be readable by other local users, backup systems, malware, or later agent actions, turning transient secrets into long-lived exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The capability-scope section lists expansive keyword triggers without precise boundaries, effectively encouraging the skill to match loosely related requests. In agent ecosystems, vague trigger conditions can lead to over-selection and unintended execution with file or command tools in contexts the user did not intend.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The default configuration enables history saving and uses a predictable path, making sensitive data persistence both automatic and easy to locate. Predictable secret locations are especially risky in shared workspaces, agent memory folders, source trees, and environments with broad file-read tooling.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The FAQ normalizes storing full password contents in markdown history, reinforcing insecure operational behavior. Documentation that presents plaintext credential retention as ordinary can cause users and downstream agents to adopt unsafe defaults without appreciating the exposure risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises generic file processing, API integration, command execution, and information retrieval capabilities that are not required for a password generator. Unrelated capability expansion makes the skill harder to reason about, increases privilege expectations, and creates opportunities for abuse if an agent treats it as a general-purpose automation surface.

Content

No source excerpt is available for this finding.