Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brian-hussey
Copy link

πŸ› Bug-fix PR

Before opening this PR please:

  1. make lint - passes ruff, mypy, pylint
  2. make test - all unit + integration tests green
  3. make coverage - β‰₯ 90 %
  4. make docker docker-run-ssl or make podman podman-run-ssl
  5. Update relevant documentation.
  6. Tested with sqlite and postgres + redis.
  7. Manual regression no longer fails. Ensure the UI and /version work correctly.

πŸ“Œ Summary

What problem does this PR fix and why?
Addresses part of Issue #212 - This addresses 3 blocker level issues found by Sonar scan.

πŸ” Reproduction Steps

  1. Set up local sonarqube server, and scan:
make sonar-deps-podman
make sonar-up-podman
make sonar-info
make pysonar-scanne
  1. Open web interface for sonarqube
  2. Go to "Issues" tab
  3. Select "Blocker" severity
  4. From main branch shows 18 issues, following these changes show 15 issues.

🐞 Root Cause

  1. in mcpgateway/routers/email_auth.py removed unused/unsupported parameter from function call.
  2. in mcpgateway/routers/rbac.py removed unused/unsupported parameter from function call.
  3. in mcpgateway/services/email_auth_service.py type hint for old_password didn;t allow for None value passed from https://github.com/IBM/mcp-context-forge/blob/main/mcpgateway/routers/email_auth.py#L583
...
# Update password if provided
    if user_request.password:
        await auth_service.change_password(
            email=user_email,
            old_password=None,  # Admin can change without old password
            new_password=user_request.password,
...

πŸ’‘ Fix Description

Made changes as required to pass Sonarqube scan for target areas.
Confirmed make test doesn't show any breakages.

πŸ§ͺ Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage β‰₯ 90 % make coverage
Manual regression no longer fails steps / screenshots

πŸ“ MCP Compliance (if relevant)

  • Matches current MCP spec
  • No breaking change to MCP clients

βœ… Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

@crivetimihai crivetimihai self-assigned this Nov 13, 2025
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.

2 participants