@genobank/biofs 1.8.2 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +120 -171
- package/dist/commands/biofiles.d.ts +9 -0
- package/dist/commands/biofiles.d.ts.map +1 -0
- package/dist/commands/biofiles.js +112 -0
- package/dist/commands/biofiles.js.map +1 -0
- package/dist/commands/labs/list.d.ts +19 -0
- package/dist/commands/labs/list.d.ts.map +1 -0
- package/dist/commands/labs/list.js +98 -0
- package/dist/commands/labs/list.js.map +1 -0
- package/dist/commands/share.d.ts +10 -0
- package/dist/commands/share.d.ts.map +1 -0
- package/dist/commands/share.js +186 -0
- package/dist/commands/share.js.map +1 -0
- package/dist/commands/verify.d.ts +9 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +138 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/index.js +99 -42
- package/dist/index.js.map +1 -1
- package/dist/lib/ai/classifier.d.ts +1 -3
- package/dist/lib/ai/classifier.d.ts.map +1 -1
- package/dist/lib/ai/classifier.js +17 -37
- package/dist/lib/ai/classifier.js.map +1 -1
- package/dist/lib/api/client.d.ts +46 -0
- package/dist/lib/api/client.d.ts.map +1 -1
- package/dist/lib/api/client.js +159 -19
- package/dist/lib/api/client.js.map +1 -1
- package/dist/lib/auth/server.d.ts.map +1 -1
- package/dist/lib/auth/server.js +2 -11
- package/dist/lib/auth/server.js.map +1 -1
- package/dist/lib/biofiles/fingerprint.d.ts.map +1 -1
- package/dist/lib/biofiles/fingerprint.js +11 -40
- package/dist/lib/biofiles/fingerprint.js.map +1 -1
- package/dist/lib/biofiles/resolver.d.ts.map +1 -1
- package/dist/lib/biofiles/resolver.js +59 -75
- package/dist/lib/biofiles/resolver.js.map +1 -1
- package/dist/lib/config/constants.d.ts +1 -0
- package/dist/lib/config/constants.d.ts.map +1 -1
- package/dist/lib/config/constants.js +3 -3
- package/dist/lib/config/constants.js.map +1 -1
- package/dist/lib/utils/logger.d.ts +5 -6
- package/dist/lib/utils/logger.d.ts.map +1 -1
- package/dist/lib/utils/logger.js +5 -23
- package/dist/lib/utils/logger.js.map +1 -1
- package/dist/types/api.d.ts +21 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/biofiles.d.ts +2 -2
- package/dist/types/biofiles.d.ts.map +1 -1
- package/package.json +2 -3
- package/.claude/settings.local.json +0 -33
- package/BIOFS_CLI_NODE_CONVERGENCE_ANALYSIS.md +0 -932
- package/BIOFS_FEDERATED_NETWORK_ARCHITECTURE.md +0 -1071
- package/BIOFS_NODE_CLIENT_ARCHITECTURE.md +0 -557
- package/BIOFS_NODE_IMPLEMENTATION_PLAN.md +0 -2164
- package/BIOROUTER_IMPLEMENTATION_CHECKLIST.md +0 -618
- package/BUBBLEWRAP_INTEGRATION.md +0 -486
- package/BUBBLEWRAP_QUICKSTART.md +0 -356
- package/BUBBLEWRAP_README.md +0 -466
- package/BUBBLEWRAP_STRATEGIC_ANALYSIS.md +0 -625
- package/EXECUTIVE_SUMMARY_BIOROUTER_CONVERGENCE.md +0 -323
- package/GEMINI_REMOVAL_COMPLETE.md +0 -311
- package/debug_credentials.js +0 -60
- package/dist/commands/sandbox.d.ts +0 -10
- package/dist/commands/sandbox.d.ts.map +0 -1
- package/dist/commands/sandbox.js +0 -418
- package/dist/commands/sandbox.js.map +0 -1
- package/dist/lib/sandbox/bubblewrap.d.ts +0 -125
- package/dist/lib/sandbox/bubblewrap.d.ts.map +0 -1
- package/dist/lib/sandbox/bubblewrap.js +0 -343
- package/dist/lib/sandbox/bubblewrap.js.map +0 -1
- package/examples/sandbox-usage.ts +0 -361
package/dist/commands/sandbox.js
DELETED
|
@@ -1,418 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Sandbox status and management command
|
|
4
|
-
*
|
|
5
|
-
* Provides information about bubblewrap sandbox availability
|
|
6
|
-
* and configuration status.
|
|
7
|
-
*/
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
-
}) : function(o, v) {
|
|
22
|
-
o["default"] = v;
|
|
23
|
-
});
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
-
};
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.sandboxCommand = void 0;
|
|
46
|
-
const commander_1 = require("commander");
|
|
47
|
-
const bubblewrap_1 = require("../lib/sandbox/bubblewrap");
|
|
48
|
-
const logger_1 = require("../lib/utils/logger");
|
|
49
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
50
|
-
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
51
|
-
const fs = __importStar(require("fs-extra"));
|
|
52
|
-
const path = __importStar(require("path"));
|
|
53
|
-
const os = __importStar(require("os"));
|
|
54
|
-
exports.sandboxCommand = new commander_1.Command('sandbox')
|
|
55
|
-
.description('Manage sandboxing configuration and check status')
|
|
56
|
-
.addCommand(createStatusCommand())
|
|
57
|
-
.addCommand(createEnableCommand())
|
|
58
|
-
.addCommand(createDisableCommand())
|
|
59
|
-
.addCommand(createTestCommand())
|
|
60
|
-
.addCommand(createConfigCommand());
|
|
61
|
-
/**
|
|
62
|
-
* Check sandbox availability and configuration
|
|
63
|
-
*/
|
|
64
|
-
function createStatusCommand() {
|
|
65
|
-
return new commander_1.Command('status')
|
|
66
|
-
.description('Check sandbox availability and current configuration')
|
|
67
|
-
.action(async () => {
|
|
68
|
-
try {
|
|
69
|
-
console.log(chalk_1.default.bold('\n🔒 BioFS Sandbox Status\n'));
|
|
70
|
-
// Check if bubblewrap is installed
|
|
71
|
-
const isAvailable = await (0, bubblewrap_1.isSandboxAvailable)();
|
|
72
|
-
const statusTable = new cli_table3_1.default({
|
|
73
|
-
head: ['Component', 'Status', 'Details'],
|
|
74
|
-
colWidths: [25, 15, 50],
|
|
75
|
-
});
|
|
76
|
-
if (isAvailable) {
|
|
77
|
-
const version = await bubblewrap_1.BubblewrapSandbox.getVersion();
|
|
78
|
-
statusTable.push(['Bubblewrap', chalk_1.default.green('✓ Installed'), version]);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
statusTable.push(['Bubblewrap', chalk_1.default.red('✗ Not Found'), 'Install: sudo apt-get install bubblewrap']);
|
|
82
|
-
}
|
|
83
|
-
// Check kernel support
|
|
84
|
-
const kernelSupport = await checkKernelSupport();
|
|
85
|
-
statusTable.push(['User Namespaces', kernelSupport.enabled ? chalk_1.default.green('✓ Enabled') : chalk_1.default.red('✗ Disabled'), kernelSupport.details]);
|
|
86
|
-
// Check configuration
|
|
87
|
-
const configPath = path.join(os.homedir(), '.genobank/config.json');
|
|
88
|
-
let config = {};
|
|
89
|
-
let configStatus = chalk_1.default.yellow('⚠ Not Configured');
|
|
90
|
-
if (await fs.pathExists(configPath)) {
|
|
91
|
-
config = await fs.readJson(configPath);
|
|
92
|
-
if (config.security?.sandbox?.enabled) {
|
|
93
|
-
configStatus = chalk_1.default.green('✓ Enabled');
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
configStatus = chalk_1.default.yellow('○ Disabled');
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
statusTable.push(['BioFS Config', configStatus, configPath]);
|
|
100
|
-
console.log(statusTable.toString());
|
|
101
|
-
// Show current sandbox configuration
|
|
102
|
-
if (config.security?.sandbox) {
|
|
103
|
-
console.log(chalk_1.default.bold('\n📋 Current Configuration:\n'));
|
|
104
|
-
const configTable = new cli_table3_1.default({
|
|
105
|
-
head: ['Setting', 'Value'],
|
|
106
|
-
colWidths: [35, 35],
|
|
107
|
-
});
|
|
108
|
-
const sandboxConfig = config.security.sandbox;
|
|
109
|
-
configTable.push(['Global Sandboxing', sandboxConfig.enabled ? chalk_1.default.green('Enabled') : chalk_1.default.red('Disabled')], ['Enforce for Sensitive Data', sandboxConfig.enforceForSensitiveData ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No')], ['Network Isolation', sandboxConfig.security?.isolateNetwork ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No')], ['Process Isolation (PID)', sandboxConfig.security?.isolatePID ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No')], ['IPC Isolation', sandboxConfig.security?.isolateIPC ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No')], ['Seccomp Filtering', sandboxConfig.security?.enableSeccomp ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No')], ['Drop Capabilities', sandboxConfig.security?.dropCapabilities ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No')]);
|
|
110
|
-
console.log(configTable.toString());
|
|
111
|
-
// Show per-operation settings
|
|
112
|
-
if (sandboxConfig.operations) {
|
|
113
|
-
console.log(chalk_1.default.bold('\n⚙️ Operation-Specific Settings:\n'));
|
|
114
|
-
const opsTable = new cli_table3_1.default({
|
|
115
|
-
head: ['Operation', 'Enabled', 'Network Isolated', 'Timeout'],
|
|
116
|
-
colWidths: [15, 12, 18, 15],
|
|
117
|
-
});
|
|
118
|
-
for (const [op, settings] of Object.entries(sandboxConfig.operations)) {
|
|
119
|
-
const opSettings = settings;
|
|
120
|
-
opsTable.push([
|
|
121
|
-
op,
|
|
122
|
-
opSettings.enabled ? chalk_1.default.green('Yes') : chalk_1.default.red('No'),
|
|
123
|
-
opSettings.isolateNetwork !== false ? chalk_1.default.green('Yes') : chalk_1.default.yellow('No'),
|
|
124
|
-
opSettings.timeout ? `${opSettings.timeout}s` : 'Default',
|
|
125
|
-
]);
|
|
126
|
-
}
|
|
127
|
-
console.log(opsTable.toString());
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
// Show security benefits
|
|
131
|
-
console.log(chalk_1.default.bold('\n🛡️ Security Benefits:\n'));
|
|
132
|
-
const benefits = [
|
|
133
|
-
'• Network isolation prevents data exfiltration',
|
|
134
|
-
'• Process isolation prevents privilege escalation',
|
|
135
|
-
'• Filesystem isolation prevents unauthorized access',
|
|
136
|
-
'• Seccomp filtering blocks dangerous syscalls',
|
|
137
|
-
'• GDPR Article 32 compliance (security measures)',
|
|
138
|
-
'• GDPR Article 25 compliance (privacy by design)',
|
|
139
|
-
];
|
|
140
|
-
benefits.forEach(benefit => console.log(chalk_1.default.gray(benefit)));
|
|
141
|
-
// Performance impact
|
|
142
|
-
console.log(chalk_1.default.bold('\n⚡ Performance Impact:\n'));
|
|
143
|
-
console.log(chalk_1.default.gray('• Startup overhead: ~10-20ms'));
|
|
144
|
-
console.log(chalk_1.default.gray('• Runtime overhead: <1%'));
|
|
145
|
-
console.log(chalk_1.default.gray('• I/O performance: Native (no slowdown)'));
|
|
146
|
-
console.log('');
|
|
147
|
-
}
|
|
148
|
-
catch (error) {
|
|
149
|
-
logger_1.Logger.error('Failed to check sandbox status:', error.message);
|
|
150
|
-
process.exit(1);
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Enable sandboxing
|
|
156
|
-
*/
|
|
157
|
-
function createEnableCommand() {
|
|
158
|
-
return new commander_1.Command('enable')
|
|
159
|
-
.description('Enable sandboxing for BioFS operations')
|
|
160
|
-
.option('--all', 'Enable for all operations')
|
|
161
|
-
.option('--downloads', 'Enable for downloads only')
|
|
162
|
-
.option('--uploads', 'Enable for uploads only')
|
|
163
|
-
.option('--processing', 'Enable for local processing only')
|
|
164
|
-
.option('--jobs', 'Enable for research jobs only')
|
|
165
|
-
.action(async (options) => {
|
|
166
|
-
try {
|
|
167
|
-
// Check if bubblewrap is available
|
|
168
|
-
if (!await (0, bubblewrap_1.isSandboxAvailable)()) {
|
|
169
|
-
logger_1.Logger.error('Bubblewrap is not installed!');
|
|
170
|
-
console.log('\nInstall it with:');
|
|
171
|
-
console.log(chalk_1.default.yellow(' sudo apt-get install bubblewrap'));
|
|
172
|
-
process.exit(1);
|
|
173
|
-
}
|
|
174
|
-
const configPath = path.join(os.homedir(), '.genobank/config.json');
|
|
175
|
-
let config = {};
|
|
176
|
-
if (await fs.pathExists(configPath)) {
|
|
177
|
-
config = await fs.readJson(configPath);
|
|
178
|
-
}
|
|
179
|
-
// Initialize sandbox config
|
|
180
|
-
if (!config.security)
|
|
181
|
-
config.security = {};
|
|
182
|
-
if (!config.security.sandbox) {
|
|
183
|
-
config.security.sandbox = {
|
|
184
|
-
enabled: false,
|
|
185
|
-
enforceForSensitiveData: true,
|
|
186
|
-
operations: {
|
|
187
|
-
download: { enabled: false },
|
|
188
|
-
upload: { enabled: false },
|
|
189
|
-
processing: { enabled: false },
|
|
190
|
-
jobs: { enabled: false },
|
|
191
|
-
},
|
|
192
|
-
security: {
|
|
193
|
-
isolateNetwork: true,
|
|
194
|
-
isolatePID: true,
|
|
195
|
-
isolateIPC: true,
|
|
196
|
-
enableSeccomp: true,
|
|
197
|
-
dropCapabilities: true,
|
|
198
|
-
},
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
// Enable based on options
|
|
202
|
-
if (options.all) {
|
|
203
|
-
config.security.sandbox.enabled = true;
|
|
204
|
-
config.security.sandbox.operations.download.enabled = true;
|
|
205
|
-
config.security.sandbox.operations.upload.enabled = true;
|
|
206
|
-
config.security.sandbox.operations.processing.enabled = true;
|
|
207
|
-
config.security.sandbox.operations.jobs.enabled = true;
|
|
208
|
-
logger_1.Logger.info('Enabled sandboxing for all operations');
|
|
209
|
-
}
|
|
210
|
-
else {
|
|
211
|
-
if (options.downloads) {
|
|
212
|
-
config.security.sandbox.operations.download.enabled = true;
|
|
213
|
-
logger_1.Logger.info('Enabled sandboxing for downloads');
|
|
214
|
-
}
|
|
215
|
-
if (options.uploads) {
|
|
216
|
-
config.security.sandbox.operations.upload.enabled = true;
|
|
217
|
-
logger_1.Logger.info('Enabled sandboxing for uploads');
|
|
218
|
-
}
|
|
219
|
-
if (options.processing) {
|
|
220
|
-
config.security.sandbox.operations.processing.enabled = true;
|
|
221
|
-
logger_1.Logger.info('Enabled sandboxing for local processing');
|
|
222
|
-
}
|
|
223
|
-
if (options.jobs) {
|
|
224
|
-
config.security.sandbox.operations.jobs.enabled = true;
|
|
225
|
-
logger_1.Logger.info('Enabled sandboxing for research jobs');
|
|
226
|
-
}
|
|
227
|
-
// If any operation enabled, enable global flag
|
|
228
|
-
const anyEnabled = Object.values(config.security.sandbox.operations).some((op) => op.enabled);
|
|
229
|
-
if (anyEnabled) {
|
|
230
|
-
config.security.sandbox.enabled = true;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
// Save configuration
|
|
234
|
-
await fs.ensureDir(path.dirname(configPath));
|
|
235
|
-
await fs.writeJson(configPath, config, { spaces: 2 });
|
|
236
|
-
console.log(chalk_1.default.green('\n✓ Sandbox configuration saved to:'), configPath);
|
|
237
|
-
console.log(chalk_1.default.gray('\nRun'), chalk_1.default.bold('biofs sandbox status'), chalk_1.default.gray('to verify'));
|
|
238
|
-
console.log('');
|
|
239
|
-
}
|
|
240
|
-
catch (error) {
|
|
241
|
-
logger_1.Logger.error('Failed to enable sandboxing:', error.message);
|
|
242
|
-
process.exit(1);
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Disable sandboxing
|
|
248
|
-
*/
|
|
249
|
-
function createDisableCommand() {
|
|
250
|
-
return new commander_1.Command('disable')
|
|
251
|
-
.description('Disable sandboxing for BioFS operations')
|
|
252
|
-
.action(async () => {
|
|
253
|
-
try {
|
|
254
|
-
const configPath = path.join(os.homedir(), '.genobank/config.json');
|
|
255
|
-
if (!await fs.pathExists(configPath)) {
|
|
256
|
-
logger_1.Logger.warn('No configuration file found - sandboxing already disabled');
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
const config = await fs.readJson(configPath);
|
|
260
|
-
if (config.security?.sandbox) {
|
|
261
|
-
config.security.sandbox.enabled = false;
|
|
262
|
-
config.security.sandbox.operations = {
|
|
263
|
-
download: { enabled: false },
|
|
264
|
-
upload: { enabled: false },
|
|
265
|
-
processing: { enabled: false },
|
|
266
|
-
jobs: { enabled: false },
|
|
267
|
-
};
|
|
268
|
-
await fs.writeJson(configPath, config, { spaces: 2 });
|
|
269
|
-
logger_1.Logger.info('Sandboxing disabled');
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
logger_1.Logger.warn('Sandboxing was not configured');
|
|
273
|
-
}
|
|
274
|
-
console.log('');
|
|
275
|
-
}
|
|
276
|
-
catch (error) {
|
|
277
|
-
logger_1.Logger.error('Failed to disable sandboxing:', error.message);
|
|
278
|
-
process.exit(1);
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Test sandbox functionality
|
|
284
|
-
*/
|
|
285
|
-
function createTestCommand() {
|
|
286
|
-
return new commander_1.Command('test')
|
|
287
|
-
.description('Test sandbox functionality')
|
|
288
|
-
.action(async () => {
|
|
289
|
-
try {
|
|
290
|
-
console.log(chalk_1.default.bold('\n🧪 Testing Sandbox Functionality\n'));
|
|
291
|
-
// Test 1: Check availability
|
|
292
|
-
console.log(chalk_1.default.gray('Test 1: Checking bubblewrap availability...'));
|
|
293
|
-
const isAvailable = await (0, bubblewrap_1.isSandboxAvailable)();
|
|
294
|
-
if (!isAvailable) {
|
|
295
|
-
console.log(chalk_1.default.red('✗ Bubblewrap not found'));
|
|
296
|
-
console.log('\nInstall with:');
|
|
297
|
-
console.log(chalk_1.default.yellow(' sudo apt-get install bubblewrap'));
|
|
298
|
-
process.exit(1);
|
|
299
|
-
}
|
|
300
|
-
console.log(chalk_1.default.green('✓ Bubblewrap is available'));
|
|
301
|
-
// Test 2: Basic execution
|
|
302
|
-
console.log(chalk_1.default.gray('\nTest 2: Basic command execution...'));
|
|
303
|
-
const sandbox1 = new bubblewrap_1.BubblewrapSandbox({
|
|
304
|
-
isolateNetwork: true,
|
|
305
|
-
isolatePID: true,
|
|
306
|
-
});
|
|
307
|
-
const result1 = await sandbox1.exec(['echo', 'Hello from sandbox!']);
|
|
308
|
-
if (result1.exitCode === 0 && result1.stdout.includes('Hello')) {
|
|
309
|
-
console.log(chalk_1.default.green('✓ Basic execution works'));
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
console.log(chalk_1.default.red('✗ Basic execution failed'));
|
|
313
|
-
console.log('Output:', result1.stdout);
|
|
314
|
-
console.log('Error:', result1.stderr);
|
|
315
|
-
}
|
|
316
|
-
// Test 3: Network isolation
|
|
317
|
-
console.log(chalk_1.default.gray('\nTest 3: Network isolation...'));
|
|
318
|
-
const sandbox2 = new bubblewrap_1.BubblewrapSandbox({
|
|
319
|
-
isolateNetwork: true,
|
|
320
|
-
});
|
|
321
|
-
const result2 = await sandbox2.exec(['ping', '-c', '1', '8.8.8.8']);
|
|
322
|
-
if (result2.exitCode !== 0) {
|
|
323
|
-
console.log(chalk_1.default.green('✓ Network isolation works (ping failed as expected)'));
|
|
324
|
-
}
|
|
325
|
-
else {
|
|
326
|
-
console.log(chalk_1.default.yellow('⚠ Network isolation may not be working'));
|
|
327
|
-
}
|
|
328
|
-
// Test 4: Filesystem isolation
|
|
329
|
-
console.log(chalk_1.default.gray('\nTest 4: Filesystem isolation...'));
|
|
330
|
-
const sandbox3 = new bubblewrap_1.BubblewrapSandbox({
|
|
331
|
-
isolatePID: true,
|
|
332
|
-
mounts: [], // No home directory mounted
|
|
333
|
-
});
|
|
334
|
-
const result3 = await sandbox3.exec(['ls', os.homedir()]);
|
|
335
|
-
if (result3.exitCode !== 0) {
|
|
336
|
-
console.log(chalk_1.default.green('✓ Filesystem isolation works (home dir not accessible)'));
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
console.log(chalk_1.default.yellow('⚠ Filesystem isolation may not be complete'));
|
|
340
|
-
}
|
|
341
|
-
console.log(chalk_1.default.bold.green('\n✅ All tests passed!\n'));
|
|
342
|
-
}
|
|
343
|
-
catch (error) {
|
|
344
|
-
logger_1.Logger.error('Test failed:', error.message);
|
|
345
|
-
process.exit(1);
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Show current configuration
|
|
351
|
-
*/
|
|
352
|
-
function createConfigCommand() {
|
|
353
|
-
return new commander_1.Command('config')
|
|
354
|
-
.description('Show or edit sandbox configuration')
|
|
355
|
-
.option('--edit', 'Open configuration file in editor')
|
|
356
|
-
.action(async (options) => {
|
|
357
|
-
try {
|
|
358
|
-
const configPath = path.join(os.homedir(), '.genobank/config.json');
|
|
359
|
-
if (options.edit) {
|
|
360
|
-
const editor = process.env.EDITOR || 'nano';
|
|
361
|
-
const { spawn } = require('child_process');
|
|
362
|
-
const child = spawn(editor, [configPath], { stdio: 'inherit' });
|
|
363
|
-
child.on('exit', (code) => {
|
|
364
|
-
if (code === 0) {
|
|
365
|
-
logger_1.Logger.info('Configuration saved');
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
else {
|
|
370
|
-
if (!await fs.pathExists(configPath)) {
|
|
371
|
-
logger_1.Logger.warn('No configuration file found');
|
|
372
|
-
console.log('\nCreate one with:');
|
|
373
|
-
console.log(chalk_1.default.yellow(' biofs sandbox enable --all'));
|
|
374
|
-
return;
|
|
375
|
-
}
|
|
376
|
-
const config = await fs.readJson(configPath);
|
|
377
|
-
console.log(chalk_1.default.bold('\n📄 Current Configuration:\n'));
|
|
378
|
-
console.log(JSON.stringify(config.security?.sandbox, null, 2));
|
|
379
|
-
console.log('\nLocation:', chalk_1.default.gray(configPath));
|
|
380
|
-
console.log('');
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
catch (error) {
|
|
384
|
-
logger_1.Logger.error('Failed to show configuration:', error.message);
|
|
385
|
-
process.exit(1);
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Check kernel support for user namespaces
|
|
391
|
-
*/
|
|
392
|
-
async function checkKernelSupport() {
|
|
393
|
-
try {
|
|
394
|
-
const { execFile } = require('child_process');
|
|
395
|
-
const { promisify } = require('util');
|
|
396
|
-
const execFileAsync = promisify(execFile);
|
|
397
|
-
// Try to create a user namespace
|
|
398
|
-
const result = await execFileAsync('unshare', ['--user', 'true']);
|
|
399
|
-
return {
|
|
400
|
-
enabled: result.exitCode === 0,
|
|
401
|
-
details: 'User namespaces supported',
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
catch (error) {
|
|
405
|
-
if (error.message.includes('Operation not permitted')) {
|
|
406
|
-
return {
|
|
407
|
-
enabled: false,
|
|
408
|
-
details: 'Enable with: sudo sysctl kernel.unprivileged_userns_clone=1',
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
return {
|
|
412
|
-
enabled: false,
|
|
413
|
-
details: 'Could not verify kernel support',
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
exports.default = exports.sandboxCommand;
|
|
418
|
-
//# sourceMappingURL=sandbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../src/commands/sandbox.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,0DAAkF;AAClF,gDAA6C;AAC7C,kDAA0B;AAC1B,4DAA+B;AAC/B,6CAA+B;AAC/B,2CAA6B;AAC7B,uCAAyB;AAEZ,QAAA,cAAc,GAAG,IAAI,mBAAO,CAAC,SAAS,CAAC;KACjD,WAAW,CAAC,kDAAkD,CAAC;KAC/D,UAAU,CAAC,mBAAmB,EAAE,CAAC;KACjC,UAAU,CAAC,mBAAmB,EAAE,CAAC;KACjC,UAAU,CAAC,oBAAoB,EAAE,CAAC;KAClC,UAAU,CAAC,iBAAiB,EAAE,CAAC;KAC/B,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAErC;;GAEG;AACH,SAAS,mBAAmB;IAC1B,OAAO,IAAI,mBAAO,CAAC,QAAQ,CAAC;SACzB,WAAW,CAAC,sDAAsD,CAAC;SACnE,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,IAAI,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,CAAC;YAEvD,mCAAmC;YACnC,MAAM,WAAW,GAAG,MAAM,IAAA,+BAAkB,GAAE,CAAC;YAE/C,MAAM,WAAW,GAAG,IAAI,oBAAK,CAAC;gB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AAK,CAAC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,CAAC;YACtD,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,6DAA6D;aACvE,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,iCAAiC;SAC3C,CAAC;IACJ,CAAC;AACH,CAAC;AAED,kBAAe,sBAAc,CAAC"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bubblewrap Sandbox Integration for BioFS-CLI
|
|
3
|
-
*
|
|
4
|
-
* Provides secure isolation for genomic data processing operations
|
|
5
|
-
* using Linux namespaces via bubblewrap.
|
|
6
|
-
*
|
|
7
|
-
* Security guarantees:
|
|
8
|
-
* - Process isolation (PID namespace)
|
|
9
|
-
* - Network isolation (NET namespace)
|
|
10
|
-
* - Filesystem isolation (MOUNT namespace)
|
|
11
|
-
* - IPC isolation (IPC namespace)
|
|
12
|
-
* - Seccomp syscall filtering
|
|
13
|
-
* - Capability dropping
|
|
14
|
-
*
|
|
15
|
-
* @module lib/sandbox/bubblewrap
|
|
16
|
-
*/
|
|
17
|
-
export interface MountConfig {
|
|
18
|
-
source: string;
|
|
19
|
-
target: string;
|
|
20
|
-
readonly?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface SandboxConfig {
|
|
23
|
-
/** Isolate network namespace (blocks all network access) */
|
|
24
|
-
isolateNetwork?: boolean;
|
|
25
|
-
/** Isolate PID namespace (process cannot see other processes) */
|
|
26
|
-
isolatePID?: boolean;
|
|
27
|
-
/** Isolate IPC namespace (no shared memory/semaphores) */
|
|
28
|
-
isolateIPC?: boolean;
|
|
29
|
-
/** Isolate UTS namespace (separate hostname) */
|
|
30
|
-
isolateUTS?: boolean;
|
|
31
|
-
/** Enable seccomp syscall filtering */
|
|
32
|
-
enableSeccomp?: boolean;
|
|
33
|
-
/** Drop all Linux capabilities */
|
|
34
|
-
dropCapabilities?: boolean;
|
|
35
|
-
/** Custom hostname for isolated environment */
|
|
36
|
-
hostname?: string;
|
|
37
|
-
/** Working directory inside sandbox */
|
|
38
|
-
workingDir?: string;
|
|
39
|
-
/** Environment variables to set */
|
|
40
|
-
env?: Record<string, string>;
|
|
41
|
-
/** Filesystem mounts */
|
|
42
|
-
mounts?: MountConfig[];
|
|
43
|
-
/** Allow access to /dev devices */
|
|
44
|
-
allowDevices?: boolean;
|
|
45
|
-
/** Allow /proc filesystem */
|
|
46
|
-
allowProc?: boolean;
|
|
47
|
-
/** Create temporary /tmp filesystem */
|
|
48
|
-
useTmpfs?: boolean;
|
|
49
|
-
/** Die when parent process exits */
|
|
50
|
-
dieWithParent?: boolean;
|
|
51
|
-
/** Create new session (prevents TIOCSTI attacks) */
|
|
52
|
-
newSession?: boolean;
|
|
53
|
-
/** UID to run as (default: current user) */
|
|
54
|
-
uid?: number;
|
|
55
|
-
/** GID to run as (default: current group) */
|
|
56
|
-
gid?: number;
|
|
57
|
-
}
|
|
58
|
-
export interface ExecResult {
|
|
59
|
-
stdout: string;
|
|
60
|
-
stderr: string;
|
|
61
|
-
exitCode: number;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Bubblewrap sandbox wrapper for secure genomic data processing
|
|
65
|
-
*/
|
|
66
|
-
export declare class BubblewrapSandbox {
|
|
67
|
-
private config;
|
|
68
|
-
constructor(config?: SandboxConfig);
|
|
69
|
-
/**
|
|
70
|
-
* Check if bubblewrap is available on the system
|
|
71
|
-
*/
|
|
72
|
-
static isAvailable(): Promise<boolean>;
|
|
73
|
-
/**
|
|
74
|
-
* Get bubblewrap version
|
|
75
|
-
*/
|
|
76
|
-
static getVersion(): Promise<string>;
|
|
77
|
-
/**
|
|
78
|
-
* Execute a command in a sandboxed environment
|
|
79
|
-
*/
|
|
80
|
-
exec(command: string[], options?: {
|
|
81
|
-
stdin?: string;
|
|
82
|
-
timeout?: number;
|
|
83
|
-
maxBuffer?: number;
|
|
84
|
-
}): Promise<ExecResult>;
|
|
85
|
-
/**
|
|
86
|
-
* Build bubblewrap argument array from config
|
|
87
|
-
*/
|
|
88
|
-
private buildBwrapArgs;
|
|
89
|
-
/**
|
|
90
|
-
* Create seccomp filter for syscall restrictions
|
|
91
|
-
*
|
|
92
|
-
* Allows safe syscalls for file I/O, memory management, and process control
|
|
93
|
-
* Blocks dangerous syscalls like ptrace, mount, kexec, etc.
|
|
94
|
-
*/
|
|
95
|
-
private createSeccompFilter;
|
|
96
|
-
/**
|
|
97
|
-
* Create a pre-configured sandbox for genomic file download
|
|
98
|
-
*/
|
|
99
|
-
static forDownload(outputDir: string): BubblewrapSandbox;
|
|
100
|
-
/**
|
|
101
|
-
* Create a pre-configured sandbox for genomic file upload
|
|
102
|
-
*/
|
|
103
|
-
static forUpload(inputPath: string, tempDir: string): BubblewrapSandbox;
|
|
104
|
-
/**
|
|
105
|
-
* Create a pre-configured sandbox for local file processing (no network)
|
|
106
|
-
*/
|
|
107
|
-
static forProcessing(inputPath: string, outputDir: string): BubblewrapSandbox;
|
|
108
|
-
/**
|
|
109
|
-
* Create a pre-configured sandbox for research job execution
|
|
110
|
-
*/
|
|
111
|
-
static forJob(jobConfig: {
|
|
112
|
-
inputs: string[];
|
|
113
|
-
outputDir: string;
|
|
114
|
-
allowNetwork?: boolean;
|
|
115
|
-
}): BubblewrapSandbox;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Convenience function to check if sandboxing is available
|
|
119
|
-
*/
|
|
120
|
-
export declare function isSandboxAvailable(): Promise<boolean>;
|
|
121
|
-
/**
|
|
122
|
-
* Convenience function to get sandbox version info
|
|
123
|
-
*/
|
|
124
|
-
export declare function getSandboxVersion(): Promise<string>;
|
|
125
|
-
//# sourceMappingURL=bubblewrap.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bubblewrap.d.ts","sourceRoot":"","sources":["../../../src/lib/sandbox/bubblewrap.ts"],"names":[],"mappings":"AAAA;;;;;;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