
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
@mastra/s3
Advanced tools
Affected versions:
S3-compatible filesystem provider for Mastra workspaces (AWS S3, Cloudflare R2, MinIO)
S3-compatible filesystem provider for Mastra workspaces. Works with AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces, and other S3-compatible storage services.
npm install @mastra/s3
import { Agent } from '@mastra/core/agent';
import { Workspace } from '@mastra/core/workspace';
import { S3Filesystem } from '@mastra/s3';
const workspace = new Workspace({
filesystem: new S3Filesystem({
bucket: 'my-bucket',
region: 'us-east-1',
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
}),
});
const agent = new Agent({
name: 'my-agent',
model: 'anthropic/claude-opus-4-5',
workspace,
});
When no credentials are provided, S3Filesystem uses the AWS SDK default credential provider chain to discover credentials from the environment automatically (environment variables, ~/.aws config, ECS container credentials, EC2 instance profiles, etc.).
import { S3Filesystem } from '@mastra/s3';
// SDK discovers credentials from the environment
const filesystem = new S3Filesystem({
bucket: 'my-bucket',
region: 'us-east-1',
});
You can also pass a credential provider function for auto-refreshing credentials, which is useful for ECS, Lambda, SSO, or AssumeRole deployments:
import { S3Filesystem } from '@mastra/s3';
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
const filesystem = new S3Filesystem({
bucket: 'my-bucket',
region: 'us-east-1',
credentials: fromNodeProviderChain(),
});
const workspace = new Workspace({
filesystem: new S3Filesystem({
bucket: 'my-r2-bucket',
region: 'auto',
endpoint: `https://${process.env.R2_ACCOUNT_ID}.r2.cloudflarestorage.com`,
accessKeyId: process.env.R2_ACCESS_KEY_ID,
secretAccessKey: process.env.R2_SECRET_ACCESS_KEY,
}),
});
When used with @mastra/e2b, S3 filesystems can be mounted into E2B sandboxes via s3fs-fuse:
import { Workspace } from '@mastra/core/workspace';
import { S3Filesystem } from '@mastra/s3';
import { E2BSandbox } from '@mastra/e2b';
const workspace = new Workspace({
mounts: {
'/my-bucket': new S3Filesystem({
bucket: 'my-bucket',
region: 'us-east-1',
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
}),
},
sandbox: new E2BSandbox(),
});
For more information, see the Mastra Workspaces documentation.
FAQs
S3-compatible filesystem provider for Mastra workspaces (AWS S3, Cloudflare R2, MinIO)
The npm package @mastra/s3 receives a total of 11,083 weekly downloads. As such, @mastra/s3 popularity was classified as popular.
We found that @mastra/s3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.