Commit Graph

464 Commits

Author SHA1 Message Date
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 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 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 4d00af75b6 fix(tests): enhance database setup for unit tests and address CI failures
- Implemented a function to create a valid SQLite database for testing in db_health_handler_test.go.
- Replaced dummy database file creation with a proper SQLite setup to ensure tests run against a valid database.
- Set CHARON_ENCRYPTION_KEY environment variable in dns_provider_service_test.go to prevent RotationService initialization warnings.
- Added detailed remediation plan for CI Codecov backend test failures, addressing encryption key requirements and database record not found errors.
2026-02-16 21:20:34 +00:00
GitHub Actions 716ec91f8f chore: Enhance test coverage across various handlers and services
- Added tests for transient SQLite errors in emergency_handler_test.go.
- Introduced validation tests for provider errors in notification_provider_handler_validation_test.go.
- Implemented helper tests for settings handling in settings_handler_helpers_test.go.
- Expanded backup_handler_test.go to include SQLite database setup and validation.
- Improved system_permissions_handler_test.go with additional path repair tests.
- Updated backup_service_test.go to ensure proper database handling and error checks during backup operations.
- Refined import_handler_test.go with additional session validation tests.
2026-02-16 20:32:16 +00:00
GitHub Actions ec36ce32b6 chore: add unit tests for email recipient normalization and SQLite error detection 2026-02-16 18:28:38 +00:00
GitHub Actions 4d3962e05a test: add tests for production environment detection and request scheme handling 2026-02-16 17:31:10 +00:00
GitHub Actions 24c8deff7a fix: increase memory limit for vitest and improve test stability
- Updated test scripts in package.json to set NODE_OPTIONS for increased memory limit.
- Added safety checks for remote servers and domains in ProxyHostForm component to prevent errors.
- Refactored Notifications tests to remove unnecessary use of fake timers and improve clarity.
- Updated ProxyHosts extra tests to specify button names for better accessibility.
- Enhanced Security functional tests by centralizing translation strings and improving mock implementations.
- Adjusted test setup to suppress specific console errors related to act() warnings.
- Modified vitest configuration to limit worker usage and prevent memory issues during testing.
2026-02-16 09:24:52 +00:00
GitHub Actions e0181deb66 chore: add unit tests for LogsWebSocketHandler and streaming with filters 2026-02-16 06:57:12 +00:00
GitHub Actions 2e80733028 chore: add unit tests for auth handler, permission helpers, and mail service error handling 2026-02-16 06:48:49 +00:00
GitHub Actions 21b0f7908f chore: enhance coverage with new unit tests for various handlers and services 2026-02-16 06:06:45 +00:00
GitHub Actions 3a25782a11 chore: add unit tests for system permissions handler and proxy host service validation 2026-02-16 05:41:49 +00:00
GitHub Actions 5a46ef4219 fix: include invite URL in user invitation response and update related tests 2026-02-16 03:39:28 +00:00
GitHub Actions 43c6317f82 fix: trim whitespace for domain names and forward host, enforce DNS provider requirement for DNS challenge 2026-02-15 20:11:53 +00:00
GitHub Actions cd8f5f9608 fix: add parsing functions for nullable uint fields and forward port validation in proxy host updates 2026-02-15 20:11:03 +00:00
GitHub Actions f4fafde161 fix: enforce validation for empty domain names in proxy host updates and update related tests 2026-02-15 18:31:46 +00:00
GitHub Actions ee72fc8f65 fix: enhance Discord webhook validation and improve error handling for IP address hosts 2026-02-14 15:15:34 +00:00
GitHub Actions 380a0ab60f fix: implement canonicalization for Discord webhook URLs and enhance payload validation 2026-02-14 06:41:57 +00:00
GitHub Actions f906f4a21f fix: improve error handling and session management in various handlers and middleware 2026-02-14 00:52:40 +00:00
GitHub Actions a88dd24de9 fix: enhance authentication flow and session management in AuthHandler and middleware 2026-02-13 23:43:17 +00:00
GitHub Actions 6e83a3281a fix: remove unused TimeRemaining field from TestVerifyResult_Fields 2026-02-13 20:04:54 +00:00
GitHub Actions a4b4c0fc83 fix: remove unused parameter from email address parsing functions 2026-02-13 20:03:55 +00:00
GitHub Actions a44530a682 fix: change Caddy config reload from async to sync for deterministic applied state 2026-02-13 18:50:04 +00:00
GitHub Actions 0024b81e39 fix: add latest config apply state retrieval; enhance status response with configuration details 2026-02-13 18:49:28 +00:00
GitHub Actions d8c08c4b5d fix: enhance local request detection; add functions to normalize host and check local requests 2026-02-13 18:19:21 +00:00
GitHub Actions 26970e43d3 fix: update auth token extraction logic; prioritize cookie-based authentication and streamline header retrieval 2026-02-13 18:18:32 +00:00