Back to skill

Security audit

Pans Crm Sync

Security checks for vulnerabilities and agentic risk

Overview

This CRM skill is not clearly malicious, but it handles live CRM credentials and customer data with misleading capability claims and weak safeguards.

Install only after reviewing the code and using least-privilege sandbox or integration CRM credentials. Treat outputs as sensitive customer data, avoid broad or automatic invocation, and fix the Salesforce query injection and misleading sync/reporting claims before production use.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/crm.py:155
Finding

Salesforce SOQL Injection Through Unsanitized Email Input

Content
View full analysis

Vulnerability Details

File Location: scripts/crm.py, lines 155-163
Vulnerability Type: Salesforce Object Query Language injection
Risk Level: High

Vulnerable Code

python
if email:
    query = f"""
        SELECT Id, Name, Email, Phone, Account.Name
        FROM Contact
        WHERE Email LIKE '%{email}%'
        LIMIT {limit}
    """
else:

Technical Analysis

The value supplied through the --email command-line argument is inserted directly into a Salesforce Object Query Language query using an f-string. The application does not validate the value as an email address or escape characters that have special meaning inside a SOQL string literal.

An attacker who can control the command-line arguments can provide an input containing quote characters and additional SOQL syntax. This can terminate the intended email pattern and modify the query predicate. The integer limit does not create the same injection issue because argparse parses it with type=int, but it does not mitigate injection through email.

The Salesforce SDK executes the resulting query with the permissions of the Salesforce account configured through SALESFORCE_USERNAME, SALESFORCE_PASSWORD, and SALESFORCE_SECURITY_TOKEN.

Attack Path

  1. An attacker gains the ability to invoke the Skill or influence the value passed to --email.
  2. The attacker supplies a crafted value containing SOQL string delimiters and predicate syntax.
  3. query_salesforce() embeds that value directly inside the WHERE Email LIKE clause.
  4. Salesforce executes the modified query under the configured account's privileges.
  5. Matching contact records are printed to standard output.
  6. If --output is also specified, the returned records are serialized to the selected JSON file.

Impact Assessment

Successful exploitation can bypass the intended email filter and disclose Salesforce contact data, including names, email ...[truncated 423 chars]

Remediation
View remediation

Remediation Suggestions

  • Avoid directly interpolating untrusted values into SOQL statements.
  • Use a supported Salesforce SDK query-binding or safe query-formatting mechanism where available.
  • Escape SOQL string literals with a well-tested library routine before constructing the query.
  • Strictly validate --email as an email address if partial searches are not required.
  • If partial matching is required, define a conservative character allowlist and reject quote characters, control characters, and SOQL metacharacters.
  • Enforce a safe upper and lower bound for --limit.
  • Configure the Salesforce integration account with least-privilege object and field permissions.
  • Avoid printing or exporting unnecessary personal information.

A hardened implementation should validate the input and use a dedicated escaping function rather than relying on manual string replacement.

T08 · Insecure Dependencies

Note
Location
SKILL.md:24
Finding

Unpinned Third-Party CRM Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 24
Vulnerability Type: Unpinned third-party dependencies
Risk Level: Low

Vulnerable Code

bash
pip install simple-salesforce hubspot-api-client

Technical Analysis

The installation instructions install the latest versions of simple-salesforce and hubspot-api-client without version constraints, a lock file, or package integrity hashes. Consequently, separate installations can resolve to different package and transitive dependency versions.

The referenced package names are consistent with the imports in the application, and the reviewed project does not identify a malicious package or an unsafe package index. The risk arises from mutable dependency resolution: a future compromised, vulnerable, or incompatible release could be installed automatically without a corresponding review of this Skill.

Both dependencies execute in the same Python process as the application. At runtime, they can access process memory, environment variables, the filesystem available to the user, and network resources. This is particularly sensitive because the process contains Salesforce and HubSpot credentials.

Attack Path

  1. A user follows the documented installation command.
  2. pip resolves the current package versions and their transitive dependencies from the configured package index.
  3. A newly released, compromised, or vulnerable dependency version is selected because no reviewed version is pinned.
  4. Dependency code executes during installation, import, or CRM client operation.
  5. Malicious dependency code could access the CRM credentials present in environment variables or act with the local user's privileges.

This path depends on an upstream package or dependency becoming compromised or vulnerable; no such compromise was established in the reviewed files.

Impact Assessment

If the supply chain is compromised, code could execute with the ...[truncated 376 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin direct and transitive dependencies to versions that have been reviewed and tested.
  • Maintain dependencies in a lock file generated by a tool such as pip-tools, Poetry, or a comparable dependency manager.
  • Use hash verification, such as pip install --require-hashes -r requirements.txt.
  • Review dependency updates before modifying the lock file.
  • Run software composition analysis and vulnerability scanning in continuous integration.
  • Install packages from an explicitly trusted package index.
  • Execute the Skill in an isolated virtual environment or container with least-privilege filesystem and network access.
  • Prefer short-lived CRM tokens and narrowly scoped integration accounts to reduce the impact of dependency compromise.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill advertises bidirectional sync, incremental sync, conflict resolution, and report generation, but the described implementation apparently only performs narrower platform-specific fetch/query/update actions. This mismatch is dangerous because operators may trust the tool to safely reconcile CRM state when it lacks the safeguards and logic needed, causing silent data inconsistency, incorrect pipeline updates, or missed conflicts in live business systems.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares operational behavior that relies on environment credentials and appears to support actions that can modify external CRM state, but it does not define any explicit tool scope or permissions boundary. In an agent environment, missing scope declarations can lead to overbroad access or execution in contexts where users are not clearly informed that secrets and write-capable operations are required.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Using broad triggers like product names and generic CRM terms can cause the skill to activate during ordinary discussion of Salesforce, HubSpot, or CRM topics rather than an intentional request to run the tool. In a skill capable of querying or updating external systems, accidental activation increases the risk of unintended data access or record modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description presents CRM synchronization and pipeline updates without warning that these operations can modify live records in external business systems. Users may invoke the skill without understanding the operational risk, which is especially concerning because CRM changes can affect sales workflows, reporting, and customer account state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The setup and usage instructions ask for CRM credentials and show operations involving customer-identifying data, but they do not warn that secrets and business data are transmitted to external CRM services. This omission can lead to unsafe handling of API keys, misuse in production contexts, and uninformed processing of sensitive customer information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The repeated trigger section reinforces ambiguous activation phrases without any constraints indicating read-only versus write behavior or requiring user confirmation. In the CRM context, this raises the chance that normal conversation could invoke actions touching customer data or live sales records across external platforms.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring and provided manifest describe a broader CRM synchronization tool with bidirectional and incremental sync, conflict detection/resolution, and report generation. In the implementation, sync operations only read recent contacts from one platform at a time (L53-L119), updates only set pipeline stage on a chosen platform (L122-L155), and there is no cross-platform reconciliation, incremental state tracking, conflict handling, or report generation logic.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

sync_salesforce and sync_hubspot are presented as synchronization functions, which implies data transfer or reconciliation between systems. Their actual behavior is limited to querying recent records from one platform and returning them, with no write to the other CRM or any persisted sync state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script can export CRM query or sync results containing customer PII, including names, emails, phone numbers, and company data, to any user-supplied path without warning, masking, or access controls. In a CRM context this increases the risk of accidental sensitive-data disclosure, insecure storage, or overwriting files in locations that are broadly accessible to other users or processes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Natural-language strings in the module description, help text, and runtime messages are consistently Chinese-only, which forces a specific language on users. The file does not provide any opt-in language selection or justification for a Chinese-only locale constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.