Back to skill

Security audit

Omada Viewer

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it needs Review because it handles Omada controller credentials while allowing unsafe TLS settings and includes write-capable API references despite a read-only framing.

Install only if you are comfortable giving the agent read access to Omada network inventory and client metadata. Use a dedicated Viewer-only Open API application, require HTTPS with certificate verification, do not set OMADA_VERIFY_SSL=false, and do not let the agent use the broad endpoint catalog for write or admin operations.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/omada_query.py:53
Finding

Controller credentials and access tokens may be transmitted without authenticated TLS

Content
View full analysis

Vulnerability Details

File Location: scripts/omada_query.py, lines 53-58 and 70-103
Vulnerability Type: Insecure transport of sensitive authentication material
Risk Level: High

Vulnerable Code

python
self.base_url = os.environ.get("OMADA_URL", "").rstrip("/")
self.client_id = os.environ.get("OMADA_CLIENT_ID", "")
self.client_secret = os.environ.get("OMADA_CLIENT_SECRET", "")
self.omadac_id = os.environ.get("OMADA_OMADAC_ID", "")
self.site_name = os.environ.get("OMADA_SITE", "")
self.verify_ssl = os.environ.get("OMADA_VERIFY_SSL", "true").lower() != "false"
python
def _request(self, method: str, endpoint: str, **kwargs) -> dict:
    url = f"{self.base_url}{endpoint}"
    headers = kwargs.pop("headers", {})
    headers["Content-Type"] = "application/json"
    if self.token:
        headers["Authorization"] = f"AccessToken={self.token}"

    resp = requests.request(
        method,
        url,
        headers=headers,
        verify=self.verify_ssl,
        **kwargs
    )
    resp.raise_for_status()
    return resp.json()

def get_controller_id(self):
    """Get the controller's omadacId from /api/info."""
    if self.omadac_id:
        return
    resp = requests.get(
        f"{self.base_url}/api/info",
        verify=self.verify_ssl
    )
    resp.raise_for_status()
    data = resp.json()
    self.omadac_id = data["result"]["omadacId"]

def authenticate(self):
    """Get OAuth2 access token using client credentials."""
    body = {
        "omadacId": self.omadac_id,
        "client_id": self.client_id,
        "client_secret": self.client_secret
    }

    resp = requests.post(
        f"{self.base_url}/openapi/authorize/token",
        params={"grant_type": "client_credentials"},
        json=body,
        headers={"Content-Type": "application/json"},
        verify=self.verify_ssl
    )

Technical Analysis

The sensitive network transmission itself is necessary for client-credentials authentication against t ...[truncated 2378 chars]

Remediation
View remediation

Remediation Suggestions

  1. Parse OMADA_URL with a standard URL parser and reject every scheme other than https.
  2. Remove support for OMADA_VERIFY_SSL=false from normal operation.
  3. For self-signed controllers, accept a user-provided CA bundle through a setting such as OMADA_CA_BUNDLE and pass its path to requests.
  4. Where a private CA is unavailable, support explicit certificate or public-key fingerprint pinning instead of disabling verification.
  5. Remove the global suppression of InsecureRequestWarning.
  6. Validate that the configured hostname matches the intended controller before sending credentials.
  7. Add explicit connection and response timeouts to all requests.
  8. Continue requiring a dedicated Viewer-only API application and document that administrative credentials must not be used.
  9. Avoid logging request bodies, authorization headers, client secrets, or complete authentication exceptions.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/extract_endpoints.py:69
Finding

Read-only Skill bundles and generates a catalog of configuration-changing API operations

Content
View full analysis

Vulnerability Details

File Location: scripts/extract_endpoints.py, lines 69-76; generated content in references/all-endpoints.md, including lines 31-45, 67-73, and 197
Vulnerability Type: Excess capability exposure and violation of the declared read-only boundary
Risk Level: Medium

Vulnerable Code

python
for method, details in methods.items():
    if method not in ["get", "post", "put", "delete", "patch"]:
        continue
    summary = details.get("summary", "")
    categories[category].append({
        "method": method.upper(),
        "path": path,
        "summary": summary
    })

The resulting references/all-endpoints.md includes configuration-changing operations such as:

text
POST .../acls/eap-acls
Create new eap ACL

PUT .../applicationControl/filters/{filterId}
Modify an existing filter

DELETE .../applicationControl/filters/{filterId}
Delete an existing filter

POST .../aps/site-move
Move APs to another site

POST .../cli/configs/config-id/{configId}/apply
Apply the CLI configuration

This conflicts with the declaration in SKILL.md:

text
Does not make configuration changes
Does not create, edit, or delete controller settings

Technical Analysis

The executable query client uses GET for diagnostic API operations, apart from the authentication POST required to obtain an access token. It does not itself expose a generic write-request command.

Nevertheless, the Skill explicitly includes references/all-endpoints.md as an available endpoint reference. The extraction script intentionally retains POST, PUT, DELETE, and PATCH operations, including endpoints that create or delete access-control rules, alter device configurations, move devices, and apply CLI configurations.

An agent relying on the Skill's references can therefore learn and potentially invoke operations outside the declared read-only scope. The recommended Viewer role is a useful operational control, but the Skill does not verif ...[truncated 1949 chars]

Remediation
View remediation

Remediation Suggestions

  1. Change the endpoint extractor used by this Skill to retain only GET operations.
  2. Exclude state-changing POST endpoints even where the API labels them as diagnostics.
  3. Regenerate references/all-endpoints.md as a GET-only, UTF-8 encoded catalog.
  4. Remove all create, modify, delete, apply, move, start, stop, reboot, and configuration endpoints from the read-only Skill.
  5. Keep any future write-capable endpoint catalog in a separate Skill with explicit authorization requirements and clear administrative warnings.
  6. Route all controller access through a constrained wrapper that rejects methods other than GET, except for the exact authentication endpoint.
  7. Consider validating the application's effective role or permissions during setup and refusing operation when write privileges are detected, if the controller API exposes that information.
  8. Retain the recommendation to use a dedicated Viewer API application and strengthen it into a mandatory deployment requirement where feasible.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented purpose claims live, credentialed read-only diagnostics against an Omada controller, but the detected behavior indicates local OpenAPI parsing and endpoint cataloging instead. This mismatch is dangerous because reviewers or users may grant network access, credentials, or trust assumptions based on declared read-only diagnostics, while the actual implementation does something materially different and may evade proper scrutiny.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/all-endpoints.md` — categorized endpoint catalog

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

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

md
- Prefer **Viewer** role for normal use
- Never paste secrets into chat
- Keep read-only diagnostics separate from any future admin/write skill
- If you later publish a write-capable version, use a separate Admin-scoped API app

## Troubleshooting

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/api-endpoints.md (reported line 9)May include surrounding context.

Authentication

Get Access Token

text
POST /openapi/authorize/token
Content-Type: application/json

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/omada_query.py (reported line 89)May include surrounding context.

python
self.omadac_id = data["result"]["omadacId"]
    
    def authenticate(self):
        """Get OAuth2 access token using client credentials."""
        # Build the request body as a proper dict
        body = {
            "omadacId": self.omadac_id,

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares network, environment, and file-read relevant behavior but does not explicitly constrain tool scope with permissions or allowed-tools. In an agent environment, that omission can permit broader-than-expected access paths and weakens reviewability, especially because the skill references local files, credentials, and HTTPS interactions.

Content

No source excerpt is available for this finding.

Ae2

Medium
Category
analysis-evasion
Confidence
90% confidence
Finding

Artifact content does not match its filename extension

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring advertises a 'dhcp-reservations' command that lists DHCP reservations, but the implementation builds rows from LAN network DHCP settings such as start/end range, DNS, and lease time rather than reservation entries. This is an active contradiction between the command's documented intent and the code's actual behavior, not merely an omitted detail.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code performs outbound requests to the Omada controller, including authentication with OMADA_CLIENT_ID and OMADA_CLIENT_SECRET and subsequent queries that retrieve potentially sensitive network inventory and client information. Although the module docstring describes the tool as a query client, there is no explicit warning or disclosure about transmitting credentials and management data to a remote controller, which is the type of user disclosure required for code files when handling network calls and credentials.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/omada_query.py (reported line 97)May include surrounding context.

python
"client_secret": self.client_secret
        }
        
        resp = requests.post(
            f"{self.base_url}/openapi/authorize/token",
            params={"grant_type": "client_credentials"},
            json=body,