Skip to content

Commit a4c0313

Browse files
committed
Reduce credential exposure in bucket mounting
Remove credentials from MountInfo to minimize sensitive data in Durable Object memory. Password file provides sufficient access for s3fs without retaining credentials. Remove endpoint URL from mount debug log to prevent account ID exposure in production logs.
1 parent 624c099 commit a4c0313

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/sandbox/src/sandbox.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ export class Sandbox<Env = unknown> extends Container<Env> implements ISandbox {
261261
mountPath,
262262
endpoint: options.endpoint,
263263
provider,
264-
credentials,
265264
passwordFilePath,
266265
mounted: false
267266
});
@@ -289,7 +288,6 @@ export class Sandbox<Env = unknown> extends Container<Env> implements ISandbox {
289288
mountPath,
290289
endpoint: options.endpoint,
291290
provider,
292-
credentials,
293291
passwordFilePath,
294292
mounted: true
295293
});
@@ -463,7 +461,9 @@ export class Sandbox<Env = unknown> extends Container<Env> implements ISandbox {
463461
const optionsStr = shellEscape(s3fsArgs.join(','));
464462
const mountCmd = `s3fs ${shellEscape(bucket)} ${shellEscape(mountPath)} -o ${optionsStr}`;
465463

466-
this.logger.debug(`Executing mount command: ${mountCmd}`, {
464+
this.logger.debug('Executing s3fs mount', {
465+
bucket,
466+
mountPath,
467467
provider,
468468
resolvedOptions
469469
});

packages/sandbox/src/storage-mount/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Internal bucket mounting types
33
*/
44

5-
import type { BucketCredentials, BucketProvider } from '@repo/shared';
5+
import type { BucketProvider } from '@repo/shared';
66

77
/**
88
* Internal tracking information for active mounts
@@ -12,7 +12,6 @@ export interface MountInfo {
1212
mountPath: string;
1313
endpoint: string;
1414
provider: BucketProvider | null;
15-
credentials: BucketCredentials;
1615
passwordFilePath: string;
1716
mounted: boolean;
1817
}

0 commit comments

Comments
 (0)