Back to skill

Security audit

Grammar Check

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly looks like a grammar helper, but it also ships an unrelated command script that can silently store user-provided text locally.

Install only if you are comfortable with a grammar skill that includes an extra local utility script. Avoid passing private drafts, business text, credentials, or sensitive search terms to the grammar-check command unless the publisher clarifies or removes the local data/history storage behavior.

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

Warning
Location
scripts/script.sh:6
Finding

Undisclosed Plaintext Persistence of User-Supplied Data

Content
View full analysis
> "$DATA_DIR/history.log"; } cmd_run() { echo " Running: $1" _log "run" "${1:-}" } cmd_config() { echo " Config: $DATA_DIR/config.json" _log "config" "${1:-}" } cmd_status() { echo " Status: ready" _log "status" "${1:-}" } ``` ```bash cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "${1:-}" } cmd_remove() { echo " Removed: $1" _log "remove" "${1:-}" } cmd_search() { grep -i "$1" "$DB" 2>/dev/null || echo " Not found: $1" _log "search" "${1:-}" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "${1:-}" } cmd_info() { echo " Version: $VERSION | Data: $DATA_DIR" _log "info" "${1:-}" } ``` ### Technical Analysis The script persistently records raw command arguments in `data.log` and `history.log`. Arguments supplied to commands such as `run`, `add`, and `search` may contain private text, search terms, or other sensitive information. The declared grammar-checking documentation does not disclose this persistence or define retention and deletion behavior. The script creates the data directory and files without explicitly applying restrictive permissions. Their effective permissions therefore depend on the invoking user's `umask`. With a commonly used `022` umask, the directory can be traversable and the files can be readable by other local users. The `_log` function also writes raw arguments with `echo`. An argument containing newline characters can create forged or misleading log entries because no escaping or structured ...[truncated 1253 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a grammar-checking assistant, but the analysis indicates it also performs local storage, record management, and logging behaviors unrelated to that stated purpose. That mismatch is dangerous because users may invoke a seemingly harmless language tool without understanding it persists data or performs broader utility actions, creating hidden data-handling and trust-boundary risks.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script’s implemented behavior is materially inconsistent with the declared skill purpose. Instead of performing grammar checking, it exposes a generic local data-management interface, which creates hidden capability and undermines user trust, review assumptions, and least-privilege expectations for a language-assistance skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The statement that the tool is suitable for essentially anyone needing grammar checking creates an overly broad activation scope with weak boundaries. In agent environments, broad scope increases the chance the skill is selected in unintended contexts, which can expose user text or trigger hidden side effects when a narrower skill should have been used.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The command triggers 'check', 'correct', 'explain', 'level', 'practice', and 'compare' are highly generic and likely to overlap with normal conversation. In an agent system, this can cause accidental invocation or command confusion, especially if the skill has hidden non-grammar capabilities, expanding the blast radius of unintended activation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script embeds user-facing help and instruction text entirely in Chinese, including usage guidance and command descriptions. Under the policy for natural-language violations, forcing a specific language without user opt-in is reportable unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Branding the script as a 'Multi-purpose utility tool' directly contradicts the declared grammar-checking identity, signaling capability mismatch and possible deceptive packaging. In a skill ecosystem, this weakens security review because operators and users may grant trust based on the manifest while the code behaves as a broader utility.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code persists arbitrary user-provided entries and supports listing, searching, exporting, and logging them, none of which are described by the grammar-checker context. This hidden persistence expands the attack and privacy surface by storing user content locally without clear purpose limitation or transparency.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The logging function persistently records user-supplied arguments to a history file, potentially capturing sensitive text users submit for grammar review. In the context of a language tool, user inputs may include emails, drafts, or confidential material, so undisclosed retention increases privacy risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The heading '中国学生常见语法错误 Top 10' explicitly targets Chinese students, which imposes a specific locale/audience in the skill content without offering any user choice or opt-in. Under the policy, language or locale constraints should be optional or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script creates and uses a local application data directory automatically without a user-facing warning or meaningful disclosure. While not inherently code-execution dangerous, silent local writes are a privacy and transparency issue, especially for a skill presented as a simple grammar assistant.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The add command writes arbitrary user-provided content to a persistent local file without clear disclosure in the tool description. This is dangerous mainly from a privacy and expectation-management perspective, because users of a grammar assistant would not reasonably expect hidden note-taking or retention behavior.

Content

No source excerpt is available for this finding.