Back to skill

Security audit

nchat (created by OpenClaw)

Security checks for vulnerabilities and agentic risk

Overview

This skill is a privacy-sensitive but coherent helper for using the local nchat messaging client, with risky actions disclosed and gated on explicit user approval.

Install only if you want Codex to help with a local terminal messaging client. Treat account setup, exports, logs, cache inspection, message actions, and auto-compose as sensitive: approve only the exact account, config directory, and action you intend, and avoid sharing unredacted logs, QR codes, auth codes, keys, or exported message history.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (4)

Context Leakage

High
Category
Data Exfiltration
Content
It can use OpenAI-compatible services or Gemini. Relevant env vars include `OPENAI_API_KEY` and `GEMINI_API_KEY`. Default examples use OpenAI `gpt-4o-mini`; custom service/model/timeout/prompt/max tokens can be configured in `auto_compose_command`.

Treat auto-compose as external AI usage. Ask before enabling it, because it may send chat history to a third-party service and may incur cost.

## Clipboard
Confidence
85% confidence
Finding
Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill expects shell and file-read operations but does not declare any explicit tool scope or permissions boundary. In a privacy-sensitive messaging context, this increases the chance that an agent may invoke commands or read local files more broadly than intended, including configs, logs, caches, or exported message history, without a machine-enforceable restriction.

Session Persistence

Medium
Category
Rogue Agent
Content
Side-effect levels:

- Safe read-only: `--version`, `--help`, `man nchat`
- Low-risk but may create config/cache or mark messages read if launched normally: `nchat`
- Login/linking: `--setup`, `USE_PAIRING_CODE=1 --setup`, `USE_QR_TERMINAL=1 --setup`
- Privacy-sensitive: `--export`, logs, cache inspection
- Destructive/account-changing: `--remove`, delete/archive/leave chat commands
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.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
def run_command(args: list[str], timeout: int = 5) -> dict[str, Any]:
    try:
        proc = subprocess.run(
            args,
            text=True,
            stdout=subprocess.PIPE,
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Static analysis

No suspicious patterns detected.