Back to skill

Security audit

insentek-openapi

Security checks across malware telemetry and agentic risk

Overview

The skill appears coherent for querying Insentek IoT data, but it needs review because stored API credentials can be sent to any configured API base URL.

Review before installing if the Insentek account contains sensitive operational data. Use only the default Insentek endpoint or a trusted test/self-hosted endpoint; do not set INSENTEK_API_BASE or --api-base to an untrusted host. Prefer interactive login instead of passing --secret on the command line, rotate credentials if they may have been exposed, and check export/report output paths before allowing file writes.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Tainted flow: 'req' from os.environ.get (line 38, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
for k, v in headers.items():
            req.add_header(k, v)
    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            return json.loads(resp.read().decode("utf-8"))
    except urllib.error.HTTPError as e:
        body = e.read().decode("utf-8")
Confidence
95% confidence
Finding
with urllib.request.urlopen(req, timeout=30) as resp:

Tainted flow: 'req' from os.environ.get (line 78, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
req.data = json.dumps(data).encode("utf-8")

    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            return json.loads(resp.read().decode("utf-8"))
    except urllib.error.HTTPError as e:
        # 认证失败,尝试刷新 token 后重试一次
Confidence
93% confidence
Finding
with urllib.request.urlopen(req, timeout=30) as resp:

Tainted flow: 'req' from os.environ.get (line 78, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
# 7. API 可达性(不带认证,只检查服务是否在线)
    try:
        req = urllib.request.Request(f"{api_base}/v3/token", method="GET")
        with urllib.request.urlopen(req, timeout=10) as resp:
            # 400 是正常的(缺少参数),说明服务在线
            results["api_reachable"] = {
                "ok": True,
Confidence
91% confidence
Finding
with urllib.request.urlopen(req, timeout=10) as resp:

Description-Behavior Mismatch

Medium
Confidence
77% confidence
Finding
This file implements credential management commands (`login`, `logout`, `auth status`) that are not reflected in the stated skill purpose of querying IoT device data. That hidden expansion of capability increases security sensitivity because users may provide secrets to a package whose description does not prominently disclose local credential handling, creating a trust and secret-exposure risk even if the implementation appears intentional rather than malicious.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The auth status command prints the stored App Secret and access token directly to the console, which exposes live credentials to anyone with terminal access or access to shell logs, screenshots, CI output, or recorded sessions. For an IoT data skill, this capability is not necessary for normal status checking and materially increases the chance of credential theft and downstream API compromise.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
Reading the API base URL from an environment variable allows the script’s authenticated traffic to be redirected away from the expected Insentek service without any trust validation. In this skill context, that means sensitive device queries and bearer tokens may be sent to an unintended or malicious server.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The --api-base command-line argument permits users or calling automation to redirect authenticated requests, including the Authorization header, to any URL. Because this is an export utility for IoT data, the feature materially increases the chance of token theft and data disclosure if the script is wrapped by an agent or invoked with untrusted parameters.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
This script exposes a broad local file-write primitive that accepts attacker-controlled content and an attacker-controlled output path. Although it blocks a few hardcoded system directories, it still permits writing arbitrary HTML to many other locations, which is outside the stated IoT-querying purpose and can enable persistence, phishing pages, or unsafe modification of workspace files when invoked by an agent.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The capability to write arbitrary HTML files is not aligned with the manifest's described functionality of querying and analyzing IoT device data. In agent settings, capability mismatch is risky because a seemingly data-only skill can be abused as a file-dropper, especially when the written HTML may later be opened locally and execute active content in a browser.

Missing User Warnings

High
Confidence
99% confidence
Finding
Printing secret and token values without masking or warning is a direct sensitive-data exposure issue. These values can be captured by terminal history tools, logging wrappers, support transcripts, or shoulder-surfing, enabling unauthorized access to the Insentek API and potentially all data or actions authorized by the account.

Missing User Warnings

High
Confidence
99% confidence
Finding
The login command explicitly prints the API secret and bearer token to stdout after successful authentication. Console output is commonly captured in shell history, terminal scrollback, CI logs, remote session recordings, and support screenshots, so exposing these values can directly lead to credential compromise and unauthorized access to the Insentek API.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code sends `appid` and `secret` as URL query parameters in a GET request to `/v3/token`. Query strings are commonly logged by proxies, gateways, browser/dev tooling, and server access logs, which increases the chance of credential disclosure even when HTTPS is used. In a credential-handling CLI, this is a real security weakness because the secret is long-lived and can be reused to mint tokens.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The documentation instructs users to obtain tokens by placing appid and secret in the URL query string, which risks exposing credentials through browser history, reverse proxies, server logs, monitoring tools, and referrer leakage. Because this skill is an IoT data integration skill that accesses device inventories and telemetry, compromised API credentials could allow unauthorized access to device metadata and sensor data, and potentially enable sensitive operations depending on granted scope.

VirusTotal

66/66 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

Detected: suspicious.dangerous_exec, suspicious.potential_exfiltration

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
packages/insentek-skill-cli/lib/python.js:9

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
packages/insentek-skill-cli/lib/utils.js:34

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
packages/insentek-skill-cli/test/cli-json.test.js:11

Sensitive-looking file read is paired with a network send.

Warn
Code
suspicious.potential_exfiltration
Location
packages/insentek-skill-cli/lib/core/credentials.js:119