Conversation
Owner
inercia
commented
Feb 16, 2026
- chore(appdir): add defense data directory path
- feat(defense): add scanner defense core package
- feat(defense): add middleware and server integration
- feat(defense): add configuration support
- docs(defense): document scanner defense feature
- feat(periodic): add immediate trigger (run now) support
- feat(periodic): add run now UI with confirmation dialog
- fix: update builtin prompts and tailwind CSS
- docs(rules): update Playwright testing documentation
- docs(defense): move scanner defense docs to separate file
There was a problem hiding this comment.
Pull request overview
This pull request introduces two major features: Scanner Defense for blocking malicious IPs at the TCP connection level, and Run Now functionality for periodic prompts. It also includes a fix for WebSocket message deduplication and documentation updates.
Changes:
- Implements scanner defense system with rate limiting, error rate analysis, and suspicious path detection
- Adds "run now" capability to trigger periodic prompts manually via UI with confirmation dialog
- Fixes WebSocket message deduplication to allow legitimate periodic prompts with identical content
- Updates configuration, documentation, and Playwright testing guidelines
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/defense/*.go | Core scanner defense implementation with blocklist, metrics, and detection logic |
| internal/defense/*_test.go | Comprehensive test coverage for scanner defense components |
| internal/web/middleware_defense.go | Request recording middleware for defense analysis |
| internal/web/server.go | Scanner defense initialization and integration |
| internal/web/server_external.go | Filtered listener wrapping for external connections |
| internal/web/periodic_runner.go | TriggerNow method for immediate periodic delivery |
| internal/web/periodic_runner_test.go | Tests for run-now functionality |
| internal/web/session_periodic_api.go | API endpoint for run-now requests |
| internal/web/session_api.go | Routing for periodic run-now sub-path |
| web/static/components/ConfirmDialog.js | Reusable confirmation dialog component |
| web/static/components/PeriodicFrequencyPanel.js | Run-now button with confirmation flow |
| web/static/components/ChatInput.js | Pass isStreaming prop to periodic panel |
| web/static/components/index.js | Export ConfirmDialog component |
| web/static/hooks/useWebSocket.js | Fix message deduplication to only use seq number |
| internal/config/config.go | Add ScannerDefense config to WebSecurity |
| internal/config/settings.go | Define ScannerDefenseConfig structure |
| internal/appdir/appdir.go | Add DefenseBlocklistPath for persistence |
| config/config.default.yaml | Scanner defense configuration examples |
| docs/config/ext-access/scanner-defense.md | Detailed scanner defense documentation |
| docs/config/ext-access.md | Reference to scanner defense docs |
| docs/config/web/README.md | Scanner defense configuration section |
| .augment/rules/32-testing-playwright.md | Playwright MCP testing workflow |
| config/prompts/builtin/*.md | Background color updates for built-in prompts |
| web/static/tailwind.css | Recompiled CSS with new utility classes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Use HasPrefix only in IsSuspiciousPath to avoid false positives - Fix YAML config field names to match actual struct - Remove misleading copy variable comment - Update user agent comment to explain Mitto-specific rationale - Show generic error message for non-409 failures in run-now UI - Add WaitGroup to ensure cleanup goroutine exits before Close() - Skip metrics collection for whitelisted IPs - Log warnings for invalid whitelist CIDR entries
Owner
Author
PR Review Comments Addressed ✅All 8 review comments have been addressed in commit :
Ready for re-review. |
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.