Skip to content

Privacy and Evidence Sanitization

When collecting diagnostic data, test evidence, or logs from the Edge Computing LLM platform (via edge-cli logs or edge-llm-tests), it is critical to ensure that no sensitive data is leaked. This document details the evidence sanitization procedures.

What Must Be Excluded

The following types of data must never be included in raw or exported evidence files:

  1. User Prompts & LLM Outputs: The contents of conversations with the LLM.
  2. Credentials & Secrets: Passwords, API keys, TLS private keys, and Kubeconfigs.
  3. Personally Identifiable Information (PII): Usernames, email addresses, and external IP addresses.
  4. Internal Network Layouts: Exact internal IP addresses of pods (CIDR ranges are acceptable, but specific IPs should be masked).

The Safe Facts Catalog

The sanitization process relies on an allowlist approach where possible. We collect a "Safe Facts Catalog" which includes:

  • Node architecture (x86_64, arm64)
  • GPU Model (e.g., RTX 4090, A100)
  • VRAM Total and Available
  • K3s Version
  • Kubernetes Resource Statuses (Ready/NotReady)
  • Error Codes and generic stack traces

Sanitization Workflow

When an evidence bundle is generated:

  1. Collection: Raw logs and system state are collected into a temporary, secure directory.
  2. Scrubbing: Regular expressions and data-masking scripts parse the files.
  3. Example: s/([0-9]{1,3}\.){3}[0-9]{1,3}/[IP_REDACTED]/g
  4. Secrets are identified via entropy checks and known patterns (e.g., sk-[a-zA-Z0-9]{48}).
  5. Packaging: The scrubbed data is packaged into a structured JSON schema.
  6. Review: An automated summary is presented to the administrator before the data is transmitted or saved off-device.

JSON Evidence Schema Example

Below is an example of sanitized evidence generated by the platform:

{
  "metadata": {
    "collection_time": "2023-10-27T12:00:00Z",
    "edge_node_id": "node-hash-8f4b2a",
    "cli_version": "v1.2.0"
  },
  "hardware": {
    "gpu_count": 1,
    "gpu_model": "NVIDIA GeForce RTX 3090",
    "vram_total_mb": 24268
  },
  "cluster_state": {
    "pods_ready": 12,
    "pods_failed": 0
  },
  "events_sanitized": [
    {
      "type": "Warning",
      "reason": "FailedScheduling",
      "message": "0/1 nodes are available: 1 Insufficient nvidia.com/gpu."
    }
  ],
  "logs_sample": [
    "[INFO] time=\"2023-10-27T12:00:01Z\" msg=\"Model loaded successfully\" model=\"llama3:8b\"",
    "[ERROR] time=\"2023-10-27T12:05:00Z\" msg=\"Connection timeout to [IP_REDACTED]\""
  ]
}

Reviewing Evidence Manually

Before submitting a bug report, developers are encouraged to review the sanitized archive manually:

# Extract the archive
tar -xzf evidence-bundle.tar.gz -C /tmp/evidence

# Search for potential leaks
grep -r -E "(password|secret|key|192\.168)" /tmp/evidence

By strictly adhering to these sanitization procedures, we ensure compliance with data privacy regulations while maintaining the ability to effectively debug edge deployments.