Back to skill

Security audit

Cleanup Deals

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed HubSpot cleanup guide, but it directs deletion and pipeline changes using broad criteria without mandatory approvals or dry-run controls.

Review carefully before installing or using on a production HubSpot account. Use read-only access for the audit, export affected records and pipeline settings, require an administrator to approve exact record and pipeline IDs before any mutation, exclude Salesforce-synced records unless both admins approve, and prefer archive or quarantine over permanent deletion.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:65
Finding

Destructive CRM Cleanup Uses Unsafe Classification Heuristics

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 65-69
Vulnerability Type: Unsafe destructive operations based on insufficient validation
Risk Level: Medium

Vulnerable Code Snippet

markdown
1. **Delete test deals** — search for deals with names containing "test", "demo", "sample", or with amount = $0 and no associated contacts.
2. **Address missing amounts** — export deals without `amount` and work with sales to fill in values or mark as lost.
3. **Close stale deals** — deals open with no activity in 90+ days should be reviewed with the deal owner. Set to "Closed Lost" if abandoned.
4. **Standardize pipeline stages** — ensure all pipelines have consistent stage names and probability percentages.
5. **Remove unused pipelines** — if a pipeline has zero active deals and is not in use, archive or delete it.

Technical Analysis

The Skill authorizes destructive HubSpot operations using broad and insufficiently reliable heuristics. A deal name containing test, demo, or sample does not establish that the record is disposable. Likewise, a zero-value deal without associated contacts may be a legitimate opportunity awaiting enrichment.

The instruction to remove a pipeline when it has zero active deals and is "not in use" also lacks a precise verification procedure. A pipeline may still be referenced by historical records, reports, workflows, integrations, permissions, or future business processes.

The workflow does not mandate:

  • A read-only preview or dry run before mutation.
  • An export or backup of affected records and configurations.
  • Explicit approval for every proposed deletion batch.
  • Verification of record associations, workflows, reports, or other dependencies.
  • Automatic exclusion of Salesforce-synchronized records.
  • Stable test-record identifiers or an allowlist of approved record IDs.
  • Preference for reversible archival over permanent deletion.

Although the docum ...[truncated 2159 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace substring and zero-value heuristics with explicit test-record markers, such as a dedicated boolean property, approved sandbox pipeline, or allowlisted record IDs.
  2. Require a read-only discovery phase that produces a complete proposed-change report before any mutation occurs.
  3. Require an authorized HubSpot administrator or record owner to approve the exact record IDs and pipelines in each deletion batch.
  4. Export all affected records, associations, properties, and pipeline configurations before making changes.
  5. Automatically detect hs_salesforceopportunityid and exclude synchronized records unless both HubSpot and Salesforce administrators provide explicit approval.
  6. Check contacts, companies, tickets, workflows, reports, integrations, historical records, permissions, and other dependencies before deleting a deal or pipeline.
  7. Prefer reversible archival or a quarantine stage over deletion. Apply a waiting period before permanent removal.
  8. Use least-privilege credentials: perform the audit with a read-only token and obtain temporary mutation privileges only after approval.
  9. Add batch-size limits, immutable audit logging, idempotency controls, and post-operation verification.
  10. Define objective criteria for determining that a pipeline is unused; zero active deals alone must not be sufficient.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Vague Triggers

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description is broad and operationally powerful, covering deletion, modification, pipeline standardization, and Salesforce-coordinated actions without defining clear trigger conditions, approval gates, or scope limits. In an agent setting, this can cause the skill to be invoked in ambiguous situations and perform destructive CRM changes on live deal data, especially because the instructions include deleting deals and changing deal stages.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.