add pipeline
Tests / test (push) Failing after 34s
Tests / build-and-push-image (push) Has been skipped

This commit is contained in:
root
2026-07-31 13:51:39 -04:00
parent f3863f760c
commit 843fa559bb
135 changed files with 791 additions and 4796 deletions
+9 -4
View File
@@ -1,6 +1,6 @@
import Docker from 'dockerode';
import { config } from '../../config.js';
import { resolveWorkspacePath } from '../../lib/sandbox.js';
import { resolveWorkspacePath, SandboxViolationError } from '../../lib/sandbox.js';
import { logger } from '../../lib/logger.js';
export interface ManagedContainer {
@@ -102,10 +102,15 @@ export function validateVolumeMount(spec: string): { source: string; target: str
if (!source || !target) {
throw new Error(`Invalid volume mount "${spec}": source and target are required.`);
}
const absoluteSource = resolveWorkspacePath(config.workspaceRoot, source);
if (absoluteSource.toLowerCase().startsWith('\\\\.\\pipe\\docker_engine') || source.includes('/var/run/docker.sock')) {
throw new Error(`Refusing to mount the Docker socket: "${source}".`);
const normalizedSource = source.toLowerCase().replaceAll('/', '\\');
if (
normalizedSource.startsWith('\\\\.\\pipe\\docker_engine') ||
normalizedSource.startsWith('\\.\\pipe\\docker_engine') ||
source.includes('/var/run/docker.sock')
) {
throw new SandboxViolationError(`Refusing to mount the Docker socket: "${source}".`);
}
const absoluteSource = resolveWorkspacePath(config.workspaceRoot, source);
return { source: absoluteSource, target, mode };
}