mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-25 17:57:06 +00:00
fix(notification-routing): harden with security fixes, validation, and test coverage (#573)
- Add authMiddleware to GET/POST /api/agents (previously unauthenticated) - Add input validation to POST /api/agents (type, URL, enabled) - Add URL host validation via new URL() to notification-routes POST/PUT - Add priority type validation and enabled boolean check to routes - Add name length limit (100 chars) to routes POST/PUT - Add stack pattern dedup and whitespace filtering - Add NaN guard to DELETE /api/notifications/:id - Add dispatch_error to NotificationHistory TypeScript interface - Extract cleanStackPatterns() and validateHttpsUrl() helpers - Add standard and diagnostic logging to agents and routes endpoints - Add comprehensive integration tests for notification-routes CRUD - Add agents auth and validation tests - Add dispatch error recording unit tests
This commit is contained in:
@@ -109,6 +109,7 @@ export interface NotificationHistory {
|
||||
message: string;
|
||||
timestamp: number;
|
||||
is_read: boolean;
|
||||
dispatch_error?: string;
|
||||
}
|
||||
|
||||
export interface FleetSnapshot {
|
||||
|
||||
Reference in New Issue
Block a user