Back to skill

Security audit

Privacy Policy

Security checks for vulnerabilities and agentic risk

Overview

The privacy policy generator is mostly coherent, but the package also includes an unrelated security-tool script that persistently logs command inputs and provides unsafe security commands.

Review this package before installing. The policy-generation script itself is simple and local, but the extra privacy-policy security utility should not be relied on for scanning, encryption, hashing sensitive values, or password generation, and its local history file may retain sensitive command arguments.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:35
Finding
Plaintext Logging and Disclosure of Sensitive Command Arguments<![CDATA[ ## Vulnerability Details **File Location**: `scripts/script.sh:5-7`, `scripts/script.sh:35`, and `scripts/script.sh:59-69` **Vulnerability Type**: Sensitive data exposure through plaintext logging **Risk Level**: Medium ### Vulnerable Code ```bash DATA_DIR="${PRIVACY_POLICY_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/privacy-policy}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" ``` ```bash _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } ``` ```bash cmd_encrypt() { echo " Encrypting: $1" _log "encrypt" "${1:-}" } cmd_hash() { echo "$1" | sha256sum | cut -d" " -f1 _log "hash" "${1:-}" } ``` ### Technical Analysis The `encrypt` and `hash` commands accept values that users may reasonably expect to be confidential, such as passwords, tokens, personal information, or encryption plaintext. Both commands pass the complete raw argument to `_log`, which appends it to the persistent `history.log` file without redaction. The `encrypt` command also prints the supplied value to standard output and does not perform encryption. Consequently, sensitive input can be exposed through both terminal output and persistent command history. The script creates the data directory without explicitly applying restrictive permissions. Its effective permissions depend on the invoking user's `umask` and any pre-existing directory or file permissions. The behavior is also not disclosed in the skill documentation. ### Attack Path 1. A user invokes a command with sensitive content, such as: ```bash privacy-policy hash "SensitivePassword" ``` or: ```bash privacy-policy encrypt "ConfidentialText" ``` 2. The command forwards the original argument to `_log`. 3. `_log` appends the unredacted value to: ```text $DATA_DIR/history.log ``` 4. For `encrypt`, the plaintext is additionally printed to the terminal. 5. A local process, user, backup system, diagnostic bundle, or support workflow capable of reading the ...[truncated 650 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never log raw arguments supplied to cryptographic or security-related commands. 2. Restrict audit entries to non-sensitive metadata, such as the command name, timestamp, and success status: ```bash _log() { printf '%s %s\n' "$(date '+%m-%d %H:%M')" "$1" >> "$DATA_DIR/history.log" } ``` 3. Remove plaintext output from `cmd_encrypt`. 4. Remove the `encrypt` command unless genuine, authenticated encryption can be implemented using a reviewed cryptographic tool and an appropriate key-management design. 5. Apply restrictive permissions before creating storage: ```bash umask 077 mkdir -p -m 700 "$DATA_DIR" touch "$DATA_DIR/history.log" chmod 600 "$DATA_DIR/history.log" ``` 6. Prefer reading secrets from standard input without echoing rather than accepting them as command-line arguments, because command-line arguments may be visible in process listings or shell history. 7. Document all persistent logging behavior and provide a mechanism to disable or securely delete logs. 8. Add regression tests confirming that sensitive inputs never appear in standard output or `history.log`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:72
Finding
Password Generator Uses a Non-Cryptographic Pseudorandom Number Generator<![CDATA[ ## Vulnerability Details **File Location**: `scripts/script.sh:72-76` **Vulnerability Type**: Predictable generation of security-sensitive credentials **Risk Level**: Medium ### Vulnerable Code ```bash cmd_password() { python3 << 'PYEOF' import random, string print("".join(random.choices(string.ascii_letters + string.digits + "!@#", k=16))) PYEOF _log "password" "${1:-}" } ``` ### Technical Analysis Python's `random` module uses the Mersenne Twister pseudorandom number generator. It is designed for simulation and general-purpose randomness, not for generating passwords, authentication tokens, or other security credentials. Mersenne Twister is deterministic and does not provide cryptographic resistance to state recovery or output prediction. If an attacker can obtain sufficient related PRNG output or otherwise determine the generator state or seed, subsequent values can be predicted. A command explicitly presented as a password generator must use an operating-system-backed cryptographically secure random number generator. The generated password is 16 characters long and uses letters, digits, and three symbols. The principal vulnerability is not the alphabet but the unsuitable randomness source. ### Attack Path 1. A user runs the `password` command and adopts the generated value as an account credential. 2. The password is generated using Python's non-cryptographic `random` module. 3. Under circumstances where an attacker can determine or reconstruct the relevant PRNG state or seed, the attacker narrows or predicts generated output. 4. The attacker tests the predicted password against the account where the victim reused the generated credential. 5. If successful, the attacker obtains the privileges of that account. Exploitation requires information sufficient to infer the PRNG state or generated output; the code alone does not provide remote access or automatically disclose the password. ### Impact Assessment A successfully predicted ...[truncated 441 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `random.choices` with Python's `secrets` module, which uses an operating-system-backed cryptographically secure randomness source: ```bash cmd_password() { python3 <<'PYEOF' import secrets import string alphabet = string.ascii_letters + string.digits + "!@#" print("".join(secrets.choice(alphabet) for _ in range(20))) PYEOF _log "password" } ``` 2. Consider increasing the default length to at least 20 characters while allowing users to configure it according to service requirements. 3. Ensure policy requirements are met without weakening randomness, including any required lowercase, uppercase, digit, or symbol classes. 4. Do not log the generated password or any value derived from it. 5. Add automated tests that reject use of `random`, timestamp-based seeds, process IDs, or other predictable entropy sources in credential generation. 6. Advise users to store generated credentials in a reputable password manager and avoid password reuse. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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)

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The help text presents the tool as a bilingual generator, and the generated policies consistently include Chinese alongside English throughout the output. Because the skill forces a specific locale/language format with no user opt-in or configuration, it conflicts with the policy requirement to avoid imposing a language without user choice.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
We use cookies in compliance with the ePrivacy Directive. Users are
presented with a cookie consent banner upon first visit. Categories:

  • Strictly Necessary: Always active (no consent required)
  • Analytics: Require consent
  • Marketing: Require consent
  • Preference: Require consent
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The script markets itself as a security scanning and hardening tool, but its core commands mostly emit canned status messages and write logs instead of performing the promised security functions. This can create a false sense of protection, causing users to rely on nonexistent scans, audits, or hardening actions and miss real security issues.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The logging helper writes command names and raw arguments to a persistent history file without notice or consent. Users may pass sensitive values such as targets, paths, tokens, passwords, or other secrets on the command line, which would then be silently retained on disk and exposed to other local users, backups, or forensic collection.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The description and body present content in both Chinese and English, but the file does not state that language selection is optional or user-configurable. Under the policy, forcing or assuming a language/locale without opt-in can be a natural-language policy issue.

Scope Creep

Low
Category
Excessive Agency
Content
1.1 Personal Information You Provide

  When you use our services, we may ask you to provide certain personally
  identifiable information, including but not limited to:

  • Full name
  • Email address (${EMAIL} for privacy inquiries)
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Missing User Warnings

Low
Confidence
80% confidence
Finding
The password command generates credentials and then records its invocation via the shared logging helper, but there is no user disclosure that password-related activity is logged. Even if no password value is written, logging security-sensitive command usage can affect privacy expectations.

Static analysis

No suspicious patterns detected.