Back to skill

Security audit

NetBox API

Security checks for vulnerabilities and agentic risk

Overview

This skill is not malicious, but it should be reviewed because it can use a stored NetBox token to make live infrastructure inventory changes and can optionally disable TLS verification.

Install only if you intend agents to operate a real NetBox instance. Use a least-privilege NetBox token, review planned writes before execution, avoid broad admin tokens, and do not enable NETBOX_INSECURE_TLS unless you fully control the network and understand the risk.

Vulnerability Patterns
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill explicitly instructs use of network access, bearer-token authentication, and Python scripting against a live NetBox API, yet it declares no permissions. That mismatch is dangerous because an agent may be allowed to perform authenticated inventory changes, read environment secrets, or invoke shell/network capabilities without an explicit permission boundary or user visibility.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This skill is centered on mutating production inventory state: device moves, renames, cable changes, and IP reassignment. Without an explicit warning and confirmation requirement before write operations, an agent could apply destructive or hard-to-reverse changes to a real NetBox instance based on ambiguous instructions or stale assumptions.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- 42U racks: U positions counted from 1; "RU 1 → 2" style docs = 2U nodes at
  starting units 1, 3, 5, ….
- TLS: internal cert — the script verifies certificates by default; for
  self-signed CAs export `NETBOX_INSECURE_TLS=1` (equivalent to `curl -k`).
- Keep tokens in the script/session only; do NOT write them into skill files or
  reference notes (this file intentionally has none).
Confidence
95% confidence
Finding
The note explicitly allows disabling TLS verification via `NETBOX_INSECURE_TLS=1`, equivalent to `curl -k`, which permits man-in-the-middle interception or modification of API traffic. In this skill's context, the API performs sensitive and destructive infrastructure changes, so bypassing certificate validation can expose tokens and enable unauthorized device, IP, or cable modifications.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
Auth: --token *** flag, else read from ~/.config/netbox/token (chmod 600,
      one token per line). Never hardcode the token in files or commits.
TLS: certificate verification ON by default. Internal/self-signed CAs:
     export NETBOX_INSECURE_TLS=1 (equivalent to curl -k).
Stdout: JSON. Exit: 0 ok, 1 HTTP error, 2 usage/auth error.

Pagination: `all` follows the `next` URL from each response — never steps
Confidence
89% confidence
Finding
The script explicitly supports disabling TLS certificate validation via `NETBOX_INSECURE_TLS=1`, equivalent to `curl -k`. In a tool that sends bearer tokens and performs administrative API actions, this can expose credentials and request contents to man-in-the-middle interception or tampering if used on an untrusted network.

Static analysis

Detected: suspicious.insecure_tls_verification

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/netbox_api.py:42