Skip to content

Conversation

@mdlmarkham
Copy link
Owner

This commit addresses 7 security issues identified in the security review:

CRITICAL FIXES:

  • Remove DEBUG logging from production code (info disclosure)

    • Changed to use LOG_LEVEL env var (defaults to INFO)
    • DEBUG auth logging only enabled in development mode
    • Affects: src/mcp_server.py, src/mcp_server_legacy.py
  • Fix deprecated datetime.utcnow() usage (auth bypass risk)

    • Replace with timezone-aware datetime.now(timezone.utc)
    • Handle both naive and aware datetime comparisons
    • Affects: src/auth/token_auth.py
  • Add validation for git repository URLs (RCE risk)

    • Validate repo URLs against allowed hosts whitelist
    • Default allows github.com, gitlab.com, bitbucket.org
    • Configurable via SYSTEMMANAGER_ALLOWED_GIT_HOSTS
    • Affects: src/services/compose_manager.py
  • Remove hardcoded TSIDP URL (config security)

    • Require explicit TSIDP_URL configuration
    • Provide clear error message with example
    • Update .env.template with placeholder
    • Affects: src/server/config.py, deploy/.env.template

DEPENDENCY FIXES:

  • Standardize cryptography version to >=42.0.0
    • Resolves inconsistency between requirements.txt and pyproject.toml
    • Affects: pyproject.toml

DOCUMENTATION:

  • Add comprehensive security review report
    • Documents all findings with severity levels
    • Includes remediation recommendations
    • Notes positive security practices observed
    • Provides testing and compliance information

All critical and high-severity issues have been addressed. Medium and low-severity issues documented for future work.

See SECURITY_REVIEW_REPORT.md for full details.

This commit addresses 7 security issues identified in the security review:

CRITICAL FIXES:
- Remove DEBUG logging from production code (info disclosure)
  - Changed to use LOG_LEVEL env var (defaults to INFO)
  - DEBUG auth logging only enabled in development mode
  - Affects: src/mcp_server.py, src/mcp_server_legacy.py

- Fix deprecated datetime.utcnow() usage (auth bypass risk)
  - Replace with timezone-aware datetime.now(timezone.utc)
  - Handle both naive and aware datetime comparisons
  - Affects: src/auth/token_auth.py

- Add validation for git repository URLs (RCE risk)
  - Validate repo URLs against allowed hosts whitelist
  - Default allows github.com, gitlab.com, bitbucket.org
  - Configurable via SYSTEMMANAGER_ALLOWED_GIT_HOSTS
  - Affects: src/services/compose_manager.py

- Remove hardcoded TSIDP URL (config security)
  - Require explicit TSIDP_URL configuration
  - Provide clear error message with example
  - Update .env.template with placeholder
  - Affects: src/server/config.py, deploy/.env.template

DEPENDENCY FIXES:
- Standardize cryptography version to >=42.0.0
  - Resolves inconsistency between requirements.txt and pyproject.toml
  - Affects: pyproject.toml

DOCUMENTATION:
- Add comprehensive security review report
  - Documents all findings with severity levels
  - Includes remediation recommendations
  - Notes positive security practices observed
  - Provides testing and compliance information

All critical and high-severity issues have been addressed.
Medium and low-severity issues documented for future work.

See SECURITY_REVIEW_REPORT.md for full details.
@mdlmarkham mdlmarkham merged commit 528b00f into master Nov 18, 2025
1 check failed
@mdlmarkham mdlmarkham deleted the claude/review-test-project-01QwQTFaTsJggDZ27ksb7YhW branch November 18, 2025 13:05
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.

3 participants