"use strict";
/**
 * System Directories Configuration
 * Issue #135: DB path resolution logic fix
 *
 * Centralized list of system directories that are not allowed for DB storage.
 * This supports security measures SEC-001, SEC-002, SEC-005.
 *
 * @module system-directories
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SYSTEM_DIRECTORIES = void 0;
exports.isSystemDirectory = isSystemDirectory;
/**
 * System directories that are not allowed for DB storage
 *
 * SEC-001: System directory protection
 * These directories are protected to prevent writing database files
 * to critical system paths which could cause security issues.
 */
exports.SYSTEM_DIRECTORIES = [
    '/etc',
    '/usr',
    '/bin',
    '/sbin',
    '/var',
    '/tmp',
    '/dev',
    '/sys',
    '/proc',
];
/**
 * Check if a path is within a system directory
 *
 * @param resolvedPath - The resolved absolute path to check
 * @returns true if the path is within a system directory
 */
function isSystemDirectory(resolvedPath) {
    return exports.SYSTEM_DIRECTORIES.some((dir) => resolvedPath.startsWith(dir));
}
