Back to skill

Security audit

HiEnergy Advertiser Intelligence Affiliate Copilot

Security checks for vulnerabilities and agentic risk

Overview

This HiEnergy skill is mostly coherent and disclosed, but it can change account data and reveal contacts or transactions without enough built-in confirmation or redaction.

Review this skill before installing if your HiEnergy key can modify contacts or publisher records. Use a least-privilege API key if available, avoid passing keys on the command line, avoid running debug scripts in logged environments, and require human confirmation before any contact creation, reassignment, or publisher update.

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

Warning
Location
scripts/hienergy_skill.py:1651
Finding

API Key Exposed Through Command-Line Arguments

Content
View full analysis
1: api_key = sys.argv[1] else: api_key = os.environ.get('HIENERGY_API_KEY') if not api_key: print("Usage: python hienergy_skill.py ") print("Or set HIENERGY_API_KEY environment variable") ``` ### Technical Analysis The script accepts the HiEnergy API key as a positional command-line argument and explicitly recommends this invocation through its usage message. Command-line arguments are not an appropriate channel for secrets because they may be exposed through: - Shell command history. - Process inspection utilities and operating-system process metadata. - Process accounting and endpoint-monitoring products. - CI/CD command logs. - Terminal session recording and diagnostic collection. Although the script also supports an environment variable, the positional argument takes precedence and the displayed usage encourages users to expose the credential. ### Attack Path 1. A user follows the displayed instruction and runs: ```bash python scripts/hienergy_skill.py ``` 2. The command, including the key, is retained in shell history or process-monitoring data. 3. Another local user, administrator, monitoring agent, support operator, or log reader obtains the argument. 4. The exposed key is replayed against `https://app.hienergy.ai/api/v1`. 5. The attacker receives the same API permissions and data access assigned to the compromised HiEnergy account. This path requires access to local process information, history, or collected logs; it does not provide remote code execution by itself. ### Impact Assessment A recovered key can authorize access to the account-scoped HiEnergy API. Depending on the compromised account's server-side privileges, this can expose adverti ...[truncated 347 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
debug_api_connectivity.py:20
Finding

Authenticated API Response Headers and Bodies Printed Without Redaction

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/hienergy_skill.py:112
Finding

Remote API Error Bodies Propagated Into Exceptions Without Sanitization

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Third-Party Dependency Is Not Reproducibly Pinned

Content
View full analysis
=2.31.0,<3.0.0 ``` The documented installation command in `SKILL.md:30-35` is: ```bash export HIENERGY_API_KEY="" # optional alias export HI_ENERGY_API_KEY="$HIENERGY_API_KEY" pip install -r requirements.txt ``` ### Technical Analysis The dependency range permits any future `requests` 2.x release rather than selecting a specific reviewed artifact. No package hashes or lock file are supplied. Consequently, identical installation commands at different times or against differently configured Python indexes can install different package code and transitive dependency versions. The project uses the legitimate package name `requests`; no typosquatting or known malicious package was identified. The confirmed weakness is the absence of reproducible pinning and integrity verification, which increases supply-chain exposure. ### Attack Path 1. A user runs `pip install -r requirements.txt`. 2. The package resolver queries the user's configured package indexes. 3. It selects the newest version satisfying `>=2.31.0,<3.0.0`, along with currently resolved transitive dependencies. 4. If a future release, compromised index, or substituted artifact is malicious or vulnerable, unreviewed package code is installed. 5. That code can execute during installation or later when imported by the skill. Successful exploitation requires compromise or unsafe configuration of the dependency distribution channel, or publication of a harmful version satisfying the range. ### Impact Assessment A malicious installed dependency would run with the privileges of the user installing or executing the skill. It could read the `HIENERGY_API_KEY`, access files available to that user, modify local data, or make arbitrary network requests. No malicious dependency is present in the audite ...[truncated 114 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (22)

Tainted flow: 'headers' from os.environ.get (line 15, 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 · debug_api_connectivity.py (reported line 20)May include surrounding context.

python
"Content-Type": "application/json"
    }
    print(f"Requesting {url}...")
    response = requests.get(url, headers=headers, params={'limit': 1}, timeout=10)
    
    print(f"Status Code: {response.status_code}")
    print(f"Response Headers: {response.headers}")

Tainted flow: 'headers' from os.environ.get (line 6, 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 · debug_mimic_request.py (reported line 16)May include surrounding context.

python
print(f"Requesting {url} with params {params}...")
try:
    response = requests.get(url, headers=headers, params=params, timeout=30)
    print(f"Status: {response.status_code}")
    print(f"Data length: {len(response.text)}")
except Exception as e:

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill description emphasizes discovery and querying, but it also exposes mutation operations like create_contact, replace_contact, and update_publisher. Users or orchestrators may treat the skill as read-only based on the description, creating a risk of unintended data modification in a third-party account.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes discovery and querying, but it also exposes mutation operations like create_contact, replace_contact, and update_publisher. Users or orchestrators may treat the skill as read-only based on the description, creating a risk of unintended data modification in a third-party account.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill includes mutating operations that create contacts, replace contacts, and update publishers, while its natural-language copilot framing emphasizes discovery and intelligence lookups. In an agent setting, exposing write-capable methods without strong authorization, confirmation, and scope separation increases the risk of unintended or unauthorized remote state changes to CRM-like records.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
90% confidence
Finding

The publisher update capability allows arbitrary PATCH updates to publisher attributes, and the intent classifier even associates publisher queries with 'network key' and 'credential' concepts. In a broadly exposed skill, this creates a dangerous path for modifying sensitive publisher configuration or credential-related fields unrelated to simple affiliate intelligence lookup.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises access to environment credentials and networked API operations but does not declare tool scope such as allowed tools or permissions. That weakens least-privilege controls and makes it harder for a host platform or reviewer to understand and constrain what the skill can access at runtime.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This script retrieves partner contact information, including names and email addresses, and prints it directly to stdout without any access-control check, masking, consent notice, or sensitivity warning. In many agent/runtime contexts, console output is logged, persisted, or shown to downstream users, which can expose personal contact data beyond the intended audience and create privacy/compliance risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest description is heavily framed around finding, querying, and managing affiliate programs, deals, transactions, advertiser intelligence, and partner contacts through API lookups and analytics. This script performs a privileged write operation to create a new contact, which is materially different from the mostly discovery/query-oriented capability described and introduces account-modifying behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script retrieves affiliate transaction records and prints publisher-identifying data and transaction details directly to stdout, which can expose sensitive business and partner information in terminals, logs, CI output, or shared execution environments. In this skill’s affiliate-marketing context, transaction amounts, dates, statuses, and publisher names are commercially sensitive and may also constitute personal or partner data depending on the publisher representation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script prints transaction details to stdout and, when no match is found, dumps a full sample transaction record for debugging. Transaction objects in affiliate/advertiser systems commonly contain sensitive business data and may include partner identifiers, financial amounts, contact metadata, or other fields that should not be exposed in logs or console output, especially in shared runtime environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code file makes network-backed data retrieval calls via get_advertisers and get_transactions, then outputs transaction metadata including dates, amounts, status, and publisher names. While it logs progress, those messages do not warn the user that potentially sensitive transactional data will be accessed and displayed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

create_contact sends user-supplied contact data to the remote API immediately, with no in-method confirmation, dry-run, or safety prompt. In an agent environment, this can cause accidental disclosure of personal data and unintended creation of records if a user request is ambiguous or the agent overreaches.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring describes a concrete multi-step intent involving web search for LinkedIn contacts and then creating contacts in the API, but the function body simply returns None. This is not merely incomplete documentation; it actively describes behavior that is absent from the code and could mislead reviewers about the skill's implemented capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

replace_contact reassigns a contact to another advertiser via a POST request without confirmation or secondary verification. A mistaken invocation could corrupt partner relationship data or move sensitive contact records to the wrong account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

update_publisher performs direct remote modifications using arbitrary caller-provided data and does not require confirmation or constrain which fields may be changed. This makes accidental destructive edits or unauthorized configuration changes more likely when used through natural-language automation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The intent router maps broad terms like 'contact', 'lead', 'client', and 'prospect' directly to contact lookup, then returns contact results in chat. This weak intent boundary can cause personal-contact disclosure from vague prompts that do not establish authorization or the user's need to access PII.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The contact formatting function explicitly prints email addresses into chat responses. Exposing direct contact details in conversational output increases the risk of unnecessary personal-data disclosure, prompt-triggered harvesting, and leakage into logs or transcripts.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The general search path queries contacts alongside other resources and returns matched names, enabling broad natural-language prompts to surface contact information without a dedicated privacy gate. Because contacts are included in a catch-all search flow, users may receive personal data even when they did not clearly request contact disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The script reads an API key from the environment and uses it to initialize an external service client, but there is no comment, docstring, or user-facing disclosure that the skill accesses credentials for outbound use. The existing print only appears when the key is absent, so it does not warn users about the credential-dependent behavior during normal execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code fetches recent transactions via skill.get_transactions(...), which is a network/data-access operation involving potentially sensitive account information. While errors are printed, there is no user-facing warning, confirmation, or explanatory comment/docstring disclosing that the script will access remote transaction data.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency is only constrained to a broad range (>=2.31.0,<3.0.0) rather than pinned to a specific patched release, so builds may resolve to different requests versions over time, including versions affected by known advisories. In a skill that calls external APIs and may handle authentication, using a potentially vulnerable HTTP client increases the chance of credential leakage, TLS/verification issues, or other request-handling flaws if an unsafe version is installed.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.