Back to skill

Security audit

Nex Reports

Security checks for vulnerabilities and agentic risk

Overview

This reporting skill is mostly disclosed, but it includes high-impact arbitrary shell command support that can run from stored report configuration.

Install only if you trust the publisher and will control who can edit ~/.nex-reports/reports.db. Avoid the CUSTOM module unless you fully trust every command and run scheduled reports with minimal privileges. Treat Telegram and saved reports as potentially sensitive business data.

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

T09 · Insecure Skill Coding Practices

Error
Location
lib/modules.py:489
Finding

Configuration-Controlled Arbitrary Shell Command Execution

Content
View full analysis
Dict[str, Any]: """ Run arbitrary shell command. """ try: command = config.get("command") if not command: return { "title": "Custom Command", "content": "No command specified", "status": "error", "items": [], } result = subprocess.run( command, shell=True, capture_output=True, text=True, timeout=10, ) items = result.stdout.split("\n") if result.stdout else [] status = "error" if result.returncode != 0 else "ok" ``` ### Technical Analysis The CUSTOM module passes the `command` configuration value directly to `subprocess.run()` with `shell=True`. Consequently, shell metacharacters, command substitutions, pipelines, redirects, and chained commands are interpreted by the operating-system shell. Arbitrary command execution is documented as a feature, but using `shell=True` exceeds the minimum mechanism required to launch a configured executable. More importantly, report module configurations are loaded from the mutable SQLite database without integrity validation or revalidation at execution time. A process or local user capable of changing `~/.nex-reports/reports.db` can inject a CUSTOM module or replace its command. The ten-second timeout does not provide a security boundary. A command can modify files, access credentials available to the account, transmit data, or launch a detached process before the timeout expires. ### Attack Path 1. An attacker obtains write access to `~/.nex-reports/reports.db`, such as through permissive file permissions, a compromised process running as the user, or a ...[truncated 1290 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
lib/formatter.py:106
Finding

Stored HTML Injection in Generated Reports

Content
View full analysis
", "", "", "", "", "Nex Reports", "", "body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 900px; margin: 0 auto; padding: 20px; background: #f5f5f5; }", "h1 { color: #333; border-bottom: 2px solid #007AFF; padding-bottom: 10px; }", ".meta { color: #666; font-size: 12px; margin-bottom: 20px; }", ".module { background: white; border-radius: 8px; padding: 15px; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }", ".module h2 { margin: 0 0 10px 0; font-size: 18px; }", ".status-ok { color: #34C759; }", ".status-warning { color: #FF9500; }", ".status-error { color: #FF3B30; }", ".content { color: #555; margin: 10px 0; }", ".items { list-style: none; padding: 10px 0; margin: 10px 0; }", ".items li { padding: 5px 0; color: #666; }", ".footer { text-align: center; color: #999; font-size: 12px; margin-top: 40px; border-top: 1px solid #e0e0e0; padding-top: 20px; }", "", "", "", f"

{title}

", f"

Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}

", ] status_class = { "ok": "status-ok", "warning": "status-warning", "error": "status-error", } for module in module_results: status = module.get("status", "ok") module_title = module.get("title", "Module") content = module.get("content", "") status_cls = status_class.get(status, " ...[truncated 2354 chars]
Remediation
View remediation
` element that disallows scripts and remote resources. 5. Add regression tests containing `

T09 · Insecure Skill Coding Practices

Warning
Location
lib/storage.py:21
Finding

Sensitive Report Data Created Without Consistently Enforced Private Permissions

Content
View full analysis
str: """ Save report content to file. Returns path to saved file. """ REPORTS_DIR.mkdir(parents=True, exist_ok=True) if not filename: now = datetime.now() filename = f"report_{now.strftime('%Y%m%d_%H%M%S')}.md" filepath = REPORTS_DIR / filename filepath.write_text(content, encoding="utf-8") ``` ### Technical Analysis Runtime initialization creates the data directories, SQLite database, and report files without explicitly setting private permission modes. Their final permissions therefore depend on the process umask and existing parent-directory permissions. Although `setup.sh` applies mode `0700` to `~/.nex-reports` on non-Windows systems, the Python CLI can initialize storage independently when invoked directly. The Python path does not reproduce that protection, validate ownership, or repair unsafe permissions. The database and generated files may contain email sender and subject metadata, CRM pipeline details, expense information, deliverables, domain data, vault alerts, calendar entries, task information, and arbitrary command output. The database also controls which modules are executed. ### Attack Path 1. The user runs `nex-reports.py` dir ...[truncated 1201 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (47)

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

Documenting a CUSTOM module that runs arbitrary shell commands introduces direct command-execution capability into a reporting skill, which is unjustified for simple aggregation and formatting. If report configuration is attacker-controlled or influenced by untrusted input, this can lead to full local code execution, data theft, persistence, or system compromise.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
100% confidence
Finding

Declaring a 'Custom Command' module that runs arbitrary shell commands gives the skill a generic code-execution primitive unrelated to its described reporting function. In an agent setting, this can be abused to execute system commands, exfiltrate files or secrets, pivot to other tools, or perform destructive actions under the user's privileges.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

Arbitrary shell command execution is unjustified for this skill’s stated purpose of report generation and scheduling across predefined Nex tools. The mismatch between declared purpose and actual capability makes the execution primitive more dangerous because it creates broad system access under the guise of a reporting skill, increasing the chance of abuse and user mis-trust.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README expands the skill from a Nex-tool report aggregator into a broader automation surface: IMAP email access, ICS parsing, taskboard ingestion, and especially arbitrary shell command execution. This scope expansion increases attack surface and data sensitivity well beyond the declared business-reporting purpose, making unsafe use and privilege abuse more likely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undocumented setup actions such as database initialization, directory creation, and CLI wrapper or symlink management extend the skill beyond report generation into local system modification. While these are common operational tasks, failing to disclose them weakens user consent and increases risk of unexpected persistence or environment changes.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undocumented setup actions such as database initialization, directory creation, and CLI wrapper or symlink management extend the skill beyond report generation into local system modification. While these are common operational tasks, failing to disclose them weakens user consent and increases risk of unexpected persistence or environment changes.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Undocumented setup actions such as database initialization, directory creation, and CLI wrapper or symlink management extend the skill beyond report generation into local system modification. While these are common operational tasks, failing to disclose them weakens user consent and increases risk of unexpected persistence or environment changes.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Undocumented setup actions such as database initialization, directory creation, and CLI wrapper or symlink management extend the skill beyond report generation into local system modification. While these are common operational tasks, failing to disclose them weakens user consent and increases risk of unexpected persistence or environment changes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A CUSTOM module that runs arbitrary shell commands is a direct code-execution surface and is not justified by a reporting skill's stated purpose. In this context, it could be used to read arbitrary files, exfiltrate secrets, modify the system, or pivot into other tools while appearing to be part of a normal report workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Documenting arbitrary shell command capability without a strong safety warning normalizes an extremely dangerous feature and may lead users to invoke it casually. In a reporting skill, this can become a stealthy path to command execution and privilege misuse under the cover of benign automation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill manifest claims a narrowly scoped reporting aggregator for specific Nex tools, but the configuration exposes additional capabilities for IMAP email access, calendar parsing, taskboard ingestion, and especially arbitrary custom command execution. This scope expansion creates hidden data-access and execution surfaces that users would not reasonably expect from the stated business-reporting purpose, increasing the chance of unauthorized data collection or command abuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill can run arbitrary shell commands without any user-facing warning, confirmation, or indication that system-level actions may occur. Lack of disclosure and confirmation materially increases exploitation risk because a user may trigger or permit powerful behavior without understanding that it can execute commands on the host.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

Passing an attacker-influenced string directly into subprocess.run with shell=True is a textbook tool-parameter-abuse flaw. It turns configuration data into executable shell syntax, allowing arbitrary OS command execution and full compromise of the host context available to the skill.

Content

Scanner excerpt · lib/modules.py (reported line 511)May include surrounding context.

python
"items": [],
            }

        result = subprocess.run(
            command,
            shell=True,
            capture_output=True,

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · lib/notifier.py (reported line 18)May include surrounding context.

python
def send_telegram(message: str, token: Optional[str] = None, chat_id: Optional[str] = None) -> bool:
    """
    Send message to Telegram.
    Uses env TELEGRAM_TOKEN and TELEGRAM_CHAT_ID if not provided.
    Returns True on success.
    """

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README describes Telegram delivery and IMAP email access but does not warn that reports may contain sensitive aggregated business data or that IMAP credentials grant mailbox access. This increases the risk of unintended data disclosure to third parties and insecure secret handling by users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README advertises arbitrary shell command support without any warning that this can execute untrusted code on the host. That omission encourages unsafe deployment and can cause users to treat a high-risk feature as routine report configuration.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 28)May include surrounding context.

md
This will:
1. Check for Python 3.9+
2. Create data directory (~/.nex-reports/)
3. Install CLI command (nex-reports)
4. Initialize SQLite database
5. Check for optional nex-* tools

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 187)May include surrounding context.

Using crontab (Unix/Linux/Mac)

bash
# Add to crontab -e
0 9 * * * /home/user/.local/bin/nex-reports run "Daily Standup"

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 221)May include surrounding context.

Enable and start:

bash
systemctl --user enable --now nex-reports-daily.timer

Using Windows Task Scheduler

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares no explicit tool scope or permissions despite documenting capabilities that access environment secrets, read and write files, use the network, and invoke shell commands. This lack of scoping makes the effective trust boundary unclear and can lead to over-privileged execution, especially for a meta-skill that aggregates sensitive business data and can transmit it externally.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
81% confidence
Finding

The skill is explicitly designed to save generated reports and maintain a database and report history in a user directory, creating persistent storage of aggregated business data across sessions. Because the reports combine multiple sensitive operational sources, persistence increases exposure from local compromise, accidental sharing, or excessive retention beyond the user's expectations.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: nex-reports
description: Automated report generation and scheduling meta-skill that aggregates data from multiple Nex tools into unified, actionable business briefings for day-to-day decision making. Create custom composite reports combining curated data from nex-healthcheck (infrastructure uptime and service health), nex-crm (sales pipeline status and hot prospects), nex-expenses (spending patterns and budget tracking), nex-deliverables (project progress and overdue items), nex-domains (domain expiry alerts and SSL certificate warnings), and nex-vault (contract expirations and renewal deadlines). Schedule reports to run fully automatically on recurring schedules (daily, weekly, monthly) using standard cron expressions and pre-built convenient presets (DAILY_MORNING at 8am, WEEKLY_MONDAY, WEEKLY_FRIDAY, MONTHLY_FIRST). Generate morning briefings for team standups, weekly summaries for stakeholder reviews, or monthly business reviews for strategic planning in multiple output formats (markdown for email with professional formatting, simple HTML, compact Telegram format with emojis, structured JSON for API integration). Route report delivery via Telegram for instant mobile notifications and team alerts or save generated reports to files for email distribution, client sharing, and documentation archives. Perfect for Belgian agency operators, business owners, and management teams who need daily or weekly snapshots of overall business health without manual data compilation overhead.
version: 1.0.0
metadata:
  clawdbot:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest frames the skill as aggregation from specific Nex business tools, yet the documentation extends into email, calendar, taskboard, and arbitrary command access. Because those sources may contain highly sensitive information unrelated to the stated task, the mismatch increases the chance of over-collection and misuse of private business data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Overly broad trigger phrases can cause the skill to activate for generic business requests that do not clearly imply consent to access sensitive data, write reports, or send notifications. For a skill with file, network, IMAP, and shell-adjacent capabilities, accidental invocation materially raises the chance of unintended data processing or disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation advertises Telegram delivery and local file saving without clearly warning that reports may contain sensitive business, customer, infrastructure, financial, or contract data that will be persisted or sent to a third-party messaging service. In this skill's context, that omission is significant because the whole purpose is to aggregate potentially confidential cross-domain information into a single distributable artifact.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The configuration enables IMAP-based email access and references credentials from environment variables, even though email collection is outside the manifest's declared Nex-tool aggregation scope. This creates an undisclosed pathway to access potentially sensitive mailbox data, expanding the skill's reach beyond user expectations.

Content

No source excerpt is available for this finding.