mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
Refs SEC-246 Refs SEC-260 ## What The MongoDB Bedrock template was holding a few Vanta findings in place with stale pins. This updates the template to current published @mastra packages and drops those pins. | Finding | Where | Change | |---|---|---| | Aikido High AIKIDO-2026-10981 / 10990 on `@ai-sdk/provider-utils` 3.0.28 | template override + `@ai-sdk/amazon-bedrock` 3.0.105 / `ai` 5.0.210 | Removed the `@mastra/core` override that pinned 3.0.28. Bumped `@ai-sdk/amazon-bedrock` 3.0.105 → 3.0.146 and `ai` to ^5.0.289. Lockfile now has provider-utils 3.0.46. | | Aikido Low AIKIDO-2026-526145 on `@ai-sdk/provider-utils` 5.0.1 | same override | Override removed. `@mastra/core` 1.82.0 already depends on 5.0.72. | | Aikido Medium/Low on `ai` 5.0.210 | direct dep | `ai` ^5.0.0 (locked 5.0.210) → ^5.0.289 | Also bumped `@mastra/core` ^1.50.1 → ^1.82.0, plus the matching editor, loggers, memory, mongodb, observability, rag and `mastra` CLI versions. The existing amazon-bedrock patch (tool-use `input` optional) was refreshed for 3.0.146. No new overrides. The remaining template overrides (compression, image-size, `@hono/node-server`, chat, glob, minimatch) are unchanged. ## Also in this PR `@hono/node-server` 2.1.5 → 2.1.6 in `templates/template-security-incident-triage` and `templates/template-kyc-customer-onboarding` (direct dependency, GHSA-jpvv-r467-5p4w). These templates have no checked-in lockfile. No override changes. ## Verification In `templates/template-mongodb-bedrock-agent`: - `npm install` - `patch-package` applies the refreshed 3.0.146 patch - `tsc --noEmit` passes - `vitest run`: 8 passed, 6 skipped ## Not fixed - provider-utils 3.x Highs (AIKIDO-2026-10981 / 10990): there is no 3.x patch. Aikido still reports 3.0.46 as vulnerable. A real fix needs `@ai-sdk/amazon-bedrock` 4.x and `ai` 6.x (majors). - `ai` 5.x Mediums AIKIDO-2026-11000 / 10269: fixed only in `ai` 6.0.170 / 6.0.84. - nanoid 3.3.20 and yargs 17.7.3 in this template: latest in their lines; a fix would be a major. - Other repo-wide items (zod 3.25.76, provider-utils 2.2.8 / ai 4.3.19, undici 6.29.1 via `@qdrant/js-client-rest`, extract-zip, deepmerge, picomatch 4.0.7, etc.) are unchanged and listed in the Vanta report. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ELI5: The MongoDB Bedrock template gets newer library versions. It also drops old version pins that are no longer needed. ## Summary This PR updates the dependencies of the `templates/template-mongodb-bedrock-agent` template. It removes the `@mastra/core` provider-utils overrides and refreshes the Amazon Bedrock patch. The changeset also records an `@hono/node-server` bump in two other templates. ## Changes - `templates/template-mongodb-bedrock-agent/package.json` (+10/-15): - `@ai-sdk/amazon-bedrock`: `3.0.105` → `3.0.146`. - `ai`: `^5.0.0` → `^5.0.289`. - `@mastra/core`: `^1.50.1` → `^1.82.0`. - Other Mastra packages move to newer ranges: `@mastra/editor`, `@mastra/loggers`, `@mastra/memory`, `@mastra/mongodb`, `@mastra/observability`, `@mastra/rag`. - devDependency `mastra`: `^1.15.0` → `^1.38.0`. - Removes the `@mastra/core` `overrides` block. It pinned `@ai-sdk/provider-utils-v5` to `3.0.28`, `-v6` to `4.0.33`, and `-v7` to `5.0.1`. - The `compression`, `image-size`, and `@modelcontextprotocol/sdk` overrides are unchanged. - `templates/template-mongodb-bedrock-agent/patches/@ai-sdk+amazon-bedrock+3.0.146.patch` (+8/-8): Refreshed for version 3.0.146. `BedrockToolUseSchema` in the CommonJS and ESM builds now accepts tool-use objects without an `input` field. When `input` is present, it remains an unknown value. - `.changeset/vanta-2026-11-12-bedrock-template.md` (+6/-0): Adds a changeset with empty frontmatter, so it declares no package bump. The body describes the template dependency updates and the `@hono/node-server` bump from `2.1.5` to `2.1.6` in the security-incident-triage and kyc-customer-onboarding templates. It states that no published package changes are included. - `templates/template-kyc-customer-onboarding/package.json` and `templates/template-security-incident-triage/package.json` (+1/-1 each): `@hono/node-server` `2.1.5` → `2.1.6`. ## Public API No exported or public declarations change. ## Verification The PR description reports these results. They are not re-run here: - `npm install` completed. - `patch-package` applied the refreshed patch. - `tsc --noEmit` passed. - `vitest run` reported 8 passing and 6 skipped tests. ## Known gaps The PR description says these findings remain open: provider-utils 3.x high-severity findings (AIKIDO-2026-10981 / 10990), `ai` 5.x findings (AIKIDO-2026-11000 / 10269), and the template's `nanoid` and `yargs` findings. Other repository-wide findings are unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
History
|
|
|---|---|---|
| .. | ||
| template-accounts-payable-invoice-processing | ||
| template-agent-builder | ||
| template-agent-harness | ||
| template-browser-agent | ||
| template-browsing-agent | ||
| template-chat-with-pdf | ||
| template-chat-with-youtube | ||
| template-claw-assistant | ||
| template-company-knowledge | ||
| template-competitor-monitor-jev | ||
| template-connect-agent | ||
| template-csv-to-questions | ||
| template-customer-feedback-summarization | ||
| template-customer-refund-agent | ||
| template-deep-search | ||
| template-docs-chatbot | ||
| template-docs-expert | ||
| template-factory | ||
| template-factory-self-hosted | ||
| template-flash-cards-from-pdf | ||
| template-genui-data-explorer | ||
| template-github-review-agent | ||
| template-google-sheets | ||
| template-insurance-policy-checking | ||
| template-kyc-customer-onboarding | ||
| template-lead-qualification | ||
| template-meeting-notes | ||
| template-mongodb-bedrock-agent | ||
| template-organization-intelligence | ||
| template-personal-assistant | ||
| template-security-incident-triage | ||
| template-starter-agent | ||
| template-text-to-sql | ||
| template-vendor-risk-questionnaire | ||
| weather-agent | ||
| .gitignore | ||
| README.md | ||
Mastra templates
This directory contains standalone Mastra project templates.
New Gateway-first templates
template-docs-expert: Answers documentation questions with Gateway web search, citations, memory, and structured responses.template-browser-agent: Uses AgentBrowser to browse, inspect, and interact with web pages.template-meeting-notes: Turns Zoom transcripts or uploaded transcripts into structured notes with decisions and action items.template-company-knowledge: Indexes Linear and Notion content into pgvector and answers internal knowledge questions.template-claw-assistant: Operates a workspace with filesystem, sandbox, browser, and web-search tools.template-connect-agent: Turns Mastra platform integration connections into live agent tools with@mastra/connect, plus a cross-integration activity-digest workflow.template-starter-agent: Starter Agent — durable agent harness with@mastra/connecttools and channels, a platform-backed workspace, Studio agent/workflow editing via@mastra/editor, Postgres storage, and Redis-backed resumable streams.
How to add a new template
To add a new template to the templates/ directory, follow these steps:
1. Create a new template folder
- Inside the
templates/directory, create a new folder named after your template (e.g.,my-new-template/).
2. Required files
Your template folder must include the following files:
a. package.json
- Use OpenAI as the LLM provider in your code/config.
- All
@mastra/*dependencies should be set to"latest"in thedependenciessection. mastradevDependency should be set to"latest"in thedevDependenciessection.- The
descriptionfield should clearly describe what the template does.
b. .env.example
- List all required environment variables, such as API keys and configuration values.
c. README.md
Follow this template for your README.md:
# Title
Introductory paragraph describing what this template does.
## Why we built this
Explain the motivation behind creating this template and the problem it solves. And which features of Mastra it demonstrates.
## Demo
This demo runs in Mastra Studio, but you can connect this workflow to your React, Next.js, or Vue app using the [Mastra Client SDK](https://mastra.ai/docs/server/mastra-client) or agentic UI libraries like [AI SDK UI](https://mastra.ai/guides/build-your-ui/ai-sdk-ui), [CopilotKit](https://mastra.ai/guides/build-your-ui/copilotkit), or [Assistant UI](https://mastra.ai/guides/build-your-ui/assistant-ui).
## Prerequisites
- [OpenAI API key](https://platform.openai.com/api-keys): Used by default, but you can swap in any model
## Quickstart 🚀
1. **Clone the template**
- Run `npx create-mastra@latest --template TEMPLATE_NAME` to scaffold the project locally.
2. **Add your API keys**
- Copy `.env.example` to `.env` and fill in your keys.
3. **Start the dev server**
- Run `npm run dev` and open [localhost:4111](http://localhost:4111) to try it out.
## Making it yours
Explain how they can use it and how they can customize it for their needs.
## About Mastra templates
[Mastra templates](https://mastra.ai/templates) are ready-to-use projects that show off what you can build — clone one, poke around, and make it yours. They live in the [Mastra monorepo](https://github.com/mastra-ai/mastra) and are automatically synced to standalone repositories for easier cloning.
Want to contribute? See [CONTRIBUTING.md](./CONTRIBUTING.md).
d. CONTRIBUTING.md
Create a CONTRIBUTING.md file:
# Contributing
This repository is auto-generated from the [Mastra monorepo](https://github.com/mastra-ai/mastra). Pull requests opened here will be ignored.
To contribute:
1. Fork the [Mastra monorepo](https://github.com/mastra-ai/mastra)
2. Find this template in `templates/TEMPLATE_NAME`
3. Make your changes
4. Open a pull request against the monorepo
A bot syncs accepted changes to this repository.