Skip to content

fix(backend): require every granted scope - #1450

Open
bamiebot-maker wants to merge 1 commit into
LabsCrypt:mainfrom
bamiebot-maker:fix/require-all-scopes
Open

fix(backend): require every granted scope#1450
bamiebot-maker wants to merge 1 commit into
LabsCrypt:mainfrom
bamiebot-maker:fix/require-all-scopes

Conversation

@bamiebot-maker

Copy link
Copy Markdown
Contributor

Summary

  • correct the inverted predicate in �ackend/src/middleware/jwtAuth.ts
    equireScopes
  • reject authenticated callers when any required scope is absent
  • preserve the �dmin:all bypass
  • add a regression test for a caller holding only one of multiple required scopes

Closes #1362

Validation

pm test -- --runInBand src/middleware/tests/jwtAuth.test.ts — 17 passed

pm run typecheck — passed

  • focused ESLint for the changed source and test — passed
  • git diff --check — passed

@bamiebot-maker

Copy link
Copy Markdown
Contributor Author

CI audit: focused jwtAuth tests (17/17), backend typecheck, and focused lint all pass locally. Passing CI jobs include scripts typecheck, env docs, migration paths, and supply-chain audit. Failed matrix jobs are unrelated baseline failures: backend lint flags existing formatting in �uditLog.ts/
equestLogger.ts, frontend has existing store/amount/CSV/hook test failures, and contracts have existing lending-pool failures. The PR touches only
equireScopes and its regression test.

@bamiebot-maker
bamiebot-maker force-pushed the fix/require-all-scopes branch from f0d644a to 9a7fa5b Compare July 29, 2026 09:22
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.

[Backend] Scope gate is inverted, so any user passes

1 participant