Back to skill

Security audit

Zopaf Negotiation Engine

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real negotiation tool, but it handles sensitive deal details through a hosted service and includes broader session, persistence, and LLM-backed web-coach code that is not clearly disclosed in the skill description.

Review before installing. Use this only if you are comfortable sending negotiation details to the configured hosted MCP service, or configure a local/on-prem server instead. Avoid entering confidential legal strategy, salary walk-away positions, private term sheets, or vendor pricing unless the operator's retention, access control, and third-party model-use policies are acceptable.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
mcp_api.py:68
Finding

Unauthenticated Access to Sensitive Negotiation Sessions

Content
View full analysis
dict: if session_id not in sessions: raise ValueError(f"Session '{session_id}' not found. Call create_session first.") return sessions[session_id] ``` ```python @mcp.tool() def create_session() -> str: """Create a new negotiation coaching session. Returns a session_id to use with all other tools. Call this first.""" session_id = str(uuid.uuid4())[:8] sessions[session_id] = { "issues": [], "elicitation_choices": [], "learned_weights": {}, "counterpart_weights": {}, "batna": None, "batna_score": 0, "last_offers": [], "negotiation_round": 0, } return json.dumps({"session_id": session_id, "status": "created"}) @mcp.tool() def add_issue(session_id: str, issue_name: str, options: list[str]) -> str: """Add a negotiable issue/term to the session. Options ordered WORST to BEST for the user (e.g., ['$150K', '$160K', '$170K', '$180K']).""" session = _get_session(session_id) for existing in session["issues"]: if existing["name"].lower() == issue_name.lower(): existing["options"] = options return json.dumps({"status": "updated", "issue": issue_name, "total_issues": len(session["issues"])}) session["issues"].append({"name": issue_name, "options": options}) return json.dumps({"status": "added", "issue": issue_name, "total_issues": len(session["issues"])}) ``` ```python @mcp.tool() def get_negotiation_state(session_id: str) -> str: """Get current state of the negotiation model — issues, weights, BATNA, frontier size, and what to do next.""" session = _get_session(session_id) case ...[truncated 4114 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
api.py:108
Finding

Premium Unlock Endpoint Does Not Verify Payment or Ownership

Content
View full analysis
None: db = _get_db() db.execute( "UPDATE sessions SET unlocked = 1 WHERE session_id = ?", (session_id,) ) # Also insert if session doesn't exist yet (edge case: server redeployed) if db.execute("SELECT changes()").fetchone()[0] == 0: db.execute( "INSERT OR IGNORE INTO sessions (session_id, state, unlocked) VALUES (?, '{}', 1)", (session_id,), ) db.commit() db.close() ``` ### Technical Analysis The endpoint states that it is called after payment, but it accepts an arbitrary `session_id` and unconditionally marks that session as unlocked. It does not authenticate the caller, verify session ownership, validate a payment-provider signature, look up a successful transaction, or prevent replay. If the supplied session does not exist, `set_unlocked` creates an unlocked placeholder record. This behavior further separates the premium state from any validated session or payment lifecycle. The current chat implementation comments that the paywall is disabled for the launch period, which reduces immediate commercial impact. However, the unlock route remains an insecure authorization mechanism and would become directly exploitable if premium gating were re-enabled. ### Attack Path 1. An attacker creates a session or obtains another user's session ID. 2. The attacker sends `POST /unlock` with JSON containing that identifier. 3. The API calls `set_unlocked` without validati ...[truncated 608 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
session_store.py:59
Finding

Sensitive Negotiation Histories Are Persisted as Plaintext JSON

Content
View full analysis
dict: """Serialize coach state to a JSON-compatible dict.""" return { "messages": _serialize_messages(coach.messages), "issues": coach.issues, "elicitation_choices": coach.elicitation_choices, "learned_weights": coach.learned_weights, "pending_elicitation": coach.pending_elicitation, "batna": coach.batna, "chat_history": coach.chat_history, "counterpart_weights": coach.counterpart_weights, "last_offers": coach.last_offers, "negotiation_round": coach.negotiation_round, } ``` ```python def save_session(session_id: str, coach: NegotiationCoach) -> None: """Save coach state to SQLite.""" db = _get_db() state = json.dumps(_coach_to_dict(coach)) db.execute( """INSERT INTO sessions (session_id, state, updated_at) VALUES (?, ?, CURRENT_TIMESTAMP) ON CONFLICT(session_id) DO UPDATE SET state = ?, updated_at = CURRENT_TIMESTAMP""", (session_id, state, state), ) db.commit() db.close() ``` ### Technical Analysis The application serializes full model messages, chat history, negotiation issues, acceptable ranges, inferred preferences, BATNA details, counterpart information, and offers into an unencrypted JSON string. That string is stored directly in SQLite. Repository evidence does not show application-level encryption, field-level encryption, automatic expiration, retention limits, or a deletion operation. Database compromise, filesystem compromise, overly broad volume access, or accidental backup exposure would therefore reveal complete negotiation records without requiring additional decryption. SQLite may reside on an encrypted h ...[truncated 1022 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
api.py:24
Finding

Overly Permissive Cross-Origin Resource Sharing Configuration

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Python Dependencies Use Unbounded Minimum Versions Without Integrity Pinning

Content
View full analysis
=0.40.0 pyyaml>=6.0 numpy>=1.24.0 scipy>=1.10.0 pulp>=2.7.0 fastapi>=0.104.0 uvicorn>=0.24.0 mcp>=1.0.0 ``` ### Technical Analysis All Python dependencies use open-ended minimum-version constraints. A deployment performed at a later date may install materially different direct and transitive dependency versions from those reviewed during development. No Python lock file or package hashes are present in the supplied directory structure. As a result, builds are not reproducible, and package integrity is not bound to reviewed artifacts. This increases exposure to compromised upstream releases, unexpected breaking changes, and newly introduced vulnerabilities. No typosquatted package, malicious package, or confirmed vulnerable installed version was identified from the available repository evidence. This finding concerns dependency-control weakness rather than proof that a current package is malicious. ### Attack Path 1. A future deployment resolves dependencies using `pip install -r requirements.txt`. 2. The resolver selects the newest releases satisfying the broad `>=` constraints. 3. An upstream release or transitive dependency has been compromised or contains an exploitable regression. 4. The deployment downloads and imports that unreviewed code. 5. The dependency executes with the service's privileges and can access application data, environment variables, network connectivity, and the session database. ### Impact Assessment A compromised dependency could execute arbitrary code within the application container and obtain all privileges available to the service process. This could expose negotiation sessions, API credentials such as the Anthropic key, and outbound network access. The likelihood cannot be established from repository evid ...[truncated 154 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (108)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undisclosed chat/session management via a networked backend changes the security posture from a stateless local tool to a service that stores and transmits user interactions. Even if benignly intended, hidden session history retrieval and gating controls can affect privacy, retention, and user expectations in a sensitive advisory workflow.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill metadata promises a local 'zero LLM tokens' negotiation math engine, but the implementation is an external LLM-backed conversational agent. This is dangerous because it defeats user/operator expectations about data flow, cost, determinism, and privacy, and can cause sensitive negotiation data to be transmitted off-box under false pretenses.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Importing and using Anthropic for a skill advertised as local optimization introduces unjustified external network access and third-party processing. In this context, the agent sends private negotiation context, preferences, BATNA, and messages to a remote API, creating confidentiality, compliance, and supply-chain risk unrelated to the stated purpose of the skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a narrowly scoped 'Negotiation math engine' focused on Pareto frontiers, iso-utility counteroffers, preference inference via MILP, and explicitly says 'Zero LLM tokens.' This file instead implements a FastAPI service for a 'Negotiation Coach' web app with chat, session persistence, premium/unlock flows, and history retrieval, which is materially broader and different from a pure math engine.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The metadata and module framing claim a 'Zero LLM tokens' math engine, but the implementation instantiates Anthropic clients and uses LLM calls for user interaction and analysis. This is a capability and transparency mismatch that can cause users or integrators to expose sensitive negotiation details under false assumptions about data handling and system behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code sends negotiation type and existing issues to an external LLM to generate advice, despite the skill being presented as a zero-token math engine. This undisclosed external processing materially expands the data exposure and execution model, making the skill more dangerous because negotiation data may be commercially sensitive, personal, or legally privileged.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
web/lib/api.ts:1