Repository navigation
EAI-2440: Check stream processor databases against databaseNames - #181
Merged
Merged
Conversation
cursor
Bot
force-pushed
the
cursor/database-allowlist-streams-81d8
branch
3 times, most recently
from
October 23, 2026 16:14
3cd2e6b to
fbb3540
Compare
cursor
Bot
force-pushed
the
cursor/database-allowlist-perf-advisor-81d8
branch
from
October 23, 2026 16:22
0caf67b to
538d531
Compare
cursor
Bot
force-pushed
the
cursor/database-allowlist-streams-81d8
branch
from
October 23, 2026 16:23
0d3750d to
69f5356
Compare
Base automatically changed from
cursor/database-allowlist-perf-advisor-81d8
to
main
October 23, 2026 16:29
cursor
Bot
force-pushed
the
cursor/database-allowlist-streams-81d8
branch
from
October 23, 2026 16:31
69f5356 to
1530e0b
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The recursive stream walker treats literal payloads as executable stages and rejects valid processors.
1 open issue
What changed in this PR
Extends the shared databaseNames guardrail to Atlas Stream Processing,
building on the earlier database and Performance Advisor checks.
Changes:
- Checks databases named in processor pipelines and dead-letter queues.
- Adds tests for allowed, disallowed, and malformed database arguments.
- Documents coverage and limitations in agent configuration comments and READMEs.
| File | Description |
|---|---|
packages/agent-engine-core/src/databaseAllowlist.ts |
Adds stream processor and Performance Advisor database checks. |
packages/agent-engine-core/src/databaseAllowlist.test.ts |
Tests database validation for both tool groups. |
agents/atlas-query-insights/src/agent_atlas_query_insights/config.ts |
Documents Performance Advisor coverage in comments. |
agents/atlas-query-insights/README.md |
Describes namespace validation. |
agents/atlas-explorer/src/agent_atlas_explorer/config.ts |
Documents stream validation and limitations in comments. |
agents/atlas-explorer/README.md |
Explains expanded guardrails and unchecked operations. |
Review effort: Balanced
The coverage comment listed several checks in one sentence, and the Atlas tool comment joined Performance Advisor with stream processors. Each check is now its own point so a reader can scan them.
The matcher checked length, then tested any shorter string against the patterns. Each check is now named, and a name containing $ or another forbidden character fails before a loose pattern can match it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Jira: https://jira.mongodb.org/browse/EAI-2440
Why this change
mongodb__atlas_streams_buildandmongodb__atlas_streams_managecan create or modify Atlas Stream Processingprocessors that read from or write to cluster databases (
$source,$lookup,$merge,$out, anddlq).databaseAllowlistMiddleware.Changes
databaseNamesonmongodb__atlas_streams_buildandmongodb__atlas_streams_manage:dlq.db$source.dbwhen a collection change stream source is configured$lookup.from.db$merge.into.db(or$merge.db)$out.dbdlqconfigs whose database cannot beread as a non-empty string
start-processoron anexisting processor, and cluster-wide
$sourcestages that omitdb) in theAtlas Explorer README and
config.tsNotes
cursor/database-allowlist-perf-advisor-81d8).$sourcestages do not name a database and continue to run.