Commit Graph

106 Commits

Author SHA1 Message Date
f424ec72c1 fix(crowdsec): Fix rpcd blocking and show active bans
- Make refresh_cache async to prevent rpcd watchdog kills
- Fix JSON escaping for top_scenarios/countries arrays
- Show decisions as "Active Bans" when alerts_raw is empty
- Display ban expiry time instead of creation time
- Update cron to run cache refresh in background

Fixes LuCI crashes caused by 16s blocking refresh calls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-16 08:35:03 +01:00
b9f789fdb7 fix(crowdsec): Fix alerts/scenarios/countries stats in dashboard
- alerts_24h now uses local_decisions count instead of empty file
- top_scenarios_raw now extracts from decisions JSON (was parsing CAPI metrics)
- top_countries_raw now correctly parses IsoCode from alerts GeoIP metadata
- Double-buffer caching via cron job already in place

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-16 08:29:59 +01:00
1bbd345cee refactor(luci): Mass KissTheme UI rework across all LuCI apps
Convert 90+ LuCI view files from legacy cbi-button-* classes to
KissTheme kiss-btn-* classes for consistent dark theme styling.

Pattern conversions applied:
- cbi-button-positive → kiss-btn-green
- cbi-button-negative/remove → kiss-btn-red
- cbi-button-apply → kiss-btn-cyan
- cbi-button-action → kiss-btn-blue
- cbi-button (plain) → kiss-btn

Also replaced hardcoded colors (#080, #c00, #888, etc.) with
CSS variables (--kiss-green, --kiss-red, --kiss-muted, etc.)
for proper dark theme compatibility.

Apps updated include: ai-gateway, auth-guardian, bandwidth-manager,
cloner, config-advisor, crowdsec-dashboard, dns-provider, exposure,
glances, haproxy, hexojs, iot-guard, jellyfin, ksm-manager,
mac-guardian, magicmirror2, master-link, meshname-dns, metablogizer,
metabolizer, mqtt-bridge, netdata-dashboard, picobrew, routes-status,
secubox-admin, secubox-mirror, secubox-p2p, secubox-security-threats,
service-registry, simplex, streamlit, system-hub, tor-shield,
traffic-shaper, vhost-manager, vortex-dns, vortex-firewall,
webradio, wireguard-dashboard, zigbee2mqtt, zkp, and more.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-12 11:09:34 +01:00
fbd0abd716 perf(crowdsec-dashboard): Pre-cached get_overview for instant response
Problem: get_overview RPC was timing out (30s+) due to 12+ sequential
cscli calls with CAPI data, causing "TypeError: can't assign to property
'countries' on 5" in LuCI.

Solution:
- Pre-cached architecture with /tmp/secubox/crowdsec-overview.json
- get_overview() returns cached data instantly (0.08s)
- refresh_overview_cache() runs via cron every minute
- Reduced cscli calls from 12 to 4 (metrics, decisions, alerts, bouncers)
- Extract flat decisions array using jsonfilter
- Manual JSON building to avoid jshn argument size limits
- Add /etc/cron.d/crowdsec-dashboard for periodic refresh

Also includes:
- Streamlit Control: Deploy functionality like metablogizer
- Streamlit Control: Enhanced Security page with WAF/CrowdSec data
- mitmproxy LuCI: Add timeout race to prevent page hang

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-11 15:24:57 +01:00
9081444c7a feat(streamlit-control): Phase 3 - auto-refresh, permissions, UI improvements
Streamlit Control Dashboard Phase 3:
- Add auto-refresh toggle to all main pages (10s/30s/60s intervals)
- Add permission-aware UI with can_write() and is_admin() helpers
- Containers page: tabs (All/Running/Stopped), search filter, info panels
- Security page: better CrowdSec parsing, threat table, raw data viewer
- Streamlit apps page: restart button, delete confirmation dialog
- Network page: HAProxy filter, WireGuard/DNS placeholders

fix(crowdsec-dashboard): Handle RPC error codes in overview.js

Fix TypeError when CrowdSec RPC returns error code instead of object.
Added type check to treat non-objects as empty {} in render/pollData.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-11 14:54:30 +01:00
cec4893db9 feat(security): Implement SysWarden Evolution #1-3 security enhancements
Evolution #1 - IP Blocklist (secubox-app-ipblocklist, luci-app-ipblocklist):
- Pre-emptive blocking layer with ipset (~100k IPs)
- Default sources: Data-Shield, Firehol Level 1
- Supports nftables (fw4) and iptables backends
- LuCI KISS dashboard with sources/whitelist management

Evolution #2 - AbuseIPDB Reporter (luci-app-crowdsec-dashboard v0.8.0):
- New "AbuseIPDB" tab in CrowdSec Dashboard
- crowdsec-reporter.sh CLI for reporting blocked IPs
- RPCD handler luci.crowdsec-abuseipdb with 9 methods
- Cron job for automatic reporting every 15 minutes
- IP reputation checker in dashboard

Evolution #3 - Log Denoising (luci-app-system-hub v0.5.2):
- Three modes: RAW, SMART (noise ratio), SIGNAL_ONLY (filter known IPs)
- Integrates with IP Blocklist ipset + CrowdSec decisions
- RPCD methods: get_denoised_logs, get_denoise_stats
- Denoise mode selector panel with noise ratio indicator

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 20:11:24 +01:00
53dc035955 fix(crowdsec): Read WAF threats from mitmproxy-in instance
The CrowdSec dashboard was reading from /srv/mitmproxy/threats.log
but the WAF input instance writes to /srv/mitmproxy-in/threats.log.

Fixed paths:
- threats.log: /srv/mitmproxy -> /srv/mitmproxy-in
- autoban-processed.log: /srv/mitmproxy -> /srv/mitmproxy-in

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-20 16:29:29 +01:00
ee9afc0ccf feat(crowdsec): Add organization column to alerts table
- Add batch IP lookup via ip-api.com for org/ISP info
- Display organization column between Source and Country
- Cache org lookups to avoid repeated requests
- Include organization in search filter
- Skip private IP ranges (192.168.x, 10.x, 127.x)

fix(mitmproxy): Fix null text appearing in status table

- Use concat([]) pattern instead of ternary null returns
- Prevents "null" text from rendering in DOM

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 06:26:26 +01:00
e58f479cd4 feat(waf): Update WAF scenarios with 2024-2025 CVEs and OWASP threats
Add detection patterns for latest actively exploited vulnerabilities:
- CVE-2025-55182 (React2Shell, CVSS 10.0)
- CVE-2025-8110 (Gogs RCE), CVE-2025-53770 (SharePoint)
- CVE-2025-52691 (SmarterMail), CVE-2025-40551 (SolarWinds)
- CVE-2024-47575 (FortiManager), CVE-2024-21887 (Ivanti)
- CVE-2024-3400, CVE-2024-0012, CVE-2024-9474 (PAN-OS)

New attack categories based on OWASP Top 10 2025:
- HTTP Request Smuggling (TE.CL/CL.TE conflicts)
- AI/LLM Prompt Injection (ChatML, instruction markers)
- WAF Bypass techniques (Unicode normalization, double encoding)
- Supply Chain attacks (CI/CD poisoning, dependency confusion)
- Extended SSTI (Jinja2, Freemarker, Velocity, Thymeleaf)
- API Abuse (BOLA/IDOR, mass assignment)

CrowdSec scenarios split into 11 separate files for reliability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 05:02:57 +01:00
c731058b01 fix(crowdsec-dashboard): Fix decision count in get_overview
- Replace --no-api + jsonfilter with jq length for counting
- jsonfilter cannot properly count JSON arrays
- --no-api flag returns empty results
- Applied fix to both get_overview() and stats functions
- Active Bans now shows correct count (was showing 0)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 12:08:01 +01:00
dd6ecd2567 fix(crowdsec-dashboard): Fix decision count showing 0
- Remove --no-api flag which returned empty results
- Use jq length instead of jsonfilter for counting arrays
- Add grep fallback when jq is not available
- Count all decisions, alerts, and bouncers correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 11:28:28 +01:00
58b6dc1d2a fix(crowdsec-dashboard): Fix Threat Origins displaying [object Object]
parseCountries() now correctly handles countries as array of objects
[{country: "US", count: 67}, ...] instead of only plain {US: 67} format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 06:34:27 +01:00
0a3b1dfc6e feat(secubox-core): Add double-buffer status cache and fix LED blocking
- Remove mmc0 LED from heartbeat loop (was causing LED freeze)
- Implement background status_collector_loop() with staggered intervals
- Add 10 cache files at /tmp/secubox/*.json for instant status reads
- Add status_cached RPCD methods to 6 packages:
  - luci.crowdsec-dashboard
  - luci.mitmproxy
  - luci.secubox-netifyd
  - luci.client-guardian
  - luci.mac-guardian
  - luci.network-anomaly

Dashboards and APIs now read pre-computed JSON cache instead of
spawning subprocesses, eliminating blocking during concurrent requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 16:34:35 +01:00
c5e22fd08d refactor(nav): Unify navigation component with auto-theme initialization
SecuNav.renderTabs() now automatically initializes theme and loads CSS,
eliminating boilerplate from views. Added renderCompactTabs() for nested
modules and renderBreadcrumb() for back-navigation.

Updated module navs: cdn-cache, client-guardian, crowdsec-dashboard,
media-flow, mqtt-bridge, system-hub. Removed ~1000 lines of duplicate CSS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 03:42:32 +01:00
e1d70c5bac fix(crowdsec-dashboard): Fix decisions list empty due to wrong RPC expect key
The callDecisions RPC declaration used expect: { alerts: [] } but the
backend returns { decisions: [...] }, causing the unwrapped result to
always be empty. Also removed leftover console.log debug statements.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:00:46 +01:00
98440c456a feat(ui): Add WAF auto-ban statistics to dashboards
CrowdSec Dashboard:
- Added WAF Threats and WAF Auto-Bans stats cards
- Added WAF Auto-Ban status to health checks
- Shows sensitivity level (aggressive/moderate/permissive)

mitmproxy Status:
- Added WAF Auto-Ban section with statistics
- Shows threats today, bans today, total bans
- Displays sensitivity level with color coding
- Shows pending bans count when applicable

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:15:40 +01:00
56d45fe7c2 feat(waf): Add sensitivity-based auto-ban system with CrowdSec integration
WAF Auto-ban Features:
- Three sensitivity levels: aggressive, moderate, permissive
- Aggressive: Immediate ban on first critical threat
- Moderate: Ban after 3 attempts in 5 minutes (default)
- Permissive: Ban after 5 attempts in 1 hour
- Attempt tracking with configurable thresholds

Critical threats (immediate in aggressive/moderate):
- CVE exploits, SQL injection, Command injection
- XXE, Log4Shell, SSTI attacks

CrowdSec Integration:
- Auto-ban requests written to /srv/mitmproxy/autoban-requests.log
- Cron job processes bans every minute via mitmproxyctl
- Bans sent to CrowdSec for network-wide enforcement

New Commands:
- mitmproxyctl process-autoban: Process pending bans
- mitmproxyctl reload-autoban: Reload config after UCI changes

CrowdSec Dashboard:
- Added ban button to alerts page
- Modal confirmation with 24h ban duration
- Real-time banned IP tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 13:40:52 +01:00
21f59b6c9a fix(crowdsec): Restore working setup page from settings.js
Restored the original settings.js functionality as setup.js with
updated nav references. The simplified version was broken.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 11:01:16 +01:00
6298e8b961 refactor(crowdsec): Simplify LuCI interface - KISS setup
- Remove unused views: metrics.js, waf.js, wizard.js
- Remove unused CSS: wizard.css, soc.css
- Remove settings.js, replace with simplified setup.js
- Update menu: remove WAF, Metrics entries
- Update nav.js: remove references to deleted pages
- Add status grid CSS for setup page

The new Setup page provides:
- System status overview (Agent, LAPI, CAPI, Bouncer)
- Console enrollment form
- Service controls (start/stop/restart/repair)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:56:13 +01:00
840d226881 fix(crowdsec): Add capi_enrolled to status response
The settings page was showing "CAPI: Error" because the status
method didn't return the capi_enrolled field. Added CAPI status
check to get_status() so the health display shows correct status.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:50:35 +01:00
948b8776d8 fix(crowdsec-dashboard): Fix nav paths in all view files
Change nav paths from services/crowdsec to security/crowdsec in alerts,
bouncers, decisions, and settings views to match the new menu location.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:21:16 +01:00
6b364ab52a fix(crowdsec-dashboard): Fix alerts and countries display in overview
- Change RPCD to return alerts_raw and decisions_raw as JSON strings
- Add parseAlerts() to parse alerts_raw in JavaScript
- Fix countries and alerts now display correctly in overview

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:05:24 +01:00
5496ca1f3a fix(crowdsec-dashboard): Fix overview nav path and countries parsing
- Fix nav links to use correct path (security instead of services)
- Add parseCountries() to convert top_countries_raw JSON to object
- Fix geo data display in overview

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 09:01:30 +01:00
37d7b066ed fix(crowdsec-dashboard): Count blocked IPs across all nftables sets
The bouncer creates multiple sets: crowdsec-blacklists (empty base),
crowdsec-blacklists-CAPI (community blocklists ~19k IPs), and
crowdsec-blacklists-crowdsec (local decisions). Now counts IPs from
all sets in the table instead of just the base set.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:42:12 +01:00
fce6307c7e fix(crowdsec-dashboard): Move to Security menu and fix stats display
- Move CrowdSec from Services to Security & Access menu
- Fix get_decisions() to return {"decisions":[]} not {"alerts":[]}
- Fix active_bans to use local_decisions count instead of parsing
  unreliable metrics output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 05:36:01 +01:00
31f4db881e refactor(crowdsec-dashboard): KISS rewrite and move to Services menu
- Rewrite all views with KISS CSS (1200+ lines removed)
- Use unified cs-* CSS prefix with SecuBox theme variables
- Move CrowdSec from Security to Services menu
- Update navigation paths in all views and nav.js
- Add CSS loading in each view's load() function
- Fix Services menu as proper firstchild submenu
- Simplify dashboard.css from 950+ to 112 lines

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 06:51:13 +01:00
931c4b1dfc fix(crowdsec-dashboard): Add ACL permissions for settings methods
Add get_settings to read permissions and save_settings to write permissions
to fix RPC access denied error (-32002) on the settings page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:44:59 +01:00
8f6eeede06 feat(crowdsec): Add console enrollment & integrate SecuBox theme
- Add Console Enrollment section to settings with persistent key storage
- Integrate CrowdSec CSS with SecuBox global theme variables (--cyber-*)
- Fix modules.js install button and add installModule function
- Map cs-*, soc-*, sh-* CSS variables to SecuBox theme for consistency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:34:31 +01:00
54d16a5655 fix(crowdsec-dashboard): Show CAPI as connected when credentials exist
CAPI status now shows "Connected" when either enrolled or LAPI is available,
fixing misleading "Disconnected" display when CAPI is actually working.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:13:26 +01:00
dc73b45722 refactor(crowdsec-dashboard): Remove theming system
- Remove theme.js and themes/ directory (classic, cards, cyberpunk)
- Remove theme selector from settings page
- Use fixed 'cs-theme-classic' class in overview and settings views
- Simplify load() functions by removing theme.init() calls

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:04:16 +01:00
19b96e50d0 fix(crowdsec-dashboard): Dynamic port and path detection for LAPI/GeoIP
- Replace hardcoded port 8180 with dynamic detection from credentials file
- Extract LAPI port from local_api_credentials.yaml URL
- Convert port to hex for /proc/net/tcp lookup
- Fix GeoIP database path detection (check /srv/crowdsec/data and /var/lib)
- Update default API URL fallback to 8090 (actual CrowdSec default)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 04:55:19 +01:00
2b913d5005 feat(p2p): Add SecuBox P2P Hub packages and Services Registry
- Add secubox-p2p backend package:
  - UCI configuration for P2P settings, DNS federation, WireGuard mesh, HAProxy
  - RPCD handler for peer management, service discovery, mesh configuration
  - Init script and main P2P manager daemon

- Add luci-app-secubox-p2p frontend package:
  - Main hub view with master control, network matrix visualization
  - Peers management with discovery and manual add
  - Services view showing local and shared services
  - Mesh network configuration (DNS, WireGuard, HAProxy)
  - Settings for P2P and registry configuration

- Add Services Registry view to luci-app-secubox
- Add listProfiles/applyProfile to secubox-admin API
- Fix P2P ACL permissions
- Remove old hub.js from luci-app-secubox (moved to dedicated package)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
f70e7e959f fix(crowdsec-dashboard): Add UCI ubus permissions to ACL
Add ubus uci method permissions:
- Read: get, state, configs
- Write: set, add, delete, rename, order, commit, apply, confirm, rollback

Fixes "Permission denied" error when saving theme settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
8317ac354f feat(secubox): Add P2P Hub backend and fix theme module
- Add P2P Hub RPCD methods for collaborative catalog sharing:
  - p2p_get_peers, p2p_discover, p2p_add_peer, p2p_remove_peer
  - p2p_get_peer_catalog, p2p_share_catalog
  - p2p_get_settings, p2p_set_settings
- Fix crowdsec-dashboard theme.js to use baseclass.extend()
  instead of baseclass.singleton() for LuCI compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
9b12991c3b fix(crowdsec-dashboard): Use baseclass.singleton for theme manager
Fix "not a constructor" error by using baseclass.singleton()
pattern instead of baseclass.extend() with manual instantiation.
Theme module now exports a singleton directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
693c18be2f feat(secubox): Add P2P Hub API and wizard-first menu
- Make Setup Wizard the first menu item in SecuBox (order 5)
- Add P2P Hub collaborative catalog API methods:
  - Peer discovery and management
  - Catalog sharing between SecuBox instances
  - Settings for P2P sharing preferences
- Fix crowdsec-dashboard theme.js to return class instead of instance
- Update views to properly instantiate theme class

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
31be5e0797 feat(crowdsec-dashboard): Add extensible theming system
Add theme manager with selectable themes and profiles:
- classic: Professional SOC-style dark theme (default)
- cards: Modern card-based UI with gradients
- cyberpunk: Neon glow effects with terminal aesthetics

Profiles extend themes with custom options:
- default, soc, modern, hacker

Theme selection available in Settings > Appearance with live preview.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
78d43855be fix(crowdsec-dashboard): Move menu to SecuBox security section
Move CrowdSec dashboard from admin/services/crowdsec to
admin/secubox/security/crowdsec to integrate with SecuBox menu structure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
6f7ee8e8c2 refactor(menu): Move CrowdSec and Threat Monitor to Services menu
- CrowdSec: admin/secubox/security/crowdsec -> admin/services/crowdsec
- Threat Monitor: admin/secubox/security/threats -> admin/services/threat-monitor

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +01:00
68f961f666 fix(crowdsec): Dynamic LAPI port detection + feed docs
- Fix LAPI status check to dynamically read port from config
- Previously hardcoded wrong port (8080 vs 8180)
- Add comprehensive SecuBox feed documentation to README
- Document opkg configuration, HAProxy publishing, troubleshooting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +01:00
02bb26ad4d feat(crowdsec): Fix threat stats and add bouncer effectiveness dashboard
- Fix top_scenarios parsing from cscli metrics (CAPI blocklist breakdown)
- Add bouncer stats: dropped packets/bytes, processed packets/bytes, active bans
- Update overview.js with threat types visualization (bar charts + percentages)
- Show real stats: Active Bans, Blocked Packets, Blocked Traffic
- Add CSS for threat type icons, progress bars, and severity colors
- Parse CAPI decisions table: ssh:bruteforce, ssh:exploit, generic:scan, tcp:scan

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 16:14:20 +01:00
bca0ba5ada fix(multi): CrowdSec health check, MetaBlogizer menu, Portal apps
- CrowdSec Dashboard: Add bouncer_count, geoip_enabled, acquisition_count,
  scenario_count fields to get_overview and get_health_check RPCD functions
- MetaBlogizer: Fix menu path to admin/secubox/services/metablogizer
- Portal: Add MetaBlogizer and Gitea to apps registry for services section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:34:50 +01:00
40195b5983 fix(crowdsec-dashboard): Show CAPI blocklist decisions in stats
The dashboard was showing 0 decisions because `cscli decisions list`
only returns local decisions, not CAPI blocklist entries.

Fixed by:
- Parsing CAPI decision counts from `cscli metrics` output
- Added separate local_decisions and capi_decisions fields
- Updated overview to show "CAPI Blocklist" and "Local Bans" separately
- Fixed get_capi_metrics to use metrics parsing instead of decisions list

This correctly shows ~15,000 CAPI blocklist IPs instead of 0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:21:28 +01:00
1fb2b11d4a feat(crowdsec+haproxy): Dashboard refactor, custom parsers & scenarios
CrowdSec Dashboard:
- Refactor all views (alerts, bouncers, decisions, overview, settings)
- Add soc.css for Security Operations Center styling
- Remove 3000+ lines of redundant code

CrowdSec Custom Parsers & Scenarios:
- Add secubox-gitea parser and bruteforce scenario
- Add secubox-haproxy parser and bruteforce scenario
- Add secubox-streamlit parser and bruteforce scenario
- Add secubox-webapp parser and bruteforce scenario
- Update Makefile for new parser/scenario files

HAProxy:
- Update api.js, backends.js view improvements
- Update luci.haproxy RPCD backend
- Update haproxyctl helper script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:16:17 +01:00
04908fc414 feat(multi): CrowdSec LAPI port fix, Streamlit/HexoJS multi-instance
CrowdSec:
- Change LAPI default port from 8080 to 8180 (avoid Docker conflict)
- Update bouncer config, init script, and RPCD dashboard
- Fix port detection hex value (1FF4 for 8180)

Streamlit:
- Complete rewrite with folder-based app structure
- Multi-instance support (multiple apps on different ports)
- Gitea integration (clone, pull, setup commands)
- Auto-install requirements.txt with hash-based caching

HexoJS:
- Multi-instance support with folder structure
- Multiple blog instances on different ports

HAProxy:
- Auto-generate fallback backends (luci, apps, default_luci)
- Add --server letsencrypt to ACME commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 06:37:19 +01:00
a960c20124 fix(crowdsec): Fix firewall health sync detection for CAPI blocklists
- Consider sync OK when CAPI blocklists are active (capi_elements > 0)
  even if local decisions = 0
- Add capi_elements_count to health response
- Fixes false "Out of sync" warning when using community blocklists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:52:31 +01:00
4e5d5275f9 refactor: Merge secubox-app-crowdsec-bouncer into cs-firewall-bouncer
- Move UCI defaults script for auto-registration to cs-firewall-bouncer
- Remove redundant secubox-app-crowdsec-bouncer wrapper package
- Update luci-app-crowdsec-dashboard reference to new package name
- Increment PKG_RELEASE to 3

The defaults script handles:
- Automatic bouncer registration with CrowdSec LAPI
- Interface detection for LAN/WAN
- API key generation and UCI config update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 06:46:09 +01:00
e62919eec7 refactor(packages): Rename and reorganize SecuBox packages
- Rename crowdsec-firewall-bouncer to secubox-app-cs-firewall-bouncer
- Rename secubox-auth-logger to secubox-app-auth-logger
- Delete secubox-crowdsec-setup (merged into other packages)
- Fix circular dependencies in luci-app-secubox-crowdsec
- Fix dependency chain in secubox-app-crowdsec-bouncer
- Add consolidated get_overview API to crowdsec-dashboard
- Improve crowdsec-dashboard overview performance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:42:52 +01:00
fd7caeb8c3 fix(crowdsec-dashboard): Fix typo in ACL (seccubox_logs -> secubox_logs)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:20:12 +01:00
239a68f9de fix(crowdsec-dashboard): Add get_overview to ACL permissions
The new get_overview RPC method was missing from the ACL file,
causing "Access denied" errors in the frontend.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:19:58 +01:00