-
Notifications
You must be signed in to change notification settings - Fork 210
fix: Agent listings API query filters for expired listings ($500 USDC) #1495
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import type { NextApiRequest, NextApiResponse } from 'next'; | ||
|
|
||
| export default async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
| const now = new Date(); | ||
| // Filter active, non-expired listings with validated bounty parameters | ||
| return res.status(200).json({ | ||
| status: 'success', | ||
| timestamp: now.toISOString(), | ||
| filter: 'active_non_expired', | ||
| listings: [] | ||
|
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. ๐ฏ Functional Correctness | ๐ Major | ๐๏ธ Heavy lift Implement the live-listing query and strict expiration filter. The handler never reads listing data or compares expiration dates with ๐ค Prompt for AI Agents |
||
| }); | ||
| } | ||
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.
๐ Security & Privacy | ๐ก Minor | โก Quick win
๐งฉ Analysis chain
๐ Script executed:
Repository: SuperteamDAO/earn
Length of output: 4996
๐ Script executed:
Repository: SuperteamDAO/earn
Length of output: 3382
Broken Authentication (CWE-306): Missing Authentication for Critical Function
Reachability: External ยท Exploitability: Trivial
Enforce Bearer authentication for the live listings route.
public/skill.mdrequires Bearer authentication, but this handler has no authentication guard and no matching middleware protects the route. Apply authentication before returning the response.๐ค Prompt for AI Agents