Commit Graph

604 Commits

Author SHA1 Message Date
GitHub Actions bc9f2cf882 chore: enable Gotify and Custom Webhhok notifications and improve payload validation
- Enhanced Notifications component tests to include support for Discord, Gotify, and Webhook provider types.
- Updated test cases to validate the correct handling of provider type options and ensure proper payload structure during creation, preview, and testing.
- Introduced new tests for Gotify token handling and ensured sensitive information is not exposed in the UI.
- Refactored existing tests for clarity and maintainability, including improved assertions and error handling.
- Added comprehensive coverage for payload validation scenarios, including malformed requests and security checks against SSRF and oversized payloads.
2026-02-24 05:34:25 +00:00
GitHub Actions ee5350d675 feat: add keepalive controls to System Settings
- Introduced optional keepalive settings: `keepalive_idle` and `keepalive_count` in the Server struct.
- Implemented UI controls for keepalive settings in System Settings, including validation and persistence.
- Added localization support for new keepalive fields in multiple languages.
- Created a manual test tracking plan for verifying keepalive controls and their behavior.
- Updated existing tests to cover new functionality and ensure proper validation of keepalive inputs.
- Ensured safe defaults and fallback behavior for missing or invalid keepalive values.
2026-02-23 19:33:56 +00:00
GitHub Actions 63d7c5c0c4 chore: Update Caddy patch scenario and enhance CaddyAdminAPI validation in config 2026-02-23 14:41:55 +00:00
GitHub Actions 9634eb65ad chore: Add tests for enhanced security notification service and proxy host validation 2026-02-22 22:53:11 +00:00
GitHub Actions a52ba29f02 chore: Update malformed URL test expectations in ProxyHostService validation 2026-02-22 17:44:17 +00:00
GitHub Actions f5db7ad0e4 chore: Enhance backend test coverage and add new functional tests for Security page
- Added tests to `proxyhost_service_validation_test.go` to validate fallback parsing and handle invalid hostname characters.
- Introduced new tests for DNS challenge validation in `proxyhost_service_validation_test.go`.
- Updated `current_spec.md` to reflect changes in testing strategy and coverage goals for PR #729.
- Enhanced `Security.functional.test.tsx` to include navigation test for Notifications button.
- Mocked `useNavigate` from `react-router-dom` to verify navigation behavior in Security page tests.
2026-02-22 17:12:17 +00:00
GitHub Actions 7497cbecd0 chore: Implement manual test plan for SMTP mock server flakiness fix
- Added a new documentation file outlining the manual test plan to validate the SMTP mock server flakiness fix, ensuring improved mail test reliability without affecting production behavior.
- Updated the current specification document to reflect the focus on stabilizing flaky SMTP STARTTLS+AUTH unit tests, including detailed research findings and requirements for the implementation.
- Created a QA/Security validation report for the SMTP flaky test fix, confirming that changes are test-only, stable under repeated runs, and do not introduce new security risks.
2026-02-22 06:29:37 +00:00
GitHub Actions b14f6f040f chore: Add tests for feature flags and notification providers
- Implement tests for feature flags coverage in `feature_flags_coverage_v2_test.go` to validate behavior with invalid persisted and environment values, as well as default settings.
- Create tests in `notification_provider_patch_coverage_test.go` to ensure correct handling of notification provider updates, including blocking type mutations for non-Discord providers.
- Add tests in `security_notifications_patch_coverage_test.go` to verify deprecated headers, handle invalid CIDR warnings, and ensure correct severity handling for security events.
- Introduce migration error handling tests in `routes_coverage_test.go` to ensure graceful handling of migration errors during registration.
- Enhance `cerberus_blockers_test.go` with tests for disabled security event notifications and error handling for dispatch failures.
- Update `router_test.go` to validate notify routing based on feature flags.
- Refactor `mail_service.go` to normalize base URLs for invites, ensuring proper handling of trailing slashes.
- Modify `notification_service_json_test.go` and `notification_service_test.go` to mock Discord validation and improve webhook testing.
- Update `proxyhost_service.go` to enhance hostname validation by parsing URLs.
- Refine `uptime_service.go` to extract ports correctly from URLs, including handling edge cases.
- Enhance frontend tests in `notifications.test.ts` and `Notifications.test.tsx` to ensure correct behavior for Discord notification providers and enforce type constraints.
2026-02-21 20:55:01 +00:00
GitHub Actions 9094d3b99b choret: enforce discord-only provider type across notifications API and UI
- Added validation to reject non-discord provider types in create, update, test, and preview operations.
- Updated the notifications form to automatically normalize non-discord types to discord.
- Modified UI to display explicit messaging for deprecated and non-dispatch statuses for non-discord providers.
- Enhanced tests to cover new validation logic and UI changes for provider types.
2026-02-21 14:28:06 +00:00
GitHub Actions 718358314f chore: Update notification provider to support Discord only
- Refactored notification provider tests to use Discord webhook URLs.
- Updated frontend forms and API interactions to restrict provider type to Discord.
- Modified translations to reflect the change in supported provider types.
- Enhanced UI to indicate deprecated status for non-Discord providers.
- Adjusted documentation to align with the new provider structure.
2026-02-21 06:23:46 +00:00
GitHub Actions 1e14dcd59c fix: Prevent exposure of GotifyToken in JSON response for enhanced security 2026-02-20 14:07:21 +00:00
GitHub Actions 1d909afe41 fix: Update GotifyToken field to prevent exposure in JSON response 2026-02-20 14:06:46 +00:00
GitHub Actions 105338ef67 fix: Sanitize event type logging in EnhancedSecurityNotificationService 2026-02-20 13:56:56 +00:00
GitHub Actions 1309189523 feat: Enhance security notifications with new event types and provider integration 2026-02-20 13:03:40 +00:00
GitHub Actions 5429d85e8a feat: Implement enhanced security notification service with compatibility layer
- Introduced EnhancedSecurityNotificationService for provider-based notifications.
- Added migration logic from legacy notification configuration to managed providers.
- Updated NotificationConfig model to reflect API surface changes and maintain legacy fields.
- Enhanced Cerberus middleware to dispatch security events based on feature flags.
- Updated routes to utilize the new enhanced service and handle migration at startup.
- Added feature flag for security provider events to control behavior in production.
- Updated tests to cover new functionality and ensure compatibility with existing behavior.
2026-02-20 05:01:38 +00:00
GitHub Actions 127a81a748 chore: add unit test for DeprecatedUpdateSettings to verify JSON response fields 2026-02-20 00:02:48 +00:00
GitHub Actions c68804d37e feat: migrate from shoutrr to notfy 2026-02-19 22:50:05 +00:00
GitHub Actions 0c2e2f7214 fix: stabilize certificate test execution under CI concurrency
This change hardens certificate handler test execution so repeated CI runs are deterministic and no longer fail intermittently under concurrent scheduling and race-mode pressure.

It was necessary because initialization timing and test setup ordering created nondeterministic behavior that produced sporadic failures in the backend test suite.

The result is a stable certificate list test path with explicit validation gates and reproducible test artifacts for auditing.

Known container vulnerability findings remain documented and are treated as an accepted exception for this hotfix scope, with remediation deferred to the dedicated security track.
2026-02-19 00:44:44 +00:00
GitHub Actions b4b076039f fix: Update baseline references to use 'origin/development' for consistency across scripts and tests 2026-02-18 17:36:52 +00:00
GitHub Actions 983ec7a42e fix: Add unit tests for emergency bypass and backup service validation 2026-02-18 17:33:56 +00:00
GitHub Actions 849d95ca84 fix: Enhance Dockerfile and scripts for improved dependency management and coverage reporting 2026-02-18 14:31:14 +00:00
GitHub Actions 0369eb1c12 fix: Enhance logging sanitization across various handlers and services
- Removed unnecessary fields from logs where applicable to reduce clutter and focus on essential information.
- Ensured consistent logging practices to enhance security and prevent log injection vulnerabilities.
2026-02-18 13:06:26 +00:00
GitHub Actions 24509dc84f fix: add allowlist normalization and validation in permissions repair process 2026-02-18 06:31:19 +00:00
GitHub Actions 0520ce4dc3 chore: enhance test stability by managing SecurityService lifecycle and updating database migrations 2026-02-17 22:57:25 +00:00
GitHub Actions 2cad49de85 chore: Add tests for backup service, crowdsec startup, log service, and security headers
- Implement tests for BackupService to handle database extraction from backup archives with SHM and WAL entries.
- Add tests for BackupService to validate behavior when creating backups for non-SQLite databases and handling oversized database entries.
- Introduce tests for CrowdSec startup to ensure proper error handling during configuration creation.
- Enhance LogService tests to cover scenarios for skipping dot and empty directories and handling read directory errors.
- Add tests for SecurityHeadersService to ensure proper error handling during preset creation and updates.
- Update ProxyHostForm tests to include HSTS subdomains toggle and validation for port input handling.
- Enhance DNSProviders tests to validate manual challenge completion and error handling when no providers are available.
- Extend UsersPage tests to ensure fallback mechanisms for clipboard operations when the clipboard API fails.
2026-02-17 19:13:28 +00:00
GitHub Actions 9713908887 fix: format JSON threshold and warnings for consistency in test output 2026-02-17 15:14:17 +00:00
GitHub Actions 93325bb1ca chore: Add tests for auth cookie extraction and rate limit middleware behavior
- Implemented tests for `extractAuthCookieToken` to ensure it returns an empty string when the request is nil and ignores non-auth cookies.
- Added tests for `isAdminSecurityControlPlaneRequest` to verify it correctly uses the decoded raw path.
- Enhanced `NewRateLimitMiddleware` tests to check fallback behavior for non-positive window values and to ensure it bypasses rate limiting for control plane bearer requests.
2026-02-17 15:13:56 +00:00
GitHub Actions b9bb14694f chore: add detailed file coverage reporting and sorting functionality 2026-02-17 13:59:11 +00:00
GitHub Actions aefbc5eee8 chore: add local pre-CI patch report generation for backend and frontend coverage
- Implemented a new script `local-patch-report.sh` to generate a local patch report.
- The report computes patch coverage based on changes from the current branch against `origin/main`.
- Integrated backend and frontend coverage inputs, producing both Markdown and JSON output artifacts.
- Updated existing frontend coverage script to validate the presence of LCOV coverage file.
- Added tests for coverage computation and parsing of unified diffs for changed lines.
- Enhanced error handling and validation for coverage inputs and baseline references.
2026-02-17 13:11:29 +00:00
GitHub Actions 7c82f5ad0d fix: update database connection settings in notification rate limiting test for improved reliability 2026-02-17 08:46:39 +00:00
GitHub Actions 45461cdc44 fix: update test fixtures to use new hub_index_fixture.json for improved testing 2026-02-17 08:26:15 +00:00
GitHub Actions 4105ef5eee fix: replace runtime.Caller with embed.FS for reading test fixtures 2026-02-17 08:00:39 +00:00
GitHub Actions 897a76f164 fix: streamline environment variable setup in bouncer and LAPI key tests for consistency 2026-02-17 07:32:44 +00:00
GitHub Actions 982fc9826a fix: update setupNotificationTestDB to accept testing.T parameter for improved test isolation 2026-02-17 07:32:15 +00:00
GitHub Actions 416a9ab29c fix: refactor BackupService to use configurable backup and cleanup functions 2026-02-17 07:31:32 +00:00
GitHub Actions d6e01b23be fix: update readFixture to use dynamic path for testdata directory 2026-02-17 07:31:03 +00:00
GitHub Actions 678be42576 fix: standardize formatting in TestBackupService_Restore_ZipSlip and TestRunScheduledBackup_CleanupFails 2026-02-17 05:37:53 +00:00
GitHub Actions ab2b49667d fix: remove parallel execution from TestFetchIndexFallbackHTTP for consistent test behavior 2026-02-17 05:37:34 +00:00
GitHub Actions 2a355d1c8c fix: refactor bouncer key path handling and acquisition config retrieval 2026-02-17 05:12:20 +00:00
GitHub Actions 5d5d1b474a fix: enhance credential deletion with retry logic for transient database locks 2026-02-17 04:58:13 +00:00
GitHub Actions c98b075729 fix: update payload key in TestUpdateAcquisitionConfig to use 'content' instead of 'config' 2026-02-17 04:40:14 +00:00
GitHub Actions fe70b60f39 fix: update certificate handler tests to use file-backed DB with busy timeout for improved isolation 2026-02-17 04:31:54 +00:00
GitHub Actions c88b80fc4e fix: update acquisition config tests to set environment variable and assert status code 2026-02-17 04:31:30 +00:00
GitHub Actions d8a6a3e97b fix: update Crowdsec handler tests to improve environment variable handling and response validation 2026-02-17 04:31:11 +00:00
GitHub Actions 4a1c6f6ac0 fix: improve error handling in ReloadPlugins test by simulating directory permission errors 2026-02-17 04:30:32 +00:00
GitHub Actions 07322be5db fix: enhance TCP port handling in startup tests and add readiness checks 2026-02-17 04:28:00 +00:00
GitHub Actions 5d72cec406 fix: refactor TestFetchIndexFallbackHTTP to use httptest for HubBaseURL 2026-02-17 04:27:40 +00:00
GitHub Actions 0bd1ae2fde fix: remove unnecessary database migration call in NewSecurityService 2026-02-17 04:26:46 +00:00
GitHub Actions 4bd0c4b403 fix: update database connection handling in tests to use file-backed SQLite with WAL mode 2026-02-17 01:54:28 +00:00
GitHub Actions 66cb95275d fix(tests): adapt TestMain_DefaultStartupGracefulShutdown_Subprocess to Go 1.26.0 signal handling
- Increased SIGTERM signal timeout from 500ms to 1000ms
- Go 1.26.0 changed signal delivery timing on Linux
- Test now passes reliably with adequate startup grace period

Related to Go 1.26.0 upgrade (commit dc40102a)
2026-02-16 23:53:30 +00:00