Back to skill

Security audit

Salesforce Skill

Security checks for vulnerabilities and agentic risk

Overview

This Salesforce skill is mostly coherent, but it can read, create, update, and delete live CRM data with weak safeguards, so users should review it carefully before installing.

Install only for trusted agents and users that are allowed to operate on the selected Salesforce org. Prefer a sandbox first, use a least-privilege Salesforce integration user, avoid pasting raw access tokens into chat or logs, pin install tooling where possible, and require explicit human confirmation before create, update, delete, bulk, arbitrary SOQL, or schema-discovery operations.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/salesforce-helper.sh:46
Finding

User-Controlled Values Are Directly Interpolated into SOQL Queries

Content
View full analysis
${NC}" exit 1 fi echo -e "${GREEN}🔍 Searching Contacts: $SEARCH${NC}" sf data query --query " SELECT Id, Name, Email, Phone, Account.Name FROM Contact WHERE Name LIKE '%$SEARCH%' OR Email LIKE '%$SEARCH%' LIMIT 25 " $ORG_FLAG --result-format table ;; ``` ```bash search-accounts) SEARCH="${1:-}" if [[ -z "$SEARCH" ]]; then echo -e "${RED}Usage: search-accounts ${NC}" exit 1 fi echo -e "${GREEN}🔍 Searching Accounts: $SEARCH${NC}" sf data query --query " SELECT Id, Name, Industry, Website, (SELECT Name, Email FROM Contacts LIMIT 5) FROM Account WHERE Name LIKE '%$SEARCH%' LIMIT 25 " $ORG_FLAG --result-format table ;; ``` ### Technical Analysis Arguments such as `SEARCH`, `LIMIT`, and `DAYS` are inserted directly into SOQL text. The script ...[truncated 1839 chars]
Remediation
View remediation
&2 exit 1 } (( value >= 1 && value <= maximum )) || { echo "Value is outside the permitted range" >&2 exit 1 } } validate_positive_integer "$LIMIT" 200 validate_positive_integer "$DAYS" 365 ``` - Escape all SOQL string literals with a dedicated, tested routine that handles at least single quotes and backslashes according to Salesforce SOQL rules. - Prefer Salesforce-supported parameter binding or a structured query interface when one is available. - Construct queries only from fixed templates. Do not permit user input to control selected fields, object names, operators, ordering, or arbitrary clauses. - Apply least-privilege Salesforce profiles and permission sets so that a query injection cannot access unrelated objects or sensitive fields. - Add automated tests using apostrophes, backslashes, wildcard characters, clause fragments, and invalid numeric values. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/salesforce-helper.sh:82
Finding

Unsafe Construction of Salesforce Record Assignment Expressions

Content
View full analysis
[email] [account_id]${NC}" exit 1 fi VALUES="FirstName='$FIRST' LastName='$LAST'" [[ -n "$EMAIL" ]] && VALUES="$VALUES Email='$EMAIL'" [[ -n "$ACCOUNT_ID" ]] && VALUES="$VALUES AccountId='$ACCOUNT_ID'" echo -e "${GREEN}➕ Creating Contact: $FIRST $LAST${NC}" sf data create record --sobject Contact --values "$VALUES" $ORG_FLAG --json ;; ``` ```bash update-opp-stage) OPP_ID="${1:-}" STAGE="${2:-}" if [[ -z "$OPP_ID" || -z "$STAGE" ]]; then echo -e "${RED}Usage: update-opp-stage ${NC}" echo "Common stages: Prospecting, Qualification, 'Needs Analysis', 'Proposal/Price Quote', 'Negotiation/Review', 'Closed Won', 'Closed Lost'" exit 1 fi echo -e "${GREEN}📝 Updating Opportunity $OPP_ID to stage: $STAGE${NC}" sf data update record --sobject Opportunity --record-id "$OPP_ID" --values "StageName='$STAGE'" $ORG_FLAG --json ;; ``` ```bash create-lead) FIRST="${1:-}" LAST="${2:-}" COMPANY="${3:-}" EMAIL="${4:-}" if [[ -z "$FIRST" || -z "$LAST" || -z "$COMPANY" ]]; then echo -e "${RED}Usage: create-lead [email]${NC}" exit 1 fi VALUES="FirstName='$FIRST' LastName='$LAST' Company='$COMPANY' Status='Open - Not Contacted'" [[ -n "$EMAIL" ]] && VALUES="$VALUES Email='$EMAIL'" echo -e "${GREEN}➕ Creating Lead: $FIRST $LAST at $COMPANY${NC}" sf data create record --sobject Lead --values "$VALUES" $ORG_FLAG --json ;; ``` ```bash create- ...[truncated 3154 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/salesforce-helper.sh:15
Finding

Unquoted Target Organization Fragment Allows Salesforce CLI Option Injection

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:14
Finding

Installation Instructions Use Mutable, Unpinned Package Versions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

clawdhub publish Customization Add Custom Objects Edit SKILL.md to add instructions for custom Salesforce objects:

Query Custom Object

bash
sf data query --query "SELECT Id, Name, Custom_Field__c FROM Custom_Object__c" --target-org myorg

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises Create/Update/Delete operations against Salesforce records but does not include any warning about destructive or irreversible changes. In a chat-driven automation context, omission of cautions and confirmation guidance increases the chance of accidental record deletion or mass data loss by operators or downstream agents.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The README instructs users to run npx clawdhub@latest install salesforce, which pulls and executes remote code without pinning to a specific reviewed version. This creates a supply-chain risk: if the package or a future release is compromised, users may execute attacker-controlled code during installation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation description is broad enough to trigger on generic requests about customer records, sales, or CRM data, which increases the chance the skill is invoked in contexts the user did not explicitly intend. Because this skill includes read, write, bulk, and delete operations against a live Salesforce org, over-activation can lead to unnecessary access to sensitive data or unintended destructive actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill encourages use of a raw SALESFORCE_ACCESS_TOKEN and later shows REST API usage without clear guidance on secure credential handling, storage, redaction, or output hygiene. This raises the risk of token exposure in shells, logs, transcripts, copied commands, or downstream tooling, which could enable unauthorized access to Salesforce data and APIs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill documents direct record deletion and bulk deletion commands with only a casual 'careful!' note, which is not an adequate safeguard for destructive operations. In a production CRM, accidental deletion of contacts, leads, or other records can cause data loss, operational disruption, and compliance issues, especially when bulk actions are available.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

REST API (Alternative)

For operations not covered by CLI, use curl with the REST API:

bash
# Set variables

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill performs record-creating and record-updating operations directly against Salesforce without any confirmation prompt, dry-run mode, or explicit production warning. In an agent context, that increases the risk of accidental or manipulated writes to live CRM data, causing integrity issues, workflow triggers, and operational disruption.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The helper exposes query and query-json commands that accept arbitrary user-supplied SOQL and execute it directly against the configured Salesforce org. That bypasses the guardrails implied by the named canned operations and enables unrestricted access to CRM data, including sensitive business and personal information, limited only by the caller's Salesforce permissions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The describe and fields commands expose broad schema and field metadata for arbitrary Salesforce objects. This materially improves an attacker's ability to enumerate available data models, identify sensitive fields, and craft follow-on queries or record modifications more effectively.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.