Skip to content

Security: retea-se/json

Security

SECURITY.md

Security Policy

JSON Toolbox Security Model

JSON Toolbox is a client-side only developer utility. All data processing occurs exclusively in your web browser. This document outlines our security model.

Architecture

┌─────────────────────────────────────────────────────┐
│                   Your Browser                       │
│  ┌───────────────────────────────────────────────┐  │
│  │              JSON Toolbox                      │  │
│  │                                                │  │
│  │  Input → JavaScript Processing → Output        │  │
│  │                                                │  │
│  │  • All operations in-memory                    │  │
│  │  • No data transmitted                         │  │
│  │  • No backend processing                       │  │
│  └───────────────────────────────────────────────┘  │
└─────────────────────────────────────────────────────┘
                         │
                         ✕ No data leaves browser
                         │
┌─────────────────────────────────────────────────────┐
│                   Server                             │
│                                                      │
│  Static file serving only:                          │
│  • HTML, CSS, JavaScript                            │
│  • Vendor libraries (self-hosted)                   │
│  • No API endpoints for user data                   │
│  • No data processing backend                       │
│                                                      │
└─────────────────────────────────────────────────────┘

Data Flow

What Stays Local

  • All user input - JSON, CSV, XML, YAML, CSS
  • All processing - Conversion, validation, formatting
  • All output - Generated JSON, TypeScript, schemas
  • Clipboard operations - Paste, copy

What Is Transmitted

  • Nothing by default - Analytics are OFF by default (opt-in only)
  • If analytics enabled - Aggregate usage data (cookieless, no identifiers)
  • Compliance mode - Zero network calls guaranteed

Threat Model

Protected Against

Threat Mitigation
Data exfiltration No network transmission of user data
Man-in-the-middle All static assets; HTTPS in production
Session hijacking No sessions, no cookies, no auth
Cross-site scripting (XSS) CSP headers; no dynamic HTML injection of user data
Data persistence Optional localStorage only for preferences
Third-party tracking No external scripts; self-hosted analytics

Out of Scope

  • Browser security vulnerabilities
  • Local machine compromise
  • Physical access attacks
  • Malicious browser extensions

Compliance Mode (v2.0.0+)

For enterprise and regulated environments, JSON Toolbox offers compliance mode:

Activation

// Via URL parameter
https://example.com/tools/json/?compliance=1

// Via environment variable
JSON_TOOLBOX_COMPLIANCE=true

// Via JavaScript (before page load)
window.JSON_TOOLBOX_COMPLIANCE = true;

Compliance Mode Guarantees

  • Zero network calls - No analytics, no external requests
  • No persistent storage - localStorage operations are no-ops
  • Memory-only processing - All data discarded on page close

Zero-Telemetry Build

For maximum assurance, use the zero-telemetry build:

  • Access: /tools/json/index-zero-telemetry.php
  • No analytics code loaded (script excluded, not just disabled)
  • Compliance mode automatically enabled

See COMPLIANCE.md for full documentation.

Analytics Security

Analytics are OFF by default (opt-in only). When explicitly enabled by user:

// Privacy configuration in analytics.js
_paq.push(['disableCookies']);           // No tracking cookies
_paq.push(['setDoNotTrack', true]);      // Respects browser DNT
_paq.push(['disableBrowserFeatureDetection']); // No fingerprinting
_paq.push(['setRequestMethod', 'POST']); // No URL logging

Analytics Data Flow (When Enabled)

  1. Collected: Page view, tab switch, operation type (e.g., "format")
  2. Not collected: User data, identifiers, session info, IP (anonymized)
  3. Destination: Self-hosted Matomo on same infrastructure
  4. Retention: Standard Matomo retention policies

Enable Analytics (Opt-in)

localStorage.setItem('json-toolbox-analytics-enabled', 'true');
location.reload();

Disable Analytics

localStorage.removeItem('json-toolbox-analytics-enabled');
location.reload();

Local Storage Usage

JSON Toolbox uses localStorage for (in non-compliance mode):

  • Theme preference
  • Language preference
  • Last input per tab (for convenience)
  • Analytics opt-in status

Compliance Mode Storage

In compliance mode, all storage operations are no-ops:

  • Reads return default values
  • Writes silently succeed but don't persist
  • Data exists only in memory during session

Clear All Data

// Via API
window.JSONToolbox.clearAllStorage();

// Or directly
localStorage.clear();

Or use the "Clear saved data" option in the UI.

Self-Hosting

For maximum security, self-host JSON Toolbox:

Standard Hosting:

  1. Download the /tools/json/ directory
  2. Analytics are already OFF by default
  3. Serve via any static file server
  4. No backend required

Air-Gapped / Enterprise Hosting:

  1. Use index-zero-telemetry.php as entry point
  2. No analytics code will be loaded
  3. Compliance mode auto-enabled
  4. Zero network dependencies

Dependency Security

All dependencies are:

  • Self-hosted in /vendor/
  • No CDN dependencies
  • No runtime fetching
Library Purpose Security Notes
PapaParse CSV parsing RFC 4180 compliant, no network
js-yaml YAML parsing YAML 1.2, safe schema default
jsonrepair JSON fixing Deterministic, no network
Lucide Icons SVG only, no external requests

Vulnerability Reporting

If you discover a security vulnerability:

  1. Do NOT open a public issue
  2. Email: security@mackan.eu
  3. Include:
    • Description of the vulnerability
    • Steps to reproduce
    • Potential impact
    • Suggested fix (optional)

Response Timeline

  • Acknowledgment: Within 48 hours
  • Initial assessment: Within 7 days
  • Fix deployment: Depends on severity

Compliance Notes

JSON Toolbox architecture supports:

Regulation How
GDPR No personal data collected or processed server-side
HIPAA PHI never leaves browser; no third-party transmission
SOX Deterministic, auditable local processing
CCPA No sale or sharing of personal information

Security Changelog

Date Version Change
2026-01-20 2.0.0 Analytics default-off (opt-in), compliance mode, zero-telemetry build
2026-01-18 1.0.0 Added privacy-first analytics (cookieless, self-hosted)
2026-01-15 0.9.0 Initial SECURITY.md

Last updated: 2026-01-20

There aren’t any published security advisories