T09 · Insecure Skill Coding Practices
- Location
connect.py:43- Finding
Unvalidated Salesforce instance URL can expose bearer credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Salesforce skill has useful CRM features, but it needs Review because it can make large and persistent Salesforce changes with weak or misleading safeguards.
Install only after reviewing this as an administrative Salesforce tool, not just a CRM helper. Use a sandbox first, use a dedicated least-privilege Salesforce user, avoid storing long-lived passwords or admin tokens in .env, validate the Salesforce instance host, and do not run GTM standardization or automation deployment in production without an explicit preview, record counts, rollback plan, and admin approval.
connect.py:43Unvalidated Salesforce instance URL can expose bearer credentials
query.py:196Dynamic SOQL construction permits query injection and bypasses intended data scope
standardize.py:327Bulk standardization can modify up to 50,000 Salesforce records without confirmation
automate.py:301Automation deployment creates active persistent Salesforce validation rules with misleading non-blocking semantics
Static analysis indicates the skill may actually perform focused GTM taxonomy backfill/standardization and rollback operations rather than the broad CRM functionality described. That mismatch matters because hidden field-standardization and rollback logic can still make bulk modifications to production Salesforce data while avoiding scrutiny from reviewers expecting generic CRM assistance.
Static analysis indicates the skill may actually perform focused GTM taxonomy backfill/standardization and rollback operations rather than the broad CRM functionality described. That mismatch matters because hidden field-standardization and rollback logic can still make bulk modifications to production Salesforce data while avoiding scrutiny from reviewers expecting generic CRM assistance.
Static analysis indicates the skill may actually perform focused GTM taxonomy backfill/standardization and rollback operations rather than the broad CRM functionality described. That mismatch matters because hidden field-standardization and rollback logic can still make bulk modifications to production Salesforce data while avoiding scrutiny from reviewers expecting generic CRM assistance.
Static analysis indicates the skill may actually perform focused GTM taxonomy backfill/standardization and rollback operations rather than the broad CRM functionality described. That mismatch matters because hidden field-standardization and rollback logic can still make bulk modifications to production Salesforce data while avoiding scrutiny from reviewers expecting generic CRM assistance.
Static analysis indicates the skill may actually perform focused GTM taxonomy backfill/standardization and rollback operations rather than the broad CRM functionality described. That mismatch matters because hidden field-standardization and rollback logic can still make bulk modifications to production Salesforce data while avoiding scrutiny from reviewers expecting generic CRM assistance.
Static analysis indicates the skill may actually perform focused GTM taxonomy backfill/standardization and rollback operations rather than the broad CRM functionality described. That mismatch matters because hidden field-standardization and rollback logic can still make bulk modifications to production Salesforce data while avoiding scrutiny from reviewers expecting generic CRM assistance.
Static analysis indicates the skill may actually perform focused GTM taxonomy backfill/standardization and rollback operations rather than the broad CRM functionality described. That mismatch matters because hidden field-standardization and rollback logic can still make bulk modifications to production Salesforce data while avoiding scrutiny from reviewers expecting generic CRM assistance.
The skill instructs users to place Salesforce username, password, and security token into a .env file, which normalizes direct handling of highly sensitive credentials by the skill environment. Even with a note not to commit the file, this increases risk of accidental disclosure through local compromise, backups, logs, shell tooling, or later agent access to environment variables.
Option C — Username + security token (.env):
# .env file (never commit to source control)
SALESFORCE_USERNAME=your@email.com
SALESFORCE_PASSWORD=<password>
SALESFORCE_SECURITY_TOKEN=<security-token>
Mentioning verification of an access token is not itself malicious, but in the context of a skill that relies on environment-held tokens and potentially undeclared credential access paths, it reinforces a sensitive authentication model with insufficient boundary disclosure. The danger is indirect: it normalizes token-centric troubleshooting without clarifying how tokens are protected or sourced.
**Problem**: "Authentication failed"
**Solution**:
1. Check SALESFORCE_INSTANCE_URL is correct
2. Verify access token is valid (not expired)
3. Re-authenticate using OAuth flow
4. Check network connectivity
The quick-start flow tells users to configure credentials in a .env file, encouraging secret placement in a location commonly read by tooling and potentially accessible to the agent runtime. In a skill that also advertises shell and file capabilities, the context makes environment-stored secrets more exposed than a normal documentation reference would be.
# 1. Install pinned dependencies
pip install -r requirements.txt
# 2. Configure credentials in .env (never export raw secrets in shell)
# Copy .env.example to .env and fill in your values — see README for details.
# 3. Start using!
This line continues the same credential-handling pattern by directing users to populate .env with live secrets before using the skill. Because the skill is intended to automate CRM operations, any compromise of those secrets could lead to unauthorized access, data theft, or destructive changes in Salesforce.
pip install -r requirements.txt
# 2. Configure credentials in .env (never export raw secrets in shell)
# Copy .env.example to .env and fill in your values — see README for details.
# 3. Start using!
# Say: "Show me all leads from this week"
The skill description presents a CRM data-access/management integration, but this code performs org-wide metadata deployment by creating Salesforce Flows and Validation Rules. That is a materially more privileged and persistent capability than users would expect, increasing the risk of unauthorized administrative changes to the Salesforce org.
The code and comments claim the validation rules are 'warning only' and 'never block saves', but standard active Salesforce validation rules block record saves when their condition evaluates true. This mismatch can cause unexpected production outages or data-entry failures because administrators may deploy the rule believing it is non-blocking.
The validation rule metadata itself says 'Does not block saves' while setting the rule active with an error formula and error message, which in Salesforce blocks the transaction. This is dangerous because it embeds deceptive operational semantics directly in deployment logic, making business disruption more likely during rollout.
The code can pause, resume, and delete Salesforce Flows across the org, which is powerful lifecycle control beyond the stated CRM integration purpose. Hidden administrative controls are dangerous because an agent or user may invoke them without understanding that they can disable business processes or remove org automation.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Three authentication methods:
1. exchange — OAuth 2.0 authorization-code flow (Connected App)
2. refresh — Refresh an existing access token
3. platform — Extract token from Salesforce Platform CLI (sf / sfdx)
No secrets needed — reads the token the CLI already stored.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Three authentication methods:
1. exchange — OAuth 2.0 authorization-code flow (Connected App)
2. refresh — Refresh an existing access token
3. platform — Extract token from Salesforce Platform CLI (sf / sfdx)
No secrets needed — reads the token the CLI already stored.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Three authentication methods:
1. exchange — OAuth 2.0 authorization-code flow (Connected App)
2. refresh — Refresh an existing access token
3. platform — Extract token from Salesforce Platform CLI (sf / sfdx)
No secrets needed — reads the token the CLI already stored.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Three authentication methods:
1. exchange — OAuth 2.0 authorization-code flow (Connected App)
2. refresh — Refresh an existing access token
3. platform — Extract token from Salesforce Platform CLI (sf / sfdx)
No secrets needed — reads the token the CLI already stored.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Three authentication methods:
1. exchange — OAuth 2.0 authorization-code flow (Connected App)
2. refresh — Refresh an existing access token
3. platform — Extract token from Salesforce Platform CLI (sf / sfdx)
No secrets needed — reads the token the CLI already stored.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
Three authentication methods:
1. exchange — OAuth 2.0 authorization-code flow (Connected App)
2. refresh — Refresh an existing access token
3. platform — Extract token from Salesforce Platform CLI (sf / sfdx)
No secrets needed — reads the token the CLI already stored.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
valid refresh token from a prior authorization-code flow.
Returns metadata only — the new access token is NOT returned.
Write it to your .env by calling connect.py connect afterward.
"""
endpoint = (
"https://test.salesforce.com/services/oauth2/token"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
valid refresh token from a prior authorization-code flow.
Returns metadata only — the new access token is NOT returned.
Write it to your .env by calling connect.py connect afterward.
"""
endpoint = (
"https://test.salesforce.com/services/oauth2/token"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
valid refresh token from a prior authorization-code flow.
Returns metadata only — the new access token is NOT returned.
Write it to your .env by calling connect.py connect afterward.
"""
endpoint = (
"https://test.salesforce.com/services/oauth2/token"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
valid refresh token from a prior authorization-code flow.
Returns metadata only — the new access token is NOT returned.
Write it to your .env by calling connect.py connect afterward.
"""
endpoint = (
"https://test.salesforce.com/services/oauth2/token"
No suspicious patterns detected.