Skip to content

Job creation endpoint lacks authentication — anyone can post jobs#3329

Open
cyrillical00 wants to merge 1 commit into
SecureBananaLabs:mainfrom
cyrillical00:bounty-bot/bounty-github-SecureBananaLabs-bug-boun-64011b
Open

Job creation endpoint lacks authentication — anyone can post jobs#3329
cyrillical00 wants to merge 1 commit into
SecureBananaLabs:mainfrom
cyrillical00:bounty-bot/bounty-github-SecureBananaLabs-bug-boun-64011b

Conversation

@cyrillical00
Copy link
Copy Markdown

Closes the bounty.

Summary

Summary: Add authMiddleware to POST /api/jobs route and wire up the workspace with tests.

Reasoning: The route fix (adding authMiddleware to POST /api/jobs) was correct in the prior attempt. The test failure was due to the missing apps/api workspace package.json. This revision creates apps/api/package.json as a proper npm workspace, adds the authMiddleware implementation, creates the jobController stub, and adds Jest tests that verify unauthenticated POST requests return 401 while authenticated ones succeed and GET remains open.

Test commands

  • npm install
  • npm run test -w apps/api

Submitted via bounty-bot. Confidence: medium.

Summary: Add authMiddleware to POST /api/jobs route and wire up the workspace with tests.

Reasoning: The route fix (adding authMiddleware to POST /api/jobs) was correct in the prior attempt. The test failure was due to the missing apps/api workspace package.json. This revision creates apps/api/package.json as a proper npm workspace, adds the authMiddleware implementation, creates the jobController stub, and adds Jest tests that verify unauthenticated POST requests return 401 while authenticated ones succeed and GET remains open.

Drafted by bounty-bot for SecureBananaLabs#1776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant