Back to skill

Security audit

superwise-drift-detection-skill

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious with medium confidence, chiefly because scanners flagged vulnerable pinned dependencies and reported incomplete analysis of some referenced paths.

Review the reported dependency versions and confirm whether the advisories apply before installing. Also check that you trust the Superwise API integration and understand which environment variables and permissions the skill needs. The scan covered all listed components, but overall analysis was partial because some references could not be resolved; these results do not establish that every behavior is safe.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (24)

Known Vulnerable Dependency: pillow==10.4.0 — 85 advisory(ies): CVE-2026-112390 (Pillow: Infinite loop in MIC n_frames when the embedded TIFF); CVE-2026-96638 (Pillow: BMP RLE decoder memory-amplification DoS via unbounded delta escape / ab); CVE-2026-112391 (Pillow: PdfParser can recurse without limit in get_value() and linearize_page_tr) +82 more

Critical
Category
Supply Chain
Confidence
90% confidence
Finding

The manifest pins Pillow==10.4.0 as a transitive dependency of superwise-api, and the supplied scanner reports vulnerabilities involving crafted-file parsing and resource exhaustion. If attacker-controlled images or PDFs reach affected parsers, they could exhaust resources and interrupt monitoring, but the documented CSV/JSON drift workflow does not establish such a path. Consequently, the scanner's CRITICAL rating is not supported for this skill by the supplied evidence, and the individual advisory claims still require validation.

Content

No source excerpt is available for this finding.

Tainted flow: 'headers' from os.getenv (line 77, 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 · setup_dataset.py (reported line 84)May include surrounding context.

python
page = 1
    while True:
        resp = requests.get(
            "https://api.superwise.ai/v1/datasets",
            headers=headers,
            params={"page": page, "size": 25},

Tainted flow: 'headers' from os.getenv (line 64, 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 · setup_drift_policy.py (reported line 68)May include surrounding context.

python
existing = {}
    page = 1
    while True:
        resp = requests.get(
            POLICIES_URL, headers=headers, params={"page": page, "size": 25}, timeout=15
        )
        resp.raise_for_status()

Tainted flow: 'body' from os.getenv (line 104, credential/environment) → requests.post (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 · setup_drift_policy.py (reported line 135)May include surrounding context.

python
"initialize_with_historic_data": True,
    }

    resp = requests.post(POLICIES_URL, headers=_auth_headers(token), json=body, timeout=30)

    if resp.status_code not in (200, 201):
        print(f"[setup_policy] ERROR: Policy creation failed (HTTP {resp.status_code}):")

Tainted flow: 'url' from os.getenv (line 166, 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 · skill.py (reported line 144)May include surrounding context.

python
def _get_unpinned(url: str) -> tuple[int, bytes, bool]:
    """Plain GET, used only when INFERENCE_ENDPOINT_ALLOW_PRIVATE=true."""
    resp = requests.get(url, timeout=30, allow_redirects=False, stream=True)
    try:
        body = resp.raw.read(_MAX_INFERENCE_RESPONSE_BYTES + 1, decode_content=True)
        return resp.status_code, body, resp.is_redirect

Tainted flow: 'headers' from os.getenv (line 357, credential/environment) → requests.post (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 · skill.py (reported line 368)May include surrounding context.

python
if auto_trigger:
            try:
                resp = requests.post(
                    f"{_POLICIES_BASE}/{policy_id}/trigger", headers=headers, timeout=15
                )
                if resp.status_code in (200, 202, 204):

Tainted flow: 'headers' from os.getenv (line 357, 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 · skill.py (reported line 382)May include surrounding context.

python
policy: dict = {}
        for attempt in range(1, _POLL_MAX + 1):
            try:
                resp = requests.get(
                    f"{_POLICIES_BASE}/{policy_id}", headers=headers, timeout=15
                )
                resp.raise_for_status()

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

md
- inbound POST /run-check (bearer token) and GET /health (scheduler.py only, when deployed)
  file_read:
    - the training CSV passed to setup_dataset.py
    - .env (user-created)
  file_write:
    - .env (created by the user during setup; holds Superwise credentials; keep chmod 600 and out of version control)
    - superwise_policy_debug.json, superwise_policy_response.json (Superwise policy metadata, no credentials)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

md
- the training CSV passed to setup_dataset.py
    - .env (user-created)
  file_write:
    - .env (created by the user during setup; holds Superwise credentials; keep chmod 600 and out of version control)
    - superwise_policy_debug.json, superwise_policy_response.json (Superwise policy metadata, no credentials)
    - drift_check.log (optional, if the check is run in the background as described)
  shell:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · setup_dataset.py (reported line 45)May include surrounding context.

python
def _require_env(key: str) -> str:
    val = os.getenv(key)
    if not val:
        print(f"ERROR: {key} is not set. Add it to your .env file.")
        sys.exit(1)
    return val

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · setup_dataset.py (reported line 193)May include surrounding context.

python
token = sw.configuration.access_token

    if args.retrain:
        # Replace training dataset; inference dataset comes from existing .env
        training_ds = replace_training_dataset(sw, args.model_name, args.training_csv)
        inference_dataset_id = _require_env("SUPERWISE_INFERENCE_DATASET_ID")
        inference_dataset_name = _require_env("SUPERWISE_INFERENCE_DATASET_NAME")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · setup_dataset.py (reported line 208)May include surrounding context.

python
_print_result(result)

        training_cube = ingester.get_cube_name(training_ds.id)
        print("\n── Retrain complete. Update your .env with the new training dataset: ──")
        print(f"SUPERWISE_TRAINING_DATASET_ID={training_ds.id}")
        print(f"SUPERWISE_TRAINING_DATASET_NAME={training_ds.name}")
        print(f"SUPERWISE_TRAINING_CUBE_NAME={training_cube}")

Known Vulnerable Dependency: aiohttp==3.13.5 — 62 advisory(ies): CVE-2026-128127 (AIOHTTP: Base64 multipart parts bypass client_max_size); CVE-2026-128130 (AIOHTTP: Pure-Python parser request replay and buffer growth behind a declined u); CVE-2026-54279 (aiohttp: Host-Only Cookies Become Domain Cookies After CookieJar Persistence) +59 more

High
Category
Supply Chain
Confidence
80% confidence
Finding

The manifest pins aiohttp==3.13.5, which the supplied scanner reports as affected; hashes prevent unexpected artifact changes but do not fix vulnerabilities in the pinned release. Exploitation depends on affected functionality being used: this skill describes outbound SDK traffic and a Flask scheduler, not an aiohttp server, so the reported server-parser issues are not demonstrably reachable. The exact advisory applicability and client-side exposure cannot be independently established from this manifest alone.

Content

No source excerpt is available for this finding.

Code capability 'env' detected in scheduler.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'network' detected in setup_dataset.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Code capability 'file_write' detected in setup_drift_policy.py but not covered by declared permissions.

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_write' capability that is not covered by the declared 'allowed-tools' preapproval. Review the host runtime's actual enforcement policy; runtime permissions are unknown unless separately verified, and this declaration alone does not establish a permission ceiling.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · skill.py (reported line 161)May include surrounding context.

python
"""
    url = os.getenv("INFERENCE_ENDPOINT_URL")
    if not url:
        raise RuntimeError("INFERENCE_ENDPOINT_URL is not set in .env")

    pinned_ip = _validate_inference_url(url)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · skill.py (reported line 317)May include surrounding context.

python
if primary:
        policies.append(("primary", primary))

    for key, val in sorted(os.environ.items()):
        if key.startswith("SUPERWISE_DRIFT_POLICY_ID_") and val:
            label = key[len("SUPERWISE_DRIFT_POLICY_ID_"):].lower()
            policies.append((label, val))

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · setup_dataset.py (reported line 85)May include surrounding context.

python
page = 1
    while True:
        resp = requests.get(
            "https://api.superwise.ai/v1/datasets",
            headers=headers,
            params={"page": page, "size": 25},
            timeout=15,

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · setup_drift_policy.py (reported line 47)May include surrounding context.

python
load_dotenv()

POLICIES_URL = "https://api.superwise.ai/v1/policies"


def _require_env(key: str) -> str:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · skill.py (reported line 220)May include surrounding context.

python
# ── Drift check via Superwise ─────────────────────────────────────────────────

_POLICIES_BASE = "https://api.superwise.ai/v1/policies"
_POLL_INTERVAL = 15   # seconds between status polls
_POLL_MAX = 12        # max polls before giving up (~3 minutes)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · superwise_ingest.py (reported line 36)May include surrounding context.

python
# Superwise REST endpoints
_INGEST_URL = "https://api.superwise.ai/v1/datasets/{dataset_id}/log"
_QUERY_URL = "https://api.superwise.ai/v1/query/load"

# Tuning knobs
PAGE_SIZE = 1000        # CubeJS rows per page

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · superwise_ingest.py (reported line 92)May include surrounding context.

python
This method fetches the dataset object and returns the correct cube name.
        """
        resp = requests.get(
            f"https://api.superwise.ai/v1/datasets/{dataset_id}",
            headers=self._ingest_headers(),
            timeout=15,
        )

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · superwise_ingest.py (reported line 35)May include surrounding context.

python
logger = logging.getLogger(__name__)

# Superwise REST endpoints
_INGEST_URL = "https://api.superwise.ai/v1/datasets/{dataset_id}/log"
_QUERY_URL = "https://api.superwise.ai/v1/query/load"

# Tuning knobs