Back to skill

Security audit

Gdpr Checker

Security checks for vulnerabilities and agentic risk

Overview

This GDPR checker is mostly local, but it includes under-disclosed security-style commands that can log sensitive inputs and present placeholder actions as real protection.

Review this before installing if you might enter passwords, tokens, personal data, client names, system names, or real compliance evidence. Treat the generated GDPR documents as templates only, do not rely on the security scanning, hardening, encryption, or password features, and clear or avoid the local history log if you test it.

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:24
Finding

Plaintext Logging of Potentially Sensitive Command Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 24–59
Vulnerability Type: Sensitive data exposure through plaintext logging
Risk Level: Medium

Vulnerable Code

bash
_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }

cmd_scan() {
    echo "  Scanning for vulnerabilities..."
    _log "scan" "${1:-}"
}

cmd_audit() {
    echo "  Running audit checklist..."
    _log "audit" "${1:-}"
}

cmd_check() {
    echo "  Checking: $1"
    _log "check" "${1:-}"
}

cmd_report() {
    echo "  Security report generated"
    _log "report" "${1:-}"
}

cmd_harden() {
    echo "  Step 1: Update | Step 2: Firewall | Step 3: Auth"
    _log "harden" "${1:-}"
}

cmd_encrypt() {
    echo "  Encrypting: $1"
    _log "encrypt" "${1:-}"
}

cmd_hash() {
    echo "$1" | sha256sum | cut -d" " -f1
    _log "hash" "${1:-}"
}

Technical Analysis

The _log function appends command arguments directly to history.log without redaction. This is especially unsafe for the encrypt and hash commands because users may reasonably supply passwords, tokens, personal information, or other confidential values.

Despite its name, cmd_encrypt performs no encryption and records the supplied value unchanged. cmd_hash prints a SHA-256 digest but also records the original unhashed input, defeating the confidentiality users may expect from a hashing utility.

The script creates the data directory using mkdir -p but does not establish a restrictive umask or explicitly set permissions on the directory and log file. Actual access therefore depends on the invoking environment's existing permissions and umask.

Attack Path

  1. A user invokes a sensitive operation, such as:
    bash
    gdpr-checker hash 'sensitive-password'
    
    or:
    bash
    gdpr-checker encrypt 'confidential-personal-data'
    
  2. The command passes the or ...[truncated 985 chars]
Remediation
View remediation

Remediation Suggestions

  1. Never log raw payloads supplied to hash, encrypt, password, authentication, or privacy-related commands.
  2. Log only non-sensitive metadata, such as the command name, timestamp, success status, and a generated operation identifier.
  3. If an argument must be represented, replace it with a fixed marker such as [REDACTED]; do not rely on partial masking for secrets.
  4. Establish restrictive permissions before creating storage:
    bash
    umask 077
    mkdir -p -- "$DATA_DIR"
    chmod 700 -- "$DATA_DIR"
    touch -- "$DATA_DIR/history.log"
    chmod 600 -- "$DATA_DIR/history.log"
    
  5. Replace the misleading encrypt placeholder with authenticated encryption implemented through a vetted tool, or remove the command until encryption is genuinely supported.
  6. Add log-retention limits and provide a secure mechanism to delete existing history.
  7. Document that users must not pass secrets as command-line arguments because process listings and shell history can independently expose them. Prefer standard input or a protected file descriptor for sensitive inputs.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:61
Finding

Password Generator Uses a Non-Cryptographic Pseudorandom Number Generator

Content
View full analysis

Vulnerability Details

File Location: scripts/script.sh, lines 61–66
Vulnerability Type: Weak randomness in credential generation
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 is based on the Mersenne Twister pseudorandom number generator. It is designed for simulation and statistical workloads, not for generating passwords or cryptographic secrets. Its output is deterministic from its internal state and does not provide the security guarantees expected of a credential generator.

The use of random.choices therefore violates the requirement that password generation rely on a cryptographically secure source of randomness. A password utility should use the operating system's cryptographic random source through Python's secrets module or random.SystemRandom.

Attack Path

  1. A user invokes the password command and adopts the generated value as an account credential.
  2. The password is produced by the non-cryptographic random generator.
  3. If an attacker can infer or recover sufficient generator state or otherwise compromise its seed/state environment, the attacker can generate candidate outputs.
  4. The attacker tests reconstructed candidates against the service where the password was used.
  5. A successful prediction gives the attacker the permissions of the compromised account.

State recovery is not demonstrated by the audited project itself and requires additional attacker capability. Nevertheless, a password generator must not depend on a PRNG explicitly documented as unsuitable for security-sensitive use.

Impact Assessment

The issue affects credentials created by this command. It does not itself elevate local privileges, but a predictable cre ...[truncated 337 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace random.choices with Python's cryptographically secure secrets module:
    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" "generated"
    }
    
  2. Consider using secrets.token_urlsafe() when a URL-safe machine-generated secret is acceptable.
  3. Increase the default length and allow users to request a stronger length while enforcing a secure minimum.
  4. Avoid recording generated passwords or related sensitive values in logs.
  5. Add automated tests verifying the intended length and character policy, and a code-quality rule prohibiting random for credentials, tokens, keys, or nonces.
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 (6)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The password generator uses Python's random module, which is not cryptographically secure and can produce predictable output under some conditions. Because this tool is branded as security-related, users may trust these generated passwords for real accounts or keys, making weak credential generation especially dangerous in context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description and body text present content in both Chinese and English, but the skill does not state that language selection is optional or user-configurable. This can violate a language/locale policy when users are forced into a specific language presentation without opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script markets itself as a security scanning and hardening tool, but the implemented commands are largely placeholders or generic utilities and do not perform real scanning, auditing, encryption, or hardening. In a security context, this can mislead users into believing protective actions occurred when they did not, creating a false sense of security and potentially delaying real remediation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The logging helper writes command arguments directly into a history file without warning, redaction, or consent. Users may pass secrets, internal hostnames, file paths, or personal data to commands such as check, encrypt, or report, causing unintended local disclosure and possible compliance issues.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The comment line uses Chinese text ("GDPR合规检查工具") in a skill that otherwise emits English output, with no indication that the language choice is optional or region-specific. This can violate language/locale policy expectations when skills force a particular language without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script creates a persistent local data directory and logs command activity by default without any clear necessity stated to the user. Even though this is local rather than remote telemetry, it can expose sensitive operational details, especially if commands later include filenames, targets, or other confidential inputs on shared systems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.