-
Notifications
You must be signed in to change notification settings - Fork 14.4k
fix(a2a-server): add missing return after 501 in /tasks/metadata endpoint #24293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -326,6 +326,7 @@ export async function createApp() { | |
| error: | ||
| 'Listing all task metadata is only supported when using InMemoryTaskStore.', | ||
| }); | ||
| return; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Remediation: Implement an authorization check to ensure that the user requesting the metadata is authorized to view it. Typically, this involves filtering the tasks to only include those owned by the current user or requiring administrative privileges to list all tasks. |
||
| } | ||
| try { | ||
| const wrappers = agentExecutor.getAllTasks(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
/tasks/metadataendpoint lacks any authentication or authorization checks. While this PR correctly adds areturnstatement to prevent a server crash (DoS) when using a non-in-memory task store, the endpoint remains publicly accessible. Any unauthenticated user can retrieve metadata for all tasks currently in memory, which may include sensitive information such as workspace paths and agent settings for all users. It is recommended to apply authentication middleware to this route and ensure that users can only access metadata for tasks they own.