Skip to content

Security Model

Ishant Sharma edited this page Nov 15, 2026 · 1 revision

AirBridge Security Model

AirBridge is designed from the ground up for safe, private local network file transfer and continuity.

Core Security Pillars

1. Strict Directory Boundary Containment (CWE-22 Protection)

All file download, upload, chunk assembly, and deletion operations resolve targets against the root UPLOADS_DIR (~/Downloads/AirBridge or %USERPROFILE%\Downloads\AirBridge). Before accessing any filesystem resource, AirBridge executes strict boundary checks:

const resolved = path.resolve(ROOT, requestedPath);
if (resolved !== ROOT && !resolved.startsWith(ROOT + path.sep)) {
  return res.status(403).json({ error: 'Access denied: Invalid path' });
}

Any attempt to traverse directories using ../ or absolute path prefixes is rejected with HTTP 403.

2. Elimination of Shell Command Injection (CWE-78 / CWE-88)

AirBridge avoids passing user input to shell command strings (exec or cmd.exe /c). All system invocations (explorer.exe, open, xdg-open, rundll32.exe) utilize child_process.execFile with separate string argument arrays:

  • File Explorer: execFile('explorer.exe', isDirectory ? [target] : ['/select,' + target])
  • Web URLs: execFile('rundll32.exe', ['url.dll,FileProtocolHandler', safeUrl]) (Windows) and execFile('open', ['--', safeUrl]) (macOS).

3. Dedicated Rate Limiting (CWE-307)

  • Global Rate Limiter: Protects all API endpoints against Denial of Service and socket exhaustion (up to 3,000 requests per 15 minutes).
  • PIN Authentication Limiter: Protects /api/office/verify-pin against automated brute-force attempts (maximum 30 requests per 15 minutes).
  • Route-Level Enforcements: Explicit rate limiters on file upload, chunk assembly, file deletion, and URL opening routes ensure 0 CodeQL alerts.

4. Log Injection Mitigation (CWE-117)

All log messages use static format strings. No unsanitized user inputs or newline characters are written directly to application logs.

5. Zero-Cloud Telemetry

AirBridge contains no remote tracking scripts, analytics SDKs, external API dependencies, or cloud relays. All data packets stay exclusively on the local network link.