Commit Graph

1251 Commits

Author SHA1 Message Date
GitHub Actions f14cd31f71 fix: pass tenant and force flags to cscli console enroll command
- Add --tags tenant:X when tenant/organization is provided
- Add --overwrite flag when force (rotate key) is requested
- Add extractUserFriendlyError() to parse cscli errors for user display
- Add comprehensive tests for command construction

Fixes enrollment not reaching CrowdSec.net when using the console enrollment form.
2025-12-16 01:26:23 +00:00
GitHub Actions 71e44f79a7 fix: resolve CrowdSec state sync issues and remove deprecated mode toggle
- Backend: Start/Stop handlers now sync both settings and security_configs tables
- Frontend: CrowdSec toggle uses actual process status (crowdsecStatus.running)
- Frontend: Fixed LiveLogViewer WebSocket race condition by using isPausedRef
- Frontend: Removed deprecated mode toggle from CrowdSecConfig page
- Frontend: Added info banner directing users to Security Dashboard
- Frontend: Added "Start CrowdSec" button to enrollment warning panel

Fixes dual-source state conflict causing toggle to show incorrect state.
Fixes live log "disconnected" status appearing while logs stream.
Simplifies CrowdSec control to single source (Security Dashboard toggle).

Includes comprehensive test updates for new architecture.
2025-12-15 23:36:07 +00:00
GitHub Actions 65cad0ba13 feat: Enhance CrowdSec integration with configurable binary path and improved process validation 2025-12-15 22:10:28 +00:00
GitHub Actions 11a03de3b7 Add tests for useConsoleEnrollment hooks and crowdsecExport utility functions
- Implement comprehensive tests for the useConsoleStatus and useEnrollConsole hooks, covering various scenarios including success, error handling, and edge cases.
- Create unit tests for crowdsecExport utility functions, ensuring filename generation, user input sanitization, and download functionality are thoroughly validated.
2025-12-15 14:45:56 +00:00
GitHub Actions 5b2724a2ba Refactor code structure for improved readability and maintainability 2025-12-15 07:48:28 +00:00
GitHub Actions 2a6175a97e feat: Implement CrowdSec toggle fix validation and documentation updates
- Added QA summary report for CrowdSec toggle fix validation, detailing test results, code quality audit, and recommendations for deployment.
- Updated existing QA report to reflect the new toggle fix validation status and testing cycle.
- Enhanced security documentation to explain the persistence of CrowdSec across container restarts and troubleshooting steps for common issues.
- Expanded troubleshooting guide to address scenarios where CrowdSec does not start after a container restart, including diagnosis and solutions.
2025-12-15 07:30:36 +00:00
GitHub Actions 2a04dbc49d fix: enhance QA and Security agent constraints with additional guidelines for testing and security focus 2025-12-15 07:30:36 +00:00
GitHub Actions 4230a5e30c fix: enhance planning constraints with guidelines for file management and repository organization 2025-12-15 07:30:36 +00:00
GitHub Actions 709cfa1d2e fix: enhance planning constraints with code coverage, linting, and comprehensive testing guidelines 2025-12-15 07:30:36 +00:00
GitHub Actions 4c3dcb1d15 fix: enhance constraints for JSON examples and add guidance on assessing code impacts and dependencies 2025-12-15 07:30:36 +00:00
GitHub Actions 51f0a6937e feat: Implement database migration command and enhance CrowdSec startup verification
- Added TestMigrateCommand_Succeeds to validate migration functionality.
- Introduced TestStartupVerification_MissingTables to ensure proper handling of missing security tables.
- Updated crowdsec_startup.go to log warnings for missing SecurityConfig table.
- Enhanced documentation for database migrations during upgrades, including steps and expected outputs.
- Created a detailed migration QA report outlining testing results and recommendations.
- Added troubleshooting guidance for CrowdSec not starting after upgrades due to missing tables.
- Established a new plan for addressing CrowdSec reconciliation failures, including root cause analysis and proposed fixes.
2025-12-15 07:30:36 +00:00
GitHub Actions aa55d38a82 fix: enhance CrowdSec startup logic and verification, improve error handling in Security page 2025-12-15 07:30:36 +00:00
GitHub Actions c395b9d68e fix: add hotfix plan for CrowdSec integration issues and proposed solutions 2025-12-15 07:30:36 +00:00
GitHub Actions a8aa59a754 fix: update Codecov ignore patterns to align with local coverage analysis 2025-12-15 07:30:36 +00:00
GitHub Actions e41c4a12da fix: resolve CrowdSec 500 error and state mismatch after container restart
- Make Stop() idempotent: return nil instead of error when PID file missing
- Add startup reconciliation: auto-start CrowdSec if DB says enabled
- Ensure log file exists for LogWatcher to prevent disconnection

Fixes:
- "Failed to stop CrowdSec: 500 error" when toggling off
- CrowdSec showing "not running" despite being enabled in settings
- Live logs showing disconnected after container restart
2025-12-15 07:30:35 +00:00
GitHub Actions 3f06fe850f fix: address post-rebuild issues with CrowdSec and Live Logs
- Issue 1: Corrected CrowdSec status reporting by adding `setting_enabled` and `needs_start` fields to the Status() response, allowing the frontend to accurately reflect the need for a restart.
- Issue 2: Resolved 500 error on stopping CrowdSec by implementing graceful handling of missing PID files in the Stop() method, with a fallback to process termination via pkill.
- Issue 3: Fixed Live Logs disconnection issue by ensuring the log file is created if it doesn't exist during LogWatcher.Start() and sending an immediate WebSocket connection confirmation to clients.

These changes enhance the robustness of the application in handling container restart scenarios.
2025-12-15 07:30:35 +00:00
GitHub Actions 1919530662 fix: add LAPI readiness check to CrowdSec status endpoint
The Status() handler was only checking if the CrowdSec process was
running, not if LAPI was actually responding. This caused the
CrowdSecConfig page to always show "LAPI is initializing" even when
LAPI was fully operational.

Changes:
- Backend: Add lapi_ready field to /admin/crowdsec/status response
- Frontend: Add CrowdSecStatus TypeScript interface
- Frontend: Update conditional logic to check lapi_ready not running
- Frontend: Separate warnings for "initializing" vs "not running"
- Tests: Add unit tests for Status handler LAPI check

Fixes regression from crowdsec_lapi_error_diagnostic.md fixes.
2025-12-15 07:30:35 +00:00
GitHub Actions 0bba5ad05f fix: enhance LAPI readiness checks and update related UI feedback 2025-12-15 07:30:35 +00:00
GitHub Actions c43976f84a fix: add LAPI availability check for console enrollment and update UI warnings 2025-12-15 07:30:35 +00:00
Jeremy 2f31a2f1e2 Merge pull request #400 from Wikid82/development
Propagate changes from development into feature/beta-release
2025-12-15 01:21:56 -05:00
Jeremy a4407f63c3 Merge branch 'feature/beta-release' into development 2025-12-15 01:21:42 -05:00
renovate[bot] c1aba6220f chore(deps): update npm minor/patch (#399)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 05:29:19 +00:00
GitHub Actions 4c8a699c4b fix: update task label and command for building and running local Docker image 2025-12-14 08:45:15 +00:00
Jeremy 114df30186 Merge pull request #398 from Wikid82/development
Development
2025-12-14 03:15:16 -05:00
Jeremy dd841f1943 Merge branch 'feature/beta-release' into development 2025-12-14 03:15:03 -05:00
GitHub Actions 7f82df80b7 fix: complete geoip2-golang v2 migration
- Update import paths to github.com/oschwald/geoip2-golang/v2
- Handle API breaking changes (net.IP → netip.Addr, IsoCode → ISOCode)
- Fix VERSION.md to match git tag (0.7.13)
- Resolves CI failure in benchmark workflow
2025-12-14 08:06:32 +00:00
Jeremy 8489394bbc Merge pull request #396 from Wikid82/renovate/github.com-oschwald-geoip2-golang-2.x
fix(deps): update module github.com/oschwald/geoip2-golang to v2
2025-12-14 02:33:39 -05:00
Jeremy dd9a559c8e Merge branch 'development' into renovate/github.com-oschwald-geoip2-golang-2.x 2025-12-14 02:33:06 -05:00
Jeremy 6469c6a2c5 Merge pull request #395 from Wikid82/renovate/node-24.x
chore(deps): update dependency node to v24
2025-12-14 02:32:51 -05:00
Jeremy 5376f28a64 Merge branch 'development' into renovate/node-24.x 2025-12-14 02:32:44 -05:00
Jeremy b298aa3e6a Merge pull request #394 from Wikid82/renovate/node-22.x
chore(deps): update dependency node to v22
2025-12-14 02:32:18 -05:00
Jeremy 2b36bd41fb Merge branch 'development' into renovate/node-22.x 2025-12-14 02:32:10 -05:00
Jeremy ee584877af Merge pull request #393 from Wikid82/renovate/major-6-github-artifact-actions
chore(deps): update actions/upload-artifact action to v6
2025-12-14 02:31:52 -05:00
Jeremy d0c6061544 Merge branch 'development' into renovate/major-6-github-artifact-actions 2025-12-14 02:31:43 -05:00
renovate[bot] df59d98289 chore(deps): update dependency node to v24 2025-12-14 07:31:33 +00:00
renovate[bot] d63a08d6a2 chore(deps): update dependency node to v22 2025-12-14 07:31:30 +00:00
Jeremy 8f06490aef Merge pull request #392 from Wikid82/renovate/major-5-github-artifact-actions
chore(deps): update actions/upload-artifact action to v5
2025-12-14 02:31:11 -05:00
Jeremy f1bd20ea9b Merge branch 'development' into renovate/major-5-github-artifact-actions 2025-12-14 02:31:02 -05:00
Jeremy 40526382a7 Merge pull request #391 from Wikid82/renovate/node-20.x
chore(deps): update dependency node to v20.19.6
2025-12-14 02:30:43 -05:00
Jeremy e35c6b5261 Merge branch 'development' into renovate/node-20.x 2025-12-14 02:27:37 -05:00
Jeremy b66383a7fb Merge pull request #397 from Wikid82/main
Propagate changes from main into development
2025-12-14 02:27:16 -05:00
GitHub Actions 7bca378275 fix: update renovate configuration for scheduling and automerge settings v0.7.13 2025-12-14 07:22:35 +00:00
Jeremy 7106efa94a Merge branch 'development' into main v0.7.12 2025-12-14 02:11:40 -05:00
GitHub Actions a26beefb08 fix: update Go version to 1.25.5 in go.work v0.7.11 2025-12-14 07:11:04 +00:00
GitHub Actions 833e2de2d6 fix: update version to 0.7.9 and add maxminddb-golang dependency v0.7.10 2025-12-14 07:09:10 +00:00
Jeremy 33fa5e7f94 Merge branch 'development' into renovate/node-20.x 2025-12-14 02:03:17 -05:00
Jeremy e65dfa3979 Merge pull request #390 from Wikid82/renovate/go-1.x
chore(deps): update dependency go to v1.25.5
2025-12-14 02:02:53 -05:00
renovate[bot] 85fd287b34 chore(deps): update actions/upload-artifact action to v6 2025-12-14 07:01:59 +00:00
renovate[bot] c19c4d4ff0 chore(deps): update actions/upload-artifact action to v5 2025-12-14 07:01:56 +00:00
Jeremy 8f6ebf6107 Merge branch 'development' into renovate/go-1.x 2025-12-14 02:01:51 -05:00