feat: flag insecure websocket transport in AW-005#4
Merged
Conversation
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
This ships a user-visible hardening upgrade to AW-005 by expanding cleartext transport detection beyond
http://to also catchws://endpoints.Why now
Recent telemetry converged on MCP transport security and deterministic guardrails:
What changed
ws://endpoints in bothurlandargsfields (alongside existinghttp://checks).[::1]) to avoid noisy local false positives.https:///wss://).testdata/ws-no-auth.jsonand integration coverage for websocket detection.sort_by_key(Reverse(...))for Rust 1.95 clippy compatibility (no behavior change).Deep validation
1) Full/repo-level suite
cargo testβ pass (212unit +37integration tests passed)2) Targeted tests (changed modules)
cargo test rules::transport::testsβ pass (8passed)cargo test test_detects_insecure_websocket_transportβ pass (1passed)3) Lint/type/build checks
cargo clippy --all-targets -- -D warningsβ passcargo build --releaseβ pass4) Smoke/integration check for changed behavior
./target/release/agentwise scan testdata/ws-no-auth.json --format json | jq -r '.findings[] | select(.rule_id=="AW-005") | .message'β output:Server 'realtime-api' uses unencrypted WS transport: ws://realtime.example.com/mcp./target/release/agentwise scan testdata/ws-no-auth.json --fail-on highβ expected failing gate behavior (EXIT_CODE=1)Docs tone check
node /Users/bwise/.openclaw/workspace/projects/humanizer/src/cli.js score README.md --ignore-codeβπ‘ 43/100