Back to skill

Security audit

Create Icp Tiers

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-aligned for HubSpot ICP tier setup, but it asks for broad admin access and creates persistent workflows that can update every company record without enough rollout or rollback controls.

Review before installing or running. Use a HubSpot sandbox or small filtered cohort first, export or back up affected company data, define rollback steps, and avoid Super Admin where possible. Use separate least-privileged tokens for audit and mutation steps, rotate the mutation token afterward, and manually verify workflow triggers before enrolling all existing companies.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:19
Finding

Excessive Super Administrator Permission Requirement

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/execute.py:1
Finding

Executable Python Dependencies Are Not Reproducibly Pinned

Content
View full analysis
=3.10" # dependencies = [ # "requests>=2.31", # "python-dotenv>=1.0", # ] # /// ``` ### Technical Analysis The scripts specify only minimum dependency versions. A PEP 723-compatible runner may therefore resolve and install any future version satisfying these constraints. The project contains no lockfile, exact version constraints, package hashes, or other integrity controls that make dependency resolution reproducible. Both packages are imported into processes that hold `HUBSPOT_ACCESS_TOKEN`. Python package code executes during installation and import, so a compromised future package release, compromised package index, or unsafe package source could execute code in the same security context as the scripts. No malicious dependency or current compromise was identified during this static audit. Exploitation requires a separate supply-chain or package-resolution compromise, which limits the present risk level. ### Attack Path 1. A user invokes one of the scripts through a runner that automatically resolves its declared dependencies. 2. The runner selects a future matching release of `requests` or `python-dotenv`, or retrieves a package from a compromised or incorrectly configured package source. 3. The selected package executes malicious code during installation or import. 4. The malicious code runs inside the script process, where `HUBSPOT_ACCESS_TOKEN` has been loaded from the environment. 5. The malicious package reads the token, accesses local files available to the process, performs unauthorized HubSpot API operations, or transmits sensitive information externally. ## ...[truncated 514 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (23)

Tainted flow: 'HEADERS' from os.environ (line 32, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/after.py (reported line 54)May include surrounding context.

python
# ── Helpers ──────────────────────────────────────────────────────

def search_count(filters):
    resp = requests.post(SEARCH_URL, headers=HEADERS, json={
        "filterGroups": [{"filters": filters}],
        "limit": 1,
    })

Tainted flow: 'HEADERS' from os.environ (line 32, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/after.py (reported line 63)May include surrounding context.

python
def search_sample(filters, properties, limit=10):
    resp = requests.post(SEARCH_URL, headers=HEADERS, json={
        "filterGroups": [{"filters": filters}],
        "properties": properties,
        "limit": limit,

Tainted flow: 'HEADERS' from os.environ (line 37, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/before.py (reported line 51)May include surrounding context.

python
# ── Helpers ──────────────────────────────────────────────────────

def search_count(filters):
    resp = requests.post(SEARCH_URL, headers=HEADERS, json={
        "filterGroups": [{"filters": filters}],
        "limit": 1,
    })

Tainted flow: 'HEADERS' from os.environ (line 37, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/before.py (reported line 189)May include surrounding context.

python
print("ICP TIER PROPERTY STATUS")
print("-" * 40)

prop_resp = requests.get(
    f"{BASE}/crm/v3/properties/companies/{PROPERTY_NAME}", headers=HEADERS,
)
if prop_resp.status_code == 200:

Tainted flow: 'HEADERS' from os.environ (line 38, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/execute.py (reported line 90)May include surrounding context.

python
# Step 1: Check if property already exists
print(f"Step 1: Checking if '{PROPERTY_NAME}' property already exists...")
resp = requests.get(PROPERTY_URL, headers=HEADERS)

if resp.status_code == 200:
    existing = resp.json()

Tainted flow: 'HEADERS' from os.environ (line 38, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/execute.py (reported line 112)May include surrounding context.

python
# Step 2: Create the property
    print(f"Step 2: Creating '{PROPERTY_NAME}' property...")
    resp = requests.post(CREATE_URL, headers=HEADERS, json=PROPERTY_PAYLOAD)

    if resp.status_code in (200, 201):
        print("  Property created successfully!")

Tainted flow: 'HEADERS' from os.environ (line 38, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/execute.py (reported line 120)May include surrounding context.

python
# Step 3: Verify
        print("Step 3: Verifying property by reading it back...")
        verify_resp = requests.get(PROPERTY_URL, headers=HEADERS)

        if verify_resp.status_code == 200:
            verified = verify_resp.json()

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says this skill classifies companies into ICP tiers and creates a custom property plus four HubSpot workflows. This code chunk does something materially different: it is an after-state verification/audit script. It only queries HubSpot company records through the search API, counts how many companies have the classification property, measures tier distribution, samples records for manual review, compares enrichment rates to a prior baseline, and writes results to a CSV file. There are no API calls to create a property, no workflow creation logic, and no writes back to HubSpot records. Because the primary purpose is auditing/verification rather than setup/classification, this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared purpose describes an action-oriented automation that creates HubSpot configuration and classifies companies. The supplied code chunk is only a 'before state' assessment script. It reads HubSpot company/property data, computes readiness metrics, checks for existence of the target property, and exports an audit CSV. Its primary purpose is materially different from the declared behavior because it audits prerequisites rather than performing the ICP tier setup or classification itself. The CSV export is an additional undeclared capability, though secondary compared with the larger mismatch in core purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description says the skill classifies companies into ICP tiers based on firmographic data and creates a custom property plus four classification workflows. However, this code chunk only interacts with the HubSpot Properties API: it reads whether a company property exists, creates it if missing, and verifies the result. The workflow creation is explicitly deferred to manual setup, and there is no code that evaluates industry or employee count or assigns tiers to companies. Therefore the actual behavior is narrower and materially different from the declared purpose.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/after.py (reported line 28)May include surrounding context.

python
from dotenv import load_dotenv

# ── Configuration ────────────────────────────────────────────────
load_dotenv(os.path.join(os.path.dirname(__file__), "..", ".env"))

TOKEN = os.environ["HUBSPOT_ACCESS_TOKEN"]
BASE = "https://api.hubapi.com"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/before.py (reported line 33)May include surrounding context.

python
from dotenv import load_dotenv

# ── Configuration ────────────────────────────────────────────────
load_dotenv(os.path.join(os.path.dirname(__file__), "..", ".env"))

TOKEN = os.environ["HUBSPOT_ACCESS_TOKEN"]
BASE = "https://api.hubapi.com"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/execute.py (reported line 34)May include surrounding context.

python
from dotenv import load_dotenv

# ── Configuration ────────────────────────────────────────────────
load_dotenv(os.path.join(os.path.dirname(__file__), "..", ".env"))

TOKEN = os.environ["HUBSPOT_ACCESS_TOKEN"]
BASE = "https://api.hubapi.com"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill contains code and instructions that use environment variables and make authenticated network calls to HubSpot, but it declares no explicit tool scope or permission boundaries. In an agent setting, that increases the chance the skill will run with broader capabilities than intended and access or modify CRM data without clear operator awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs operators to create and activate workflows that will update a classification field across every company in the CRM, yet it does not provide a prominent data-impact warning, dry-run path, rollback procedure, or approval checkpoint. In a production CRM, broad automated writes can misclassify records at scale, affect downstream routing/scoring, and trigger unintended business processes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/after.py (reported line 54)May include surrounding context.

python
# ── Helpers ──────────────────────────────────────────────────────

def search_count(filters):
    resp = requests.post(SEARCH_URL, headers=HEADERS, json={
        "filterGroups": [{"filters": filters}],
        "limit": 1,
    })

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/after.py (reported line 63)May include surrounding context.

python
# ── Helpers ──────────────────────────────────────────────────────

def search_count(filters):
    resp = requests.post(SEARCH_URL, headers=HEADERS, json={
        "filterGroups": [{"filters": filters}],
        "limit": 1,
    })

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/before.py (reported line 51)May include surrounding context.

python
# ── Helpers ──────────────────────────────────────────────────────

def search_count(filters):
    resp = requests.post(SEARCH_URL, headers=HEADERS, json={
        "filterGroups": [{"filters": filters}],
        "limit": 1,
    })

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The branch at L203-L204 only prints a status message when the property is absent; there is no API call anywhere in this file to create the property. This actively contradicts the code's behavior and could mislead an operator about what running the script will do.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/execute.py (reported line 112)May include surrounding context.

python
# Step 2: Create the property
    print(f"Step 2: Creating '{PROPERTY_NAME}' property...")
    resp = requests.post(CREATE_URL, headers=HEADERS, json=PROPERTY_PAYLOAD)

    if resp.status_code in (200, 201):
        print("  Property created successfully!")

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code reads HUBSPOT_ACCESS_TOKEN directly from the environment, which is a sensitive credential access operation covered by the warning requirement for code files. Although the module docstring explains the script's business purpose, it does not disclose that the script requires and uses an access token.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The requests.post call transmits company-property query data to HubSpot over the network, which falls under network/HTTP operations that should have some form of user disclosure. The script prints analysis results, but it does not explicitly warn users that it will make authenticated API calls against their HubSpot CRM data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The code creates or overwrites before_create_icp_tiers.csv, a file write operation that can affect local data. While the docstring lists the CSV as an output and the script prints the final path after writing, there is no explicit pre-action warning that the file will be written to disk and potentially overwritten.

Content

No source excerpt is available for this finding.