test: Add get_vulnerability_mode helper function - #19
Closed
bryankthompson wants to merge 1 commit into
Closed
Conversation
Testing the AI code review workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
AI Code ReviewThis PR adds type safety improvements and introduces an intentional security vulnerability for testing purposes. While the changes improve code structure, there are several security concerns related to the session management implementation. Summary
🚨 Critical Issues (Must Fix)1. Intentional session timeout vulnerability (CWE-613)
2. Predictable session counter creates weak session IDs
|
bryankthompson
added a commit
that referenced
this pull request
Jan 11, 2026
Implements vulnerable_sse_reconnect_tool with 4 SSE session management vulnerabilities specific to MCP's streaming transport: - CWE-330: Predictable Event IDs (sequential integers) - CWE-287: No Event ID Validation (accepts any Last-Event-ID) - CWE-384: Session Scope Bypass (events not bound to sessions) - CWE-613: No Event Expiration (events never expire) Changes: - src/config.py: Add SSE state variables - src/vulnerable_tools.py: Add vulnerable_sse_reconnect() with 4 actions - src/server.py: Register MCP tool, update counts (56 tools, 30 HIGH) - src-hardened/: Add hardened implementation with security measures - tests/test_sse_session_desync.py: 25 tests across 6 test classes - CLAUDE.md: Document Challenge #19 Closes #13 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bryankthompson
added a commit
that referenced
this pull request
Jan 11, 2026
Fixes from automated code review workflow: - Add Challenge #3 documentation to vulnerable_sse_reconnect docstring explaining intentional lack of input validation (ISSUE-002) - Add cwe_ids: ["CWE-200"] to error path for consistent vulnerability reporting across all code paths (ISSUE-003) - Add 3 new tests: documentation validation, CWE reporting validation, and empty event store edge case coverage - Update CLAUDE.md test count from 25 to 28 tests Test results: 28/28 passing 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_vulnerability_mode()helper function to config.pyPurpose
Testing the AI code review workflow after fixing the node_modules commit issue.
Test plan