T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:19- Finding
Excessive Super Administrator Permission Requirement
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
SKILL.md:19Excessive Super Administrator Permission Requirement
scripts/execute.py:1Executable Python Dependencies Are Not Reproducibly Pinned
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# ── Helpers ──────────────────────────────────────────────────────
def search_count(filters):
resp = requests.post(SEARCH_URL, headers=HEADERS, json={
"filterGroups": [{"filters": filters}],
"limit": 1,
})
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def search_sample(filters, properties, limit=10):
resp = requests.post(SEARCH_URL, headers=HEADERS, json={
"filterGroups": [{"filters": filters}],
"properties": properties,
"limit": limit,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# ── Helpers ──────────────────────────────────────────────────────
def search_count(filters):
resp = requests.post(SEARCH_URL, headers=HEADERS, json={
"filterGroups": [{"filters": filters}],
"limit": 1,
})
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
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:
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# 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()
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# 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!")
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# 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()
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.
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.
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.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
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"
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.
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# ── Helpers ──────────────────────────────────────────────────────
def search_count(filters):
resp = requests.post(SEARCH_URL, headers=HEADERS, json={
"filterGroups": [{"filters": filters}],
"limit": 1,
})
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# ── Helpers ──────────────────────────────────────────────────────
def search_count(filters):
resp = requests.post(SEARCH_URL, headers=HEADERS, json={
"filterGroups": [{"filters": filters}],
"limit": 1,
})
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# ── Helpers ──────────────────────────────────────────────────────
def search_count(filters):
resp = requests.post(SEARCH_URL, headers=HEADERS, json={
"filterGroups": [{"filters": filters}],
"limit": 1,
})
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.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 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!")
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.
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.
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.