Back to skill

Security audit

Nexapi

Security checks for vulnerabilities and agentic risk

Overview

The skill is a plausible NexAPI client, but it can store your API key in plaintext and can send it to a configurable, undocumented endpoint, so it should be reviewed before installing.

Install only if you trust the NexAPI service and the environment running the skill. Avoid setting NEXAPI_BASE_URL unless you fully trust the destination, prefer environment-based API keys over local plaintext storage in shared systems, and check the generated config file permissions after using auth set.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/nexapi.py:13
Finding

API credentials and sensitive request parameters can be redirected to an untrusted server

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/nexapi.py:77
Finding

API key is persisted in plaintext without enforced restrictive file permissions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (33)

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

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The request target is built from BASE_URL and HEALTH_PATH, both sourced from environment variables, and then fetched over the network. If an attacker can influence these variables, they can redirect the skill to arbitrary internal or external endpoints, creating an SSRF primitive and allowing API discovery data to be spoofed, which is especially relevant because the wrapper trusts the returned API metadata.

Content

Scanner excerpt · scripts/nexapi.py (reported line 111)May include surrounding context.

python
url = BASE_URL + HEALTH_PATH + separator + urllib.parse.urlencode({"sort": "hot"})
    try:
        req = urllib.request.Request(url, headers={"Accept": "application/json"})
        with urllib.request.urlopen(req, timeout=12) as resp:
            payload = json.loads(resp.read().decode("utf-8", errors="ignore"))
    except Exception:
        return {}

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

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The code sends authenticated requests to a URL derived from environment-controlled BASE_URL and remotely discovered API paths, attaching the X-API-Key header. An attacker who can change the base URL or poison the API cache/discovery response can cause the client to exfiltrate its API key to an attacker-controlled server or probe internal services, making this more dangerous than a generic wrapper because secrets are forwarded automatically.

Content

Scanner excerpt · scripts/nexapi.py (reported line 262)May include surrounding context.

python
req = urllib.request.Request(url, data=data, headers=headers, method=method)
    try:
        with urllib.request.urlopen(req, timeout=15) as resp:
            raw = resp.read()
            ctype = (resp.headers.get("Content-Type") or "").lower()
            if "application/json" in ctype:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 51)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 59)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 71)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 84)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 97)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 115)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 121)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 130)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 149)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 150)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 170)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 194)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 195)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 198)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 199)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 202)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 205)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 208)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 211)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 212)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 213)May include surrounding context.

md
python3 scripts/nexapi.py call ip-location ip=8.8.8.8

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill clearly instructs the agent to use network access, read environment variables, and read/write local files for API key and cache persistence, but it does not declare any explicit tool scope or permissions boundary. This creates an authorization ambiguity: a host system or user cannot easily tell, before execution, that the skill can access sensitive local state and make outbound requests, increasing the risk of over-privileged execution or unintended data exposure.

Content

No source excerpt is available for this finding.