registry / @mastra/code-sdk / 1.0.1
@mastra/code-sdk@1.0.1
Mastra Code SDK: the agent core behind Mastra Code (everything except the TUI) — build your own UIs and surfaces on top of it
Static Scan Results
scanned 4mo ago · by rust-scannerStatic analysis flagged 10 finding(s) at 72.0% confidence. This version is warn-only unless an AI or security-team review confirms malicious behavior.
Static reason
One or more suspicious static signals were detected.
Decision evidence
public snapshotBehavioral surface
ChildProcessCryptoDynamicRequireEnvironmentVarsFilesystemNetworkShell
HighEntropyStringsTelemetryUrlStrings
Source & flagged code
2 flaggeddist/plugins/loader.jsView file
109url.searchParams.set("size", stat.size.toString());
L110: const mod = await import(url.href);
L111: return validatePluginExport(mod.default ?? mod.plugin);
Medium
Dynamic Require
Package source references dynamic require/import behavior.
dist/plugins/loader.jsView on unpkg · L109dist/index.jsView file
130return {
L131: accessToken: process.env.MASTRA_CLOUD_ACCESS_TOKEN,
L132: projectId: process.env.MASTRA_PROJECT_ID
...
L153: async function createMastraCodeAgentController(config) {
L154: const cwd = config?.cwd ?? process.cwd();
L155: const homeDir = config?.homeDir ?? config?.initialState?.homeDir;
...
L196: const mgApiKey = process.env["MASTRA_GATEWAY_API_KEY"] ?? storedGatewayKey;
L197: const mastraGatewayBaseUrl = (process.env["MASTRA_GATEWAY_URL"] ?? storedGatewayUrl ?? "https://gateway-api.mastra.ai").replace(/\/+$/, "").replace(/\/v1$/, "");
L198: const mastraCodeGateway = createMastraCodeGateway({
...
L211: const sessionId = `mastracode-session-${shortHash(project.resourceId)}`;
L212: const ownerId = `mastracode-${shortHash(`${hostname()}\0${project.rootPath}`)}`;
L213: const
High
Sandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
Findings
1 High4 Medium5 Low
HighSandbox Evasion Gated Capabilitydist/index.js
MediumDynamic Requiredist/plugins/loader.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowTelemetry
LowUrl Strings
Affected versions and remediation
This report applies to @mastra/code-sdk@1.0.1.
See all versions of @mastra/code-sdk for other recorded verdicts.
- Review the evidence and your use of @mastra/code-sdk@1.0.1 before allowing it. Restrict the permissions described in this report.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
Evidence last updated: .
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.