Repository navigation
Security Model
AirBridge is designed from the ground up for safe, private local network file transfer and continuity.
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.
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) andexecFile('open', ['--', safeUrl])(macOS).
- 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-pinagainst 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.
All log messages use static format strings. No unsanitized user inputs or newline characters are written directly to application logs.
AirBridge contains no remote tracking scripts, analytics SDKs, external API dependencies, or cloud relays. All data packets stay exclusively on the local network link.