Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

feat(security)!: extract the install-gated security suite to extensions (plan 47 Ph3b-5 / plan 55 Ph3)

Juan Denis9f92850cbdc5
diff --git a/backend/app/__init__.py b/backend/app/__init__.py
index 92896c08..7f78604a 100644
--- a/backend/app/__init__.py
+++ b/backend/app/__init__.py
@@ -330,6 +330,17 @@ def create_app(config_name=None):
import logging
logging.getLogger(__name__).warning(f'Extension auto-install: {e}')
+ # Upgrade parity for the extracted security suite (plan 47 Ph3b-4):
+ # a panel that was actually using fail2ban/clamav/lynis/auto-updates/
+ # image scanning gets the matching registry extension once its entry
+ # is published. Fail-soft, retries per boot until then. Best-effort.
+ try:
+ from app.services.extension_migration import run_registry_auto_install
+ run_registry_auto_install()
+ except Exception as e:
+ import logging
+ logging.getLogger(__name__).warning(f'Security-suite auto-install: {e}')
+
# One-shot: re-acquire the now-extracted backend for converted builtins
# that first shipped frontend-only (plan 47 Phase 2), so an upgraded panel
# that installed them frontend-only doesn't lose the API. Best-effort.
@@ -420,8 +431,9 @@ def create_app(config_name=None):
FleetDoctorService.register_jobs()
from app.services.file_integrity_service import FileIntegrityService
FileIntegrityService.register_jobs()
- from app.services.malware_scan_service import MalwareScanService
- MalwareScanService.register_jobs()
+ # security.malware_scan / security.lynis_scan / security.image_scan
+ # handlers register via their extensions' manifest `jobs` key
+ # (serverkit-clamav / serverkit-lynis / serverkit-image-scan).
from app.services.bandwidth_service import BandwidthService
BandwidthService.register_jobs()
start_job_system(app, seed=seed_builtin_schedules)
diff --git a/backend/app/api/auth.py b/backend/app/api/auth.py
index f8448e0a..b3120599 100644
--- a/backend/app/api/auth.py
+++ b/backend/app/api/auth.py
@@ -196,10 +196,20 @@ def complete_onboarding():
s for s in installed_extensions if isinstance(s, str) and s.strip()
]
+ # Security posture (plan 47 Ph5) — persisted separately from use_cases so
+ # posture and purpose stay orthogonal. Absent/invalid falls back to the
+ # lean default rather than failing the whole onboarding.
+ security_posture = data.get('security_posture', 'minimal')
+ from app.services.plugin_service import SECURITY_POSTURE_LEVELS
+ if security_posture not in SECURITY_POSTURE_LEVELS:
+ security_posture = 'minimal'
+
# Save onboarding use cases + what the wizard installed
SettingsService.set('onboarding_use_cases', use_cases, user_id=user.id)
SettingsService.set('onboarding_installed_extensions', installed_extensions,
user_id=user.id)
+ SettingsService.set('onboarding_security_posture', security_posture,
+ user_id=user.id)
# Keep the panel lean: suppress wizard-optional flagships (WordPress) the
# user didn't install so the boot seeder won't re-add them (plan 47).
diff --git a/backend/app/api/plugins.py b/backend/app/api/plugins.py
index 695afe5f..222cff78 100644
--- a/backend/app/api/plugins.py
+++ b/backend/app/api/plugins.py
@@ -328,10 +328,23 @@ def recommendations():
Query: ``?use_cases=wordpress,web-apps``. Returns each recommended
extension's real display_name/description + install source, so the wizard
can render checkboxes that install the actual extension on Finish."""
- from app.services.plugin_service import recommend_extensions_for_use_cases
+ from app.services.plugin_service import (
+ SECURITY_POSTURE_LEVELS,
+ recommend_extensions_for_use_cases,
+ recommend_security_extensions,
+ )
raw = request.args.get('use_cases', '')
use_cases = [u.strip() for u in raw.split(',') if u.strip()]
- return jsonify({'recommendations': recommend_extensions_for_use_cases(use_cases)})
+ return jsonify({
+ 'recommendations': recommend_extensions_for_use_cases(use_cases),
+ # Wizard round 2 (plan 47 Ph5): the security-posture chooser. Each
+ # level lists only extensions the catalog can actually install today —
+ # unpublished slugs drop out rather than rendering dead checkboxes.
+ 'security_postures': {
+ level: recommend_security_extensions(level)
+ for level in SECURITY_POSTURE_LEVELS
+ },
+ })
@plugins_bp.route('/builtin/<slug>/install', methods=['POST'])
diff --git a/backend/app/api/security.py b/backend/app/api/security.py
index 32782cca..65080a9c 100644
--- a/backend/app/api/security.py
+++ b/backend/app/api/security.py
@@ -1,23 +1,22 @@
# Bucket: PER-APP (plan 29 #9). Per-app scan/security routes gate on the shared
-# app-access seam; host-level firewall/fail2ban/malware surfaces stay admin-only.
+# app-access seam; host-level surfaces stay admin-only.
+#
+# Lean core (plan 47 Ph3b-4 / plan 55 Phase 3): this blueprint keeps only the
+# baseline that works with zero host packages — status/config, legacy
+# integrity, suspicious activity, events, SSH keys, IP lists, the audit and
+# scoped FIM. The install-gated tool surfaces (/clamav/*, /scan/*,
+# /quarantine/*, /yara/*, /fail2ban/*, /lynis/*, /auto-updates/*,
+# /image-scans/*, /sboms/*) are mounted at this same /api/v1/security prefix
+# by their extensions (serverkit-clamav, serverkit-fail2ban, serverkit-lynis,
+# serverkit-auto-updates, serverkit-image-scan) and 404 when absent.
from flask import Blueprint, request, jsonify
from flask_jwt_extended import jwt_required
from app.middleware.rbac import admin_required
from app.services.security_service import SecurityService
-from app.services.image_scanner_service import ImageScannerService
-from app.services.malware_scan_service import MalwareScanService
-from app.services.yara_scan_service import YaraScanService
from app.error_reporting import unexpected_response
security_bp = Blueprint('security', __name__)
-# Register the security.malware_scan job handler at boot (this module is
-# imported by create_app); registration is idempotent and also re-asserted on
-# every enqueue.
-MalwareScanService.register_jobs()
-ImageScannerService.register_jobs()
-SecurityService.register_jobs()
-
# ==========================================
# STATUS & CONFIG
@@ -57,183 +56,6 @@ def update_config():
return jsonify(result), 200 if result['success'] else 400
-# ==========================================
-# CLAMAV
-# ==========================================
-@security_bp.route('/clamav/status', methods=['GET'])
-@jwt_required()
-def get_clamav_status():
- """Get ClamAV installation and service status."""
- status = SecurityService.get_clamav_status()
- return jsonify(status), 200
-
-
-@security_bp.route('/clamav/install', methods=['POST'])
-@admin_required
-def install_clamav():
- """Install ClamAV packages."""
- result = SecurityService.install_clamav()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/clamav/update', methods=['POST'])
-@admin_required
-def update_definitions():
- """Update ClamAV virus definitions."""
- result = SecurityService.update_definitions()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/clamav/start', methods=['POST'])
-@admin_required
-def start_clamav():
- """Start the ClamAV daemon (one-click posture fix)."""
- result = SecurityService.start_clamav()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/scan/file', methods=['POST'])
-@admin_required
-def scan_file():
- """Scan a single file for malware."""
- data = request.get_json()
- if not data or 'path' not in data:
- return jsonify({'error': 'File path required'}), 400
-
- result = SecurityService.scan_file(data['path'])
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/scan/directory', methods=['POST'])
-@admin_required
-def scan_directory():
- """Start a directory scan (runs in background)."""
- data = request.get_json()
- if not data or 'path' not in data:
- return jsonify({'error': 'Directory path required'}), 400
-
- recursive = data.get('recursive', True)
- result = SecurityService.scan_directory(data['path'], recursive)
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/scan/app/<int:app_id>', methods=['POST'])
-@admin_required
-def scan_app(app_id):
- """Enqueue a job-backed malware scan (YARA + ClamAV) of an app's docroot."""
- job = MalwareScanService.enqueue_scan(app_id=app_id)
- return jsonify({'job_id': job.id, 'kind': job.kind,
- 'path': (job.get_payload() or {}).get('path')}), 202
-
-
-@security_bp.route('/scan/job', methods=['POST'])
-@admin_required
-def scan_path_job():
- """Enqueue a job-backed malware scan of an arbitrary path."""
- data = request.get_json()
- if not data or not data.get('path'):
- return jsonify({'error': 'Path required'}), 400
- job = MalwareScanService.enqueue_scan(path=data['path'])
- return jsonify({'job_id': job.id, 'kind': job.kind, 'path': data['path']}), 202
-
-
-@security_bp.route('/scan/status', methods=['GET'])
-@jwt_required()
-def get_scan_status():
- """Get current scan status."""
- status = SecurityService.get_scan_status()
- return jsonify(status), 200
-
-
-@security_bp.route('/scan/cancel', methods=['POST'])
-@admin_required
-def cancel_scan():
- """Cancel running scan."""
- result = SecurityService.cancel_scan()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/scan/history', methods=['GET'])
-@jwt_required()
-def get_scan_history():
- """Get scan history."""
- limit = request.args.get('limit', 50, type=int)
- result = SecurityService.get_scan_history(limit)
- return jsonify(result), 200 if result['success'] else 400
-
-
-# ==========================================
-# QUARANTINE
-# ==========================================
-@security_bp.route('/quarantine', methods=['GET'])
-@admin_required
-def get_quarantined_files():
- """List quarantined files."""
- result = SecurityService.get_quarantined_files()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/quarantine', methods=['POST'])
-@admin_required
-def quarantine_file():
- """Move a file to quarantine."""
- data = request.get_json()
- if not data or 'path' not in data:
- return jsonify({'error': 'File path required'}), 400
-
- result = SecurityService.quarantine_file(data['path'])
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/quarantine/<filename>', methods=['DELETE'])
-@admin_required
-def delete_quarantined_file(filename):
- """Permanently delete a quarantined file."""
- result = SecurityService.delete_quarantined_file(filename)
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/quarantine/<filename>/restore', methods=['POST'])
-@admin_required
-def restore_quarantined_file(filename):
- """Restore a quarantined file to its recorded original location."""
- result = SecurityService.restore_quarantined_file(filename)
- return jsonify(result), 200 if result['success'] else 400
-
-
-# ==========================================
-# YARA RULES (web-shell pass)
-# ==========================================
-@security_bp.route('/yara/rules', methods=['GET'])
-@admin_required
-def list_yara_rules():
- """List builtin (curated) and custom YARA rule files."""
- return jsonify(YaraScanService.list_rules()), 200
-
-
-@security_bp.route('/yara/rules', methods=['POST'])
-@admin_required
-def upload_yara_rule():
- """Upload a custom .yar rule file (size-capped; requires real yara to run)."""
- data = request.get_json()
- if not data or not data.get('filename'):
- return jsonify({'error': 'filename required'}), 400
- result = YaraScanService.save_custom_rule(data['filename'], data.get('content', ''))
- if not result['success']:
- return jsonify({'error': result['error']}), 400
- return jsonify(result), 200
-
-
-@security_bp.route('/yara/rules/<filename>', methods=['DELETE'])
-@admin_required
-def delete_yara_rule(filename):
- """Delete a custom .yar rule file."""
- result = YaraScanService.delete_custom_rule(filename)
- if not result['success']:
- return jsonify({'error': result['error']}), 400
- return jsonify(result), 200
-
-
# ==========================================
# FILE INTEGRITY
# ==========================================
@@ -279,98 +101,6 @@ def get_security_events():
return jsonify(result), 200 if result['success'] else 400
-# ==========================================
-# QUICK SCAN PRESETS
-# ==========================================
-@security_bp.route('/scan/quick', methods=['POST'])
-@admin_required
-def quick_scan():
- """Run a quick scan on common web directories."""
- config = SecurityService.get_config()
- scan_paths = config.get('clamav', {}).get('scan_paths', ['/var/www', '/home'])
-
- # Scan each path
- results = []
- for path in scan_paths:
- result = SecurityService.scan_directory(path, recursive=True)
- results.append({'path': path, 'result': result})
-
- return jsonify({
- 'success': True,
- 'message': f'Started scans for {len(scan_paths)} directories',
- 'scans': results
- }), 200
-
-
-@security_bp.route('/scan/full', methods=['POST'])
-@admin_required
-def full_scan():
- """Run a full system scan."""
- result = SecurityService.scan_directory('/', recursive=True)
- return jsonify(result), 200 if result['success'] else 400
-
-
-# ==========================================
-# FAIL2BAN
-# ==========================================
-@security_bp.route('/fail2ban/status', methods=['GET'])
-@admin_required
-def get_fail2ban_status():
- """Get Fail2ban status."""
- status = SecurityService.get_fail2ban_status()
- return jsonify(status), 200
-
-
-@security_bp.route('/fail2ban/install', methods=['POST'])
-@admin_required
-def install_fail2ban():
- """Install Fail2ban."""
- result = SecurityService.install_fail2ban()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/fail2ban/jails/<jail>', methods=['GET'])
-@admin_required
-def get_jail_status(jail):
- """Get status of a specific jail."""
- result = SecurityService.get_fail2ban_jail_status(jail)
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/fail2ban/bans', methods=['GET'])
-@admin_required
-def get_all_bans():
- """Get all banned IPs across all jails."""
- result = SecurityService.get_all_fail2ban_bans()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/fail2ban/unban', methods=['POST'])
-@admin_required
-def unban_ip():
- """Unban an IP address."""
- data = request.get_json()
- if not data or 'ip' not in data:
- return jsonify({'error': 'IP address required'}), 400
-
- jail = data.get('jail')
- result = SecurityService.unban_ip(data['ip'], jail)
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/fail2ban/ban', methods=['POST'])
-@admin_required
-def ban_ip():
- """Manually ban an IP address."""
- data = request.get_json()
- if not data or 'ip' not in data:
- return jsonify({'error': 'IP address required'}), 400
-
- jail = data.get('jail', 'sshd')
- result = SecurityService.ban_ip(data['ip'], jail)
- return jsonify(result), 200 if result['success'] else 400
-
-
# ==========================================
# SSH KEYS
# ==========================================
@@ -448,164 +178,6 @@ def generate_audit():
return jsonify(result), 200 if result['success'] else 400
-# ==========================================
-# VULNERABILITY SCANNING (Lynis)
-# ==========================================
-@security_bp.route('/lynis/status', methods=['GET'])
-@admin_required
-def get_lynis_status():
- """Get Lynis installation status."""
- status = SecurityService.get_lynis_status()
- return jsonify(status), 200
-
-
-@security_bp.route('/lynis/install', methods=['POST'])
-@admin_required
-def install_lynis():
- """Install Lynis."""
- result = SecurityService.install_lynis()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/lynis/scan', methods=['POST'])
-@admin_required
-def run_lynis_scan():
- """Start a Lynis security scan."""
- result = SecurityService.run_lynis_scan()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/lynis/scan/status', methods=['GET'])
-@admin_required
-def get_lynis_scan_status():
- """Get Lynis scan status."""
- status = SecurityService.get_lynis_scan_status()
- return jsonify(status), 200
-
-
-# ==========================================
-# AUTOMATIC UPDATES
-# ==========================================
-@security_bp.route('/auto-updates/status', methods=['GET'])
-@admin_required
-def get_auto_updates_status():
- """Get automatic updates status."""
- status = SecurityService.get_auto_updates_status()
- return jsonify(status), 200
-
-
-@security_bp.route('/auto-updates/install', methods=['POST'])
-@admin_required
-def install_auto_updates():
- """Install automatic updates package."""
- result = SecurityService.install_auto_updates()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/auto-updates/enable', methods=['POST'])
-@admin_required
-def enable_auto_updates():
- """Enable automatic security updates."""
- result = SecurityService.enable_auto_updates()
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/auto-updates/disable', methods=['POST'])
-@admin_required
-def disable_auto_updates():
- """Disable automatic security updates."""
- result = SecurityService.disable_auto_updates()
- return jsonify(result), 200 if result['success'] else 400
-
-
-# ==========================================
-# IMAGE VULNERABILITY SCANNING
-# ==========================================
-@security_bp.route('/image-scans/install', methods=['POST'])
-@admin_required
-def install_image_scanner():
- """Install grype and syft scanner binaries."""
- grype = ImageScannerService.install_grype()
- syft = ImageScannerService.install_syft()
- return jsonify({'grype': grype, 'syft': syft}), 200
-
-
-@security_bp.route('/image-scans/applications/<int:application_id>', methods=['POST'])
-@admin_required
-def scan_application_image(application_id):
- """Trigger a CVE scan for an application image."""
- result = ImageScannerService.scan_application(application_id)
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/image-scans/applications/<int:application_id>', methods=['GET'])
-@admin_required
-def get_application_image_scans(application_id):
- """Get scan history for an application."""
- limit = request.args.get('limit', 20, type=int)
- scans = ImageScannerService.scan_history(application_id, limit=limit)
- latest = ImageScannerService.latest_scan(application_id)
- return jsonify({
- 'scans': scans,
- 'latest': latest.to_dict() if latest else None
- }), 200
-
-
-@security_bp.route('/image-scans/<int:scan_id>', methods=['GET'])
-@admin_required
-def get_image_scan(scan_id):
- """Get a single scan with findings."""
- from app.models import ImageVulnerabilityScan
- scan = ImageVulnerabilityScan.query.get(scan_id)
- if not scan:
- return jsonify({'error': 'Scan not found'}), 404
- return jsonify(scan.to_dict(include_findings=True)), 200
-
-
-@security_bp.route('/image-scans/applications/<int:application_id>/deploy-gate', methods=['GET'])
-@admin_required
-def get_image_deploy_gate(application_id):
- """Check whether the latest scan passes the deploy gate."""
- from app.services.image_scanner_service import ImageScannerService
- allowed = request.args.getlist('allowed') or None
- result = ImageScannerService.check_deploy_gate(application_id, allowed_severities=allowed)
- return jsonify(result), 200
-
-
-# ==========================================
-# SBOM GENERATION
-# ==========================================
-@security_bp.route('/sboms/applications/<int:application_id>', methods=['POST'])
-@admin_required
-def generate_application_sbom(application_id):
- """Generate an SPDX SBOM for an application image."""
- from app.services.image_scanner_service import ImageScannerService
- result = ImageScannerService.generate_sbom(application_id)
- return jsonify(result), 200 if result['success'] else 400
-
-
-@security_bp.route('/sboms/applications/<int:application_id>', methods=['GET'])
-@admin_required
-def get_application_sboms(application_id):
- """List generated SBOMs for an application."""
- from app.models import SbomArtifact
- sboms = SbomArtifact.query.filter_by(application_id=application_id).order_by(
- SbomArtifact.created_at.desc()).limit(50).all()
- return jsonify({'sboms': [s.to_dict() for s in sboms]}), 200
-
-
-@security_bp.route('/sboms/<int:sbom_id>', methods=['GET'])
-@admin_required
-def get_sbom(sbom_id):
- """Download an SPDX SBOM JSON."""
- from app.models import SbomArtifact
- sbom = SbomArtifact.query.get(sbom_id)
- if not sbom:
- return jsonify({'error': 'SBOM not found'}), 404
- return jsonify(sbom.to_dict(include_sbom=True)), 200
-
-
-# ==========================================
# FILE INTEGRITY MONITORING (SCOPED FIM)
# ==========================================
# Baseline-and-diff over ServerKit-managed paths (nginx / systemd /
diff --git a/backend/app/jobs/thread_ownership.py b/backend/app/jobs/thread_ownership.py
index 17a70880..8a6abfa8 100644
--- a/backend/app/jobs/thread_ownership.py
+++ b/backend/app/jobs/thread_ownership.py
@@ -134,11 +134,6 @@ THREAD_OWNERSHIP = {
'lifecycle': LIFECYCLE_PROCESS_LOOP,
'rationale': 'Expires process-local nonce state.',
},
- 'app/services/security_service.py:scan_directory:cls._run_directory_scan': {
- 'owner': 'legacy ClamAV directory scan',
- 'lifecycle': LIFECYCLE_DURABLE_CANDIDATE,
- 'rationale': 'Compatibility endpoint remains; new callers should use security.malware_scan jobs.',
- },
'app/services/test_sandbox_service.py:start_run:cls._execute': {
'owner': 'test sandbox run',
'lifecycle': LIFECYCLE_DURABLE_CANDIDATE,
@@ -167,8 +162,8 @@ THREAD_OWNERSHIP = {
}
-MIGRATED_TO_JOBS = {
- 'ImageScannerService.scan_application': 'security.image_scan',
- 'SecurityService.run_lynis_scan': 'security.lynis_scan',
-}
+# The security scanner threads (ClamAV directory scan, Lynis, image CVE scan)
+# moved to their extensions (serverkit-clamav / serverkit-lynis /
+# serverkit-image-scan) with their job handlers — no core-owned entries left.
+MIGRATED_TO_JOBS = {}
diff --git a/backend/app/services/extension_migration.py b/backend/app/services/extension_migration.py
index e4204b90..bac27108 100644
--- a/backend/app/services/extension_migration.py
+++ b/backend/app/services/extension_migration.py
@@ -96,6 +96,42 @@ GATED_BUILTIN_SLUGS = {
'serverkit-email': _email_was_configured,
}
+
+def _has_command(cmd):
+ def probe():
+ try:
+ from app.utils.system import is_command_available
+ return is_command_available(cmd)
+ except Exception:
+ return False
+ return probe
+
+
+def _scanners_dir_populated():
+ """True if grype/syft were ever installed by the panel's image scanner."""
+ try:
+ from app import paths
+ scanners = os.path.join(paths.SERVERKIT_DATA_DIR, 'scanners')
+ return os.path.isdir(scanners) and bool(os.listdir(scanners))
+ except Exception:
+ return False
+
+
+# Security-suite extractions (plan 47 Ph3b-4 / plan 55 Phase 3). These left
+# core for REGISTRY extensions — there is no builtin folder to copy, so
+# upgrade parity means: when the host tool the old core surface managed is
+# actually present, install the extension from the registry once. Fail-soft:
+# an unreachable registry (or an entry not yet published) leaves the slug
+# unmarked so the next boot retries; panels without the host tool just see
+# the extension in the Marketplace.
+REGISTRY_GATED_SLUGS = {
+ 'serverkit-fail2ban': _has_command('fail2ban-client'),
+ 'serverkit-clamav': _has_command('clamscan'),
+ 'serverkit-lynis': _has_command('lynis'),
+ 'serverkit-auto-updates': _has_command('unattended-upgrade'),
+ 'serverkit-image-scan': _scanners_dir_populated,
+}
+
_MARKER_KEY = 'extensions.auto_installed_slugs'
# Slugs whose now-extracted backend has been re-acquired on an upgraded panel
# (plan 47 Phase 2). Separate from _MARKER_KEY so the one-shot backend pickup
@@ -188,6 +224,81 @@ def run_auto_install():
_save_processed(processed)
+_REGISTRY_MARKER_KEY = 'extensions.registry_auto_installed_slugs'
+
+
+def _registry_processed_slugs():
+ from app.services.settings_service import SettingsService
+ raw = SettingsService.get(_REGISTRY_MARKER_KEY, '')
+ if not raw:
+ return set()
+ try:
+ return set(json.loads(raw))
+ except (ValueError, TypeError):
+ return set()
+
+
+def run_registry_auto_install():
+ """Upgrade parity for the extracted security suite. Idempotent, fail-soft.
+
+ Only on an upgraded panel, only for slugs whose host-tool predicate is
+ true, and only when the registry actually lists the slug (an unpublished
+ or unreachable registry defers to the next boot instead of burning the
+ one-shot). Fresh installs go through the wizard/Marketplace instead.
+ """
+ processed = _registry_processed_slugs()
+ pending = {s: gate for s, gate in REGISTRY_GATED_SLUGS.items()
+ if s not in processed}
+ if not pending:
+ return
+
+ if not _looks_like_existing_install():
+ # Fresh install: never auto-install, mark everything done once.
+ _save_registry_processed(processed | set(pending))
+ return
+
+ from app.services import registry_service
+ from app.services.plugin_service import install_registry_extension
+
+ changed = False
+ for slug, gate in pending.items():
+ try:
+ wants_it = bool(gate())
+ except Exception:
+ wants_it = False
+ if not wants_it:
+ processed.add(slug)
+ changed = True
+ continue
+ if InstalledPlugin.query.filter_by(slug=slug).first():
+ processed.add(slug)
+ changed = True
+ continue
+ try:
+ entry = registry_service.get_entry(slug)
+ except Exception:
+ entry = None
+ if not entry:
+ # Not published / registry unreachable — retry next boot.
+ continue
+ try:
+ install_registry_extension(slug)
+ logger.info(f'Auto-installed security extension from registry: {slug}')
+ processed.add(slug)
+ changed = True
+ except Exception as e: # noqa: BLE001
+ logger.warning(
+ f'Registry auto-install of {slug} failed (retry next boot): {e}')
+
+ if changed:
+ _save_registry_processed(processed)
+
+
+def _save_registry_processed(slugs):
+ from app.services.settings_service import SettingsService
+ SettingsService.set(_REGISTRY_MARKER_KEY, json.dumps(sorted(slugs)))
+
+
def _backend_acquired_slugs():
from app.services.settings_service import SettingsService
raw = SettingsService.get(_BACKEND_ACQUIRED_KEY, '')
diff --git a/backend/app/services/image_scanner_service.py b/backend/app/services/image_scanner_service.py
deleted file mode 100644
index 84de8635..00000000
--- a/backend/app/services/image_scanner_service.py
+++ /dev/null
@@ -1,347 +0,0 @@
-"""Image vulnerability scanning and SBOM generation using Anchore grype/syft."""
-import json
-import logging
-import os
-import platform
-import threading
-from datetime import datetime
-from typing import Dict, List, Optional
-
-from app import db
-from app.utils.system import run_checked
-from app.models import Application, ImageVulnerabilityScan, SbomArtifact
-
-logger = logging.getLogger(__name__)
-
-SCANNERS_DIR = '/var/lib/serverkit/scanners'
-GRYPE_BIN = os.path.join(SCANNERS_DIR, 'grype')
-SYFT_BIN = os.path.join(SCANNERS_DIR, 'syft')
-IMAGE_SCAN_JOB_KIND = 'security.image_scan'
-
-
-class ImageScannerService:
- """Manage scanner binaries and run per-image CVE scans + SBOM generation."""
-
- _install_lock = threading.Lock()
-
- @classmethod
- def _arch(cls) -> str:
- machine = platform.machine().lower()
- if machine in ('x86_64', 'amd64'):
- return 'amd64'
- if machine in ('aarch64', 'arm64'):
- return 'arm64'
- return machine
-
- @classmethod
- def _ensure_scanners_dir(cls) -> None:
- os.makedirs(SCANNERS_DIR, exist_ok=True)
-
- @classmethod
- def grype_installed(cls) -> bool:
- return os.path.isfile(GRYPE_BIN) and os.access(GRYPE_BIN, os.X_OK)
-
- @classmethod
- def syft_installed(cls) -> bool:
- return os.path.isfile(SYFT_BIN) and os.access(SYFT_BIN, os.X_OK)
-
- @classmethod
- def install_grype(cls) -> Dict:
- """Download grype binary into /var/lib/serverkit/scanners."""
- with cls._install_lock:
- if cls.grype_installed():
- return {'success': True, 'message': 'grype already installed'}
- cls._ensure_scanners_dir()
- arch = cls._arch()
- version = os.environ.get('GRYPE_VERSION', 'v0.87.0')
- url = f'https://github.com/anchore/grype/releases/download/{version}/grype_{version.lstrip("v")}_linux_{arch}.tar.gz'
- tmp_tar = '/tmp/serverkit-grype.tar.gz'
- try:
- download = run_checked(['curl', '-fsSL', url, '-o', tmp_tar],
- timeout=None)
- if not download['success']:
- return {'success': False,
- 'error': f"Failed to download grype: {download['error'][:200]}"}
- extract = run_checked(
- ['tar', '-xzf', tmp_tar, '-C', SCANNERS_DIR, 'grype'],
- timeout=None)
- if not extract['success']:
- return {'success': False,
- 'error': f"Failed to unpack grype: {extract['error'][:200]}"}
- os.chmod(GRYPE_BIN, 0o755)
- version_out = run_checked([GRYPE_BIN, 'version'], timeout=None)
- return {
- 'success': True,
- 'message': 'grype installed',
- 'version': (version_out['output'].strip().splitlines() or [version])[0]
- if version_out['success'] else version,
- }
- finally:
- if os.path.exists(tmp_tar):
- os.remove(tmp_tar)
-
- @classmethod
- def install_syft(cls) -> Dict:
- """Download syft binary into /var/lib/serverkit/scanners."""
- with cls._install_lock:
- if cls.syft_installed():
- return {'success': True, 'message': 'syft already installed'}
- cls._ensure_scanners_dir()
- arch = cls._arch()
- version = os.environ.get('SYFT_VERSION', 'v1.22.0')
- url = f'https://github.com/anchore/syft/releases/download/{version}/syft_{version.lstrip("v")}_linux_{arch}.tar.gz'
- tmp_tar = '/tmp/serverkit-syft.tar.gz'
- try:
- download = run_checked(['curl', '-fsSL', url, '-o', tmp_tar],
- timeout=None)
- if not download['success']:
- return {'success': False,
- 'error': f"Failed to download syft: {download['error'][:200]}"}
- extract = run_checked(
- ['tar', '-xzf', tmp_tar, '-C', SCANNERS_DIR, 'syft'],
- timeout=None)
- if not extract['success']:
- return {'success': False,
- 'error': f"Failed to unpack syft: {extract['error'][:200]}"}
- os.chmod(SYFT_BIN, 0o755)
- version_out = run_checked([SYFT_BIN, 'version'], timeout=None)
- return {
- 'success': True,
- 'message': 'syft installed',
- 'version': (version_out['output'].strip().splitlines() or [version])[0]
- if version_out['success'] else version,
- }
- finally:
- if os.path.exists(tmp_tar):
- os.remove(tmp_tar)
-
- @classmethod
- def _run_grype(cls, image_ref: str) -> Dict:
- if not cls.grype_installed():
- install = cls.install_grype()
- if not install['success']:
- return install
- try:
- result = run_checked(
- [GRYPE_BIN, image_ref, '-o', 'json', '--quiet'],
- timeout=600,
- env={**os.environ,
- 'GRYPE_DB_CACHE_DIR': os.path.join(SCANNERS_DIR, 'grype-db')})
- # 0 = clean, 1 = vulnerabilities FOUND. Only anything else is a
- # failed scan — read the code, not result['success'].
- if result['returncode'] not in (0, 1):
- return {'success': False, 'error': result['error'][:500]}
- data = json.loads(result['output'])
- return {'success': True, 'data': data}
- except json.JSONDecodeError as e:
- return {'success': False, 'error': f'Failed to parse grype output: {e}'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def _run_syft(cls, image_ref: str) -> Dict:
- if not cls.syft_installed():
- install = cls.install_syft()
- if not install['success']:
- return install
- try:
- result = run_checked([SYFT_BIN, image_ref, '-o', 'spdx-json'], timeout=300)
- if not result['success']:
- return {'success': False, 'error': result['error'][:500]}
- data = json.loads(result['output'])
- return {'success': True, 'data': data}
- except json.JSONDecodeError as e:
- return {'success': False, 'error': f'Failed to parse syft output: {e}'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def _parse_grype_counts(cls, data: Dict) -> Dict:
- counts = {'critical': 0, 'high': 0, 'medium': 0, 'low': 0, 'negligible': 0, 'unknown': 0}
- for match in data.get('matches', []):
- sev = match.get('vulnerability', {}).get('severity', 'unknown')
- sev = sev.lower()
- if sev in counts:
- counts[sev] += 1
- else:
- counts['unknown'] += 1
- return counts
-
- @classmethod
- def _normalize_findings(cls, data: Dict) -> List[Dict]:
- findings = []
- for match in data.get('matches', []):
- vuln = match.get('vulnerability', {})
- artifact = match.get('artifact', {})
- findings.append({
- 'id': vuln.get('id'),
- 'severity': vuln.get('severity', 'unknown'),
- 'cvss': vuln.get('cvss', []),
- 'fix_versions': vuln.get('fix', {}).get('versions', []),
- 'artifact_name': artifact.get('name'),
- 'artifact_version': artifact.get('version'),
- 'artifact_type': artifact.get('type'),
- 'description': vuln.get('description'),
- 'urls': vuln.get('urls', []),
- })
- return findings
-
- @classmethod
- def scan_application(cls, application_id: int) -> Dict:
- """Queue a CVE scan for the Docker image of an application.
-
- ``scan_id`` and ``status`` are retained for callers of the legacy
- thread-backed surface; ``job_id`` and ``kind`` expose the durable job
- that now owns execution, retries, and observability.
- """
- from app.jobs.service import JobService
-
- # query_active: a queued scan pulls from the registry after this request.
- app = Application.query_active().filter_by(id=application_id).first()
- if not app:
- return {'success': False, 'error': 'Application not found'}
- image_ref = app.docker_image or app.container_id
- if not image_ref:
- return {'success': False, 'error': 'Application has no Docker image or container'}
-
- scan = ImageVulnerabilityScan(
- application_id=application_id,
- image_ref=image_ref,
- status='running'
- )
- db.session.add(scan)
- db.session.commit()
-
- cls.register_jobs()
- try:
- job = JobService.enqueue(
- IMAGE_SCAN_JOB_KIND,
- payload={
- 'scan_id': scan.id,
- 'application_id': application_id,
- 'image_ref': image_ref,
- },
- owner_type='application',
- owner_id=application_id,
- )
- except Exception as exc:
- scan.status = 'failed'
- scan.error_message = f'Could not enqueue image scan: {exc}'
- scan.completed_at = datetime.utcnow()
- db.session.commit()
- logger.exception('Could not enqueue image scan %s', scan.id)
- return {'success': False, 'error': scan.error_message, 'scan_id': scan.id}
-
- return {
- 'success': True,
- 'scan_id': scan.id,
- 'status': 'running',
- 'job_id': job.id,
- 'kind': job.kind,
- }
-
- @classmethod
- def run_image_scan_job(cls, job) -> Dict:
- """Execute one persisted image scan job."""
- payload = job.get_payload() or {}
- scan_id = payload.get('scan_id')
- if scan_id is None:
- raise ValueError('security.image_scan payload requires scan_id')
-
- scan = db.session.get(ImageVulnerabilityScan, scan_id)
- if not scan:
- raise ValueError(f'Image scan {scan_id} not found')
-
- image_ref = payload.get('image_ref') or scan.image_ref
- scan.status = 'running'
- scan.error_message = None
- scan.completed_at = None
- db.session.commit()
-
- try:
- result = cls._run_grype(image_ref)
- if not result.get('success'):
- raise RuntimeError(result.get('error') or 'Image scanner failed')
-
- data = result['data']
- scan.status = 'completed'
- scan.scanner_version = data.get('descriptor', {}).get('version')
- scan.set_counts(cls._parse_grype_counts(data))
- scan.set_findings(cls._normalize_findings(data))
- scan.completed_at = datetime.utcnow()
- db.session.commit()
- return {
- 'success': True,
- 'scan_id': scan.id,
- 'application_id': scan.application_id,
- 'status': scan.status,
- 'severity_counts': scan.get_counts(),
- }
- except Exception as exc:
- db.session.rollback()
- scan = db.session.get(ImageVulnerabilityScan, scan_id)
- if scan:
- scan.status = 'failed'
- scan.error_message = str(exc)
- scan.completed_at = datetime.utcnow()
- db.session.commit()
- logger.exception('Image scan %s failed', scan_id)
- raise
-
- @classmethod
- def register_jobs(cls) -> None:
- """Register the durable image-scan handler (safe to call repeatedly)."""
- from app.jobs import registry
- registry.register(IMAGE_SCAN_JOB_KIND, cls.run_image_scan_job, replace=True)
-
- @classmethod
- def generate_sbom(cls, application_id: int) -> Dict:
- """Generate and persist an SPDX SBOM for an application image."""
- # query_active: Syft pulls/inspects the image out of process.
- app = Application.query_active().filter_by(id=application_id).first()
- if not app:
- return {'success': False, 'error': 'Application not found'}
- image_ref = app.docker_image or app.container_id
- if not image_ref:
- return {'success': False, 'error': 'Application has no Docker image or container'}
-
- result = cls._run_syft(image_ref)
- if not result['success']:
- return result
-
- data = result['data']
- sbom = SbomArtifact(
- application_id=application_id,
- image_ref=image_ref,
- generator_version=data.get('spdxVersion'),
- sbom_json=json.dumps(data)
- )
- db.session.add(sbom)
- db.session.commit()
- return {'success': True, 'sbom_id': sbom.id, 'sbom': sbom.to_dict(include_sbom=False)}
-
- @classmethod
- def latest_scan(cls, application_id: int) -> Optional[ImageVulnerabilityScan]:
- return ImageVulnerabilityScan.query.filter_by(application_id=application_id).order_by(
- ImageVulnerabilityScan.started_at.desc()).first()
-
- @classmethod
- def scan_history(cls, application_id: int, limit: int = 20) -> List[Dict]:
- scans = ImageVulnerabilityScan.query.filter_by(application_id=application_id).order_by(
- ImageVulnerabilityScan.started_at.desc()).limit(limit).all()
- return [s.to_dict() for s in scans]
-
- @classmethod
- def check_deploy_gate(cls, application_id: int, allowed_severities: Optional[List[str]] = None) -> Dict:
- """Return whether the latest scan allows deployment."""
- allowed_severities = allowed_severities or ['low', 'negligible', 'unknown']
- scan = cls.latest_scan(application_id)
- if not scan:
- return {'allowed': True, 'reason': 'No scan available'}
- if scan.status != 'completed':
- return {'allowed': False, 'reason': f'Scan status is {scan.status}'}
- counts = scan.get_counts()
- blocking = {sev: count for sev, count in counts.items() if sev not in allowed_severities and count > 0}
- if blocking:
- return {'allowed': False, 'reason': 'Image exceeds vulnerability threshold', 'blocking': blocking}
- return {'allowed': True, 'reason': 'Image passes vulnerability threshold'}
diff --git a/backend/app/services/malware_scan_service.py b/backend/app/services/malware_scan_service.py
deleted file mode 100644
index e0a3ee24..00000000
--- a/backend/app/services/malware_scan_service.py
+++ /dev/null
@@ -1,206 +0,0 @@
-"""
-Malware Scan Job Service
-
-Job-backed on-demand malware scan of a path or an application's docroot.
-Runs the fast curated YARA web-shell pass first (works everywhere via the
-pure-Python fallback), then ClamAV when ``clamscan`` is installed. Findings
-from both engines are merged into one report, tagged ``source: 'yara'`` or
-``source: 'clamav'``, and every finding can be quarantined through the
-existing quarantine mechanics (:meth:`SecurityService.quarantine_file`).
-
-Job kind: ``security.malware_scan`` — payload ``{'path': ...}`` OR
-``{'app_id': ...}`` (docroot resolved from the Application row). Registered
-via :meth:`MalwareScanService.register_jobs` following the
-backup_policy_service pattern; also invoked defensively before every enqueue
-so the handler is present even if boot-time registration was skipped.
-
-Best-effort / Linux-only posture: missing tools degrade gracefully (YARA
-falls back to the builtin matcher, a missing clamscan is reported in the
-result, never an exception).
-"""
-
-import os
-import subprocess
-
-from app.utils.system import run_checked
-import logging
-from datetime import datetime
-from typing import Dict, Optional
-
-from app import paths
-from app.exceptions import NotFoundError, ValidationError
-from app.utils.system import is_command_available
-from app.services.security_service import SecurityService
-from app.services.yara_scan_service import YaraScanService
-
-logger = logging.getLogger(__name__)
-
-MALWARE_SCAN_JOB_KIND = 'security.malware_scan'
-
-CLAMAV_TIMEOUT = 3600 # seconds — matches the legacy synchronous scan
-
-
-class MalwareScanService:
- """Enqueue + execute ``security.malware_scan`` jobs."""
-
- # ------------------------------------------------------------------ #
- # Enqueue
- # ------------------------------------------------------------------ #
- @classmethod
- def enqueue_scan(cls, path: Optional[str] = None, app_id: Optional[int] = None):
- """Enqueue a malware scan job for a path or an application docroot.
- Returns the Job row. Raises typed application errors on bad input."""
- from app.jobs.service import JobService
-
- if not path and not app_id:
- raise ValidationError('Either path or app_id is required')
- if app_id is not None:
- # Resolve now so a bad app id fails the request, not the job.
- path = cls.resolve_app_path(app_id)
-
- cls.register_jobs() # idempotent — survives registry resets
- return JobService.enqueue(
- MALWARE_SCAN_JOB_KIND,
- payload={'path': path, 'app_id': app_id},
- owner_type='application' if app_id is not None else None,
- owner_id=app_id,
- )
-
- @classmethod
- def resolve_app_path(cls, app_id: int) -> str:
- """Resolve an application's docroot on disk from its DB row."""
- from app.models.application import Application
-
- # query_active: the scan reads — and quarantines files in — this
- # docroot, which purge may already have removed. A queued job for a
- # deleted app must fail to resolve rather than scan somebody's path.
- app_row = Application.query_active().filter_by(id=app_id).first()
- if not app_row:
- raise NotFoundError(f'Application {app_id} not found')
-
- candidates = []
- if app_row.root_path:
- candidates.append(app_row.root_path)
- if app_row.name:
- candidates.append(os.path.join(paths.APPS_DIR, app_row.name))
-
- for candidate in candidates:
- if candidate and os.path.isdir(candidate):
- return candidate
-
- raise NotFoundError(
- f'No docroot found on disk for application {app_row.name or app_id} '
- f'(checked: {", ".join(candidates) or "none"})'
- )
-
- # ------------------------------------------------------------------ #
- # Job handler
- # ------------------------------------------------------------------ #
- @classmethod
- def run_malware_scan_job(cls, job) -> Dict:
- payload = job.get_payload() or {}
- app_id = payload.get('app_id')
- path = payload.get('path')
- if app_id is not None and not path:
- path = cls.resolve_app_path(app_id)
- if not path:
- raise ValueError('security.malware_scan payload requires path or app_id')
- if not os.path.exists(path):
- raise ValueError(f'Scan path not found: {path}')
- return cls.execute_scan(path, app_id=app_id, job_id=job.id)
-
- @classmethod
- def execute_scan(cls, path: str, app_id: Optional[int] = None,
- job_id: Optional[str] = None) -> Dict:
- """Run the YARA pass then ClamAV against ``path``; log + return the
- merged report. Also mirrors progress into the legacy scan-status
- surface so the existing Scanner tab polling picks it up."""
- report = {
- 'status': 'running',
- 'directory': path,
- 'app_id': app_id,
- 'job_id': job_id,
- 'started_at': datetime.now().isoformat(),
- 'findings': [],
- 'infected_files': [],
- 'errors': [],
- 'yara_engine': YaraScanService.engine(),
- 'clamav_available': is_command_available('clamscan'),
- }
- # Surface job-backed progress through the existing /scan/status poll.
- SecurityService._current_scan = report
-
- # 1) YARA pass — much faster than ClamAV, always available (fallback).
- try:
- report['findings'].extend(YaraScanService.scan_path(path))
- except Exception as exc: # noqa: BLE001 — YARA errors must not kill the clam pass
- logger.warning('YARA pass failed for %s: %s', path, exc)
- report['errors'].append(f'yara: {exc}')
-
- # 2) ClamAV pass — best-effort, skipped when clamscan is absent.
- if report['clamav_available']:
- report['findings'].extend(cls._clamav_pass(path, report['errors']))
-
- report['infected_files'] = sorted({f['file'] for f in report['findings']})
- report['counts'] = {
- 'yara': sum(1 for f in report['findings'] if f['source'] == 'yara'),
- 'clamav': sum(1 for f in report['findings'] if f['source'] == 'clamav'),
- }
- report['status'] = 'completed'
- report['completed_at'] = datetime.now().isoformat()
-
- SecurityService._current_scan = report
- SecurityService._log_scan(report)
-
- if report['findings']:
- SecurityService._send_security_notification(
- 'malware_detected',
- f"Malware scan found {len(report['findings'])} finding(s) in "
- f"{len(report['infected_files'])} file(s) under {path}",
- severity='critical',
- details={'count': len(report['findings']),
- 'files': report['infected_files'][:50]},
- )
-
- return report
-
- @classmethod
- def _clamav_pass(cls, path: str, errors: list) -> list:
- findings = []
- try:
- result = run_checked(['clamscan', '-r', '--infected', '--no-summary', path],
- timeout=CLAMAV_TIMEOUT)
- # 0 = clean, 1 = infections FOUND, anything else (or None) = the
- # scan itself failed and must be reported, never rendered as clean.
- if result['returncode'] != 1 and not result['success']:
- errors.append(f"clamav: {(result['error'] or 'scan error')[:300]}")
- for line in result['output'].strip().split('\n'):
- if ': ' in line and line.endswith('FOUND'):
- file_path, rest = line.rsplit(': ', 1)
- signature = rest[:-len('FOUND')].strip()
- findings.append({
- 'rule': signature or 'clamav.match',
- 'severity': 'critical',
- 'file': file_path,
- 'matched': '',
- 'description': 'ClamAV signature match',
- 'source': 'clamav',
- })
- except FileNotFoundError:
- errors.append('clamav: clamscan not found')
- except subprocess.TimeoutExpired:
- errors.append('clamav: scan timed out')
- except Exception as exc: # noqa: BLE001
- errors.append(f'clamav: {exc}')
- return findings
-
- # ------------------------------------------------------------------ #
- # Registration
- # ------------------------------------------------------------------ #
- @classmethod
- def register_jobs(cls):
- """Register the malware-scan handler with the job registry. Invoked at
- import of the security API blueprint (app boot) and again before each
- enqueue (idempotent)."""
- from app.jobs import registry
- registry.register(MALWARE_SCAN_JOB_KIND, cls.run_malware_scan_job, replace=True)
diff --git a/backend/app/services/plugin_service.py b/backend/app/services/plugin_service.py
index a3a4fb4f..06403171 100644
--- a/backend/app/services/plugin_service.py
+++ b/backend/app/services/plugin_service.py
@@ -2057,6 +2057,39 @@ def recommend_extensions_for_use_cases(use_cases):
return out
+# Wizard round 2 (plan 47 Ph5): "How much security tooling?" The extracted
+# security suite installs by chosen posture, not per-tool nagging. Slugs here
+# resolve through the same catalog index as the use-case map — an entry that
+# is not yet published (or a registry that is unreachable) silently drops out,
+# so the wizard only ever offers what is actually installable right now.
+# Deliberately NOT folded into RECOMMENDED_EXTENSIONS_BY_USE_CASE: posture is
+# persisted separately (`onboarding_security_posture`) and orthogonal to what
+# the server is for.
+SECURITY_POSTURE_LEVELS = {
+ 'minimal': [],
+ 'recommended': ['serverkit-fail2ban', 'serverkit-auto-updates'],
+ 'hardened': [
+ 'serverkit-fail2ban', 'serverkit-auto-updates', 'serverkit-clamav',
+ 'serverkit-lynis', 'serverkit-image-scan', 'serverkit-crowdsec',
+ ],
+}
+
+
+def recommend_security_extensions(posture):
+ """Resolve a security posture to installable extension metadata.
+
+ Same contract as ``recommend_extensions_for_use_cases``: order-preserving,
+ and slugs that don't resolve to a catalog entry are dropped rather than
+ surfaced as dead install buttons."""
+ index = _recommendation_index()
+ out = []
+ for slug in SECURITY_POSTURE_LEVELS.get(posture or 'minimal', []):
+ meta = index.get(slug)
+ if meta:
+ out.append(meta)
+ return out
+
+
def finalize_setup_flagships():
"""Keep the panel lean after onboarding completes: any wizard-optional
flagship (WordPress) the user didn't install during the wizard gets the
diff --git a/backend/app/services/security_service.py b/backend/app/services/security_service.py
index a1982cb9..34b13966 100644
--- a/backend/app/services/security_service.py
+++ b/backend/app/services/security_service.py
@@ -1,38 +1,35 @@
"""
-Security Service
-
-Handles security scanning and monitoring:
-- ClamAV malware scanning
-- File integrity monitoring
-- Suspicious activity detection
-- Integration with notification system for alerts
+Security Service — the lean core baseline.
+
+What stays here works on every box with zero host packages: the shared
+security config, legacy file-integrity monitoring, suspicious-activity /
+event surfaces, SSH keys, IP allow/block lists, the security audit, and the
+scan/alert logs + notification helpers the extensions also write through.
+
+The install-gated tools were extracted to installable extensions
+(plan 47 Ph3b-4 / plan 55 Phase 3): ClamAV/YARA scanning and quarantine →
+serverkit-clamav, fail2ban management → serverkit-fail2ban (status probing
+lives on core ``Fail2banJailService``), Lynis → serverkit-lynis,
+unattended-upgrades → serverkit-auto-updates, container CVE/SBOM scanning →
+serverkit-image-scan.
"""
import os
import json
import shlex
-import subprocess
import hashlib
-import threading
-import time
from datetime import datetime, timedelta
from typing import Dict, List, Optional
-from pathlib import Path
from .notification_service import NotificationService
from app import paths
from app.utils.config_store import load_json_config, save_json_config
from app.utils.system import (
PackageManager,
- ServiceControl,
- is_command_available,
run_checked,
run_privileged,
)
-LYNIS_SCAN_JOB_KIND = 'security.lynis_scan'
-
-
class SecurityService:
"""Service for security scanning and monitoring."""
@@ -89,438 +86,6 @@ class SecurityService:
"""Save security configuration."""
return save_json_config(cls.SECURITY_CONFIG, config)
- # ==========================================
- # CLAMAV INTEGRATION
- # ==========================================
- @classmethod
- def get_clamav_status(cls) -> Dict:
- """Get ClamAV installation and service status."""
- result = {
- 'installed': False,
- 'service_running': False,
- 'version': None,
- 'database_version': None,
- 'last_update': None,
- 'definitions_count': None
- }
-
- # Check if ClamAV is installed
- try:
- version_output = run_checked(['clamscan', '--version'], timeout=10)
- if version_output['success']:
- result['installed'] = True
- result['version'] = version_output['output'].strip()
- except Exception: # noqa: BLE001 - probe only; absence is the answer
- pass
-
- # Check if clamd service is running
- try:
- result['service_running'] = ServiceControl.is_active('clamav-daemon')
- if not result['service_running']:
- # Try alternative service name
- result['service_running'] = ServiceControl.is_active('clamd')
- except Exception:
- pass
-
- # Get database info
- try:
- db_path = '/var/lib/clamav'
- if os.path.exists(db_path):
- for db_file in ['main.cvd', 'main.cld', 'daily.cvd', 'daily.cld']:
- full_path = os.path.join(db_path, db_file)
- if os.path.exists(full_path):
- stat = os.stat(full_path)
- result['last_update'] = datetime.fromtimestamp(stat.st_mtime).isoformat()
- break
- except Exception:
- pass
-
- return result
-
- @classmethod
- def install_clamav(cls) -> Dict:
- """Install ClamAV packages."""
- try:
- manager = PackageManager.detect()
- if manager is None:
- return {'success': False, 'error': 'Unsupported package manager'}
-
- if manager == 'apt':
- packages = ['clamav', 'clamav-daemon', 'clamav-freshclam']
- else:
- packages = ['clamav', 'clamd', 'clamav-update']
-
- result = PackageManager.install(packages, timeout=300)
-
- if result.returncode != 0:
- return {'success': False, 'error': result.stderr}
-
- # Update virus definitions
- cls.update_definitions()
-
- return {'success': True, 'message': 'ClamAV installed successfully'}
-
- except subprocess.TimeoutExpired:
- return {'success': False, 'error': 'Installation timed out'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def update_definitions(cls) -> Dict:
- """Update ClamAV virus definitions."""
- try:
- # Stop freshclam if running to avoid conflicts
- ServiceControl.stop('clamav-freshclam', timeout=10)
-
- result = run_checked(['freshclam'], timeout=300)
-
- # Restart freshclam
- ServiceControl.start('clamav-freshclam', timeout=10)
-
- if result['success']:
- return {'success': True, 'message': 'Definitions updated',
- 'output': result['output']}
-
- if result['returncode'] is None:
- # Never ran: no freshclam, or it outlived the timeout. Not the
- # same as "the update reported a problem".
- return {'success': False, 'error': result['error']}
-
- # Return code 1 might just mean "already up to date"
- if ('up to date' in result['output'].lower()
- or 'up to date' in result['stderr'].lower()):
- return {'success': True, 'message': 'Definitions already up to date'}
-
- return {'success': False, 'error': result['stderr'] or result['output']}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def start_clamav(cls) -> Dict:
- """Start and enable the ClamAV daemon.
-
- Debian ships the daemon as ``clamav-daemon``; RHEL and others call it
- ``clamd`` — try both, mirroring :meth:`get_clamav_status`. ``install``
- does not start the daemon, so this backs the "Start service" posture fix.
- """
- for service in ('clamav-daemon', 'clamd'):
- try:
- ServiceControl.enable(service, timeout=15)
- result = ServiceControl.start(service, timeout=30)
- except FileNotFoundError:
- return {'success': False, 'error': 'systemctl not found (not a Linux host?)'}
- except subprocess.TimeoutExpired:
- return {'success': False, 'error': 'Starting ClamAV timed out'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- if getattr(result, 'returncode', 1) == 0 and ServiceControl.is_active(service):
- return {'success': True, 'message': f'{service} started'}
-
- return {'success': False, 'error': 'Could not start the ClamAV service. Is ClamAV installed?'}
-
- @classmethod
- def scan_file(cls, file_path: str) -> Dict:
- """Scan a single file for malware."""
- if not os.path.exists(file_path):
- return {'success': False, 'error': 'File not found'}
-
- try:
- result = run_checked(['clamscan', '--no-summary', file_path], timeout=60)
-
- # clamscan exit 1 means INFECTED, not "the command failed" — read
- # the code, not result['success'].
- infected = result['returncode'] == 1
- scan_result = {
- 'success': True,
- 'file': file_path,
- 'infected': infected,
- 'output': result['output'].strip(),
- 'scanned_at': datetime.now().isoformat()
- }
-
- if infected:
- # Log and send notification
- cls._log_alert('malware', f'Malware detected in {file_path}', {
- 'file': file_path,
- 'output': result['output'].strip()
- })
- cls._send_security_notification(
- 'malware_detected',
- f'Malware detected: {file_path}',
- severity='critical'
- )
-
- return scan_result
-
- except FileNotFoundError:
- return {'success': False, 'error': 'clamscan not found. Is ClamAV installed?'}
- except subprocess.TimeoutExpired:
- return {'success': False, 'error': 'Scan timed out'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def scan_directory(cls, directory: str, recursive: bool = True) -> Dict:
- """Start a directory scan (runs in background for large directories)."""
- if not os.path.isdir(directory):
- return {'success': False, 'error': 'Directory not found'}
-
- if cls._scan_thread and cls._scan_thread.is_alive():
- return {'success': False, 'error': 'A scan is already in progress'}
-
- # Initialize scan status
- cls._current_scan = {
- 'status': 'running',
- 'directory': directory,
- 'started_at': datetime.now().isoformat(),
- 'files_scanned': 0,
- 'infected_files': [],
- 'errors': []
- }
-
- # Start scan in background thread
- cls._scan_thread = threading.Thread(
- target=cls._run_directory_scan,
- args=(directory, recursive),
- daemon=True
- )
- cls._scan_thread.start()
-
- return {
- 'success': True,
- 'message': f'Scan started for {directory}',
- 'scan_id': cls._current_scan['started_at']
- }
-
- @classmethod
- def _run_directory_scan(cls, directory: str, recursive: bool) -> None:
- """Execute directory scan (internal method)."""
- config = cls.get_config()
- exclude_paths = config.get('clamav', {}).get('exclude_paths', [])
-
- try:
- cmd = ['clamscan']
- if recursive:
- cmd.append('-r')
- cmd.extend(['--infected', '--no-summary'])
-
- # Add exclusions
- for exclude in exclude_paths:
- cmd.extend(['--exclude', exclude])
-
- cmd.append(directory)
-
- result = run_checked(cmd, timeout=3600) # 1 hour
-
- # Parse output
- infected_files = []
- for line in result['output'].strip().split('\n'):
- if ': ' in line and 'FOUND' in line:
- file_path = line.split(':')[0]
- infected_files.append(file_path)
-
- cls._current_scan['status'] = 'completed'
- cls._current_scan['completed_at'] = datetime.now().isoformat()
- cls._current_scan['infected_files'] = infected_files
- cls._current_scan['output'] = result['output']
-
- # Log scan result
- cls._log_scan(cls._current_scan)
-
- # Send notification if malware found
- if infected_files:
- cls._send_security_notification(
- 'malware_detected',
- f'Malware detected in {len(infected_files)} file(s) during scan of {directory}',
- severity='critical',
- details={'files': infected_files}
- )
-
- except subprocess.TimeoutExpired:
- cls._current_scan['status'] = 'timeout'
- cls._current_scan['error'] = 'Scan timed out after 1 hour'
- except Exception as e:
- cls._current_scan['status'] = 'error'
- cls._current_scan['error'] = str(e)
-
- @classmethod
- def get_scan_status(cls) -> Dict:
- """Get current scan status."""
- if cls._current_scan is None:
- return {'status': 'idle', 'message': 'No scan in progress'}
- return cls._current_scan.copy()
-
- @classmethod
- def cancel_scan(cls) -> Dict:
- """Cancel running scan."""
- if cls._scan_thread and cls._scan_thread.is_alive():
- # We can't easily kill the subprocess, but we can mark it
- cls._current_scan['status'] = 'cancelled'
- return {'success': True, 'message': 'Scan marked as cancelled'}
- return {'success': False, 'error': 'No scan running'}
-
- @classmethod
- def quarantine_file(cls, file_path: str) -> Dict:
- """Move infected file to quarantine (with a sidecar recording the
- original location so it can be restored)."""
- config = cls.get_config()
- quarantine_path = config.get('clamav', {}).get('quarantine_path', paths.SERVERKIT_QUARANTINE_DIR)
-
- if not os.path.exists(file_path):
- return {'success': False, 'error': 'File not found'}
-
- # Never quarantine something already inside the quarantine directory.
- if os.path.abspath(file_path).startswith(os.path.abspath(quarantine_path) + os.sep):
- return {'success': False, 'error': 'File is already in quarantine'}
-
- try:
- # Create quarantine directory
- os.makedirs(quarantine_path, exist_ok=True)
-
- # Generate unique quarantine name
- timestamp = datetime.now().strftime('%Y%m%d_%H%M%S')
- original_name = os.path.basename(file_path)
- quarantine_name = f"{timestamp}_{original_name}.quarantine"
- quarantine_full_path = os.path.join(quarantine_path, quarantine_name)
-
- # Move file
- os.rename(file_path, quarantine_full_path)
-
- # Sidecar with the original location (enables restore)
- try:
- with open(quarantine_full_path + '.meta.json', 'w') as f:
- json.dump({
- 'original_path': os.path.abspath(file_path),
- 'quarantined_at': datetime.now().isoformat(),
- }, f)
- except Exception:
- pass # restore becomes unavailable, quarantine itself succeeded
-
- # Log the quarantine action
- cls._log_alert('quarantine', f'File quarantined: {file_path}', {
- 'original_path': file_path,
- 'quarantine_path': quarantine_full_path
- })
-
- return {
- 'success': True,
- 'message': 'File quarantined',
- 'original_path': file_path,
- 'quarantine_path': quarantine_full_path
- }
-
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def get_quarantined_files(cls) -> Dict:
- """List quarantined files."""
- config = cls.get_config()
- quarantine_path = config.get('clamav', {}).get('quarantine_path', paths.SERVERKIT_QUARANTINE_DIR)
-
- if not os.path.exists(quarantine_path):
- return {'success': True, 'files': []}
-
- try:
- files = []
- for filename in os.listdir(quarantine_path):
- if filename.endswith('.meta.json'):
- continue # restore sidecars, not quarantined payloads
- full_path = os.path.join(quarantine_path, filename)
- stat = os.stat(full_path)
- entry = {
- 'name': filename,
- 'path': full_path,
- 'size': stat.st_size,
- 'quarantined_at': datetime.fromtimestamp(stat.st_mtime).isoformat(),
- 'original_path': None,
- }
- meta = cls._read_quarantine_meta(full_path)
- if meta:
- entry['original_path'] = meta.get('original_path')
- files.append(entry)
-
- return {'success': True, 'files': files}
-
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def delete_quarantined_file(cls, filename: str) -> Dict:
- """Permanently delete a quarantined file."""
- config = cls.get_config()
- quarantine_path = config.get('clamav', {}).get('quarantine_path', paths.SERVERKIT_QUARANTINE_DIR)
- file_path = os.path.join(quarantine_path, filename)
-
- if not os.path.exists(file_path):
- return {'success': False, 'error': 'File not found'}
-
- # Security check: ensure file is in quarantine directory
- if not os.path.abspath(file_path).startswith(os.path.abspath(quarantine_path)):
- return {'success': False, 'error': 'Invalid file path'}
-
- try:
- os.remove(file_path)
- try:
- os.remove(file_path + '.meta.json')
- except OSError:
- pass
- return {'success': True, 'message': 'File deleted'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def _read_quarantine_meta(cls, quarantine_full_path: str) -> Optional[Dict]:
- """Read the restore sidecar for a quarantined file, if present."""
- try:
- with open(quarantine_full_path + '.meta.json', 'r') as f:
- return json.load(f)
- except Exception:
- return None
-
- @classmethod
- def restore_quarantined_file(cls, filename: str) -> Dict:
- """Move a quarantined file back to its recorded original location."""
- config = cls.get_config()
- quarantine_path = config.get('clamav', {}).get('quarantine_path', paths.SERVERKIT_QUARANTINE_DIR)
- file_path = os.path.join(quarantine_path, filename)
-
- # Security check: ensure file is in quarantine directory
- if not os.path.abspath(file_path).startswith(os.path.abspath(quarantine_path)):
- return {'success': False, 'error': 'Invalid file path'}
-
- if not os.path.exists(file_path):
- return {'success': False, 'error': 'File not found'}
-
- meta = cls._read_quarantine_meta(file_path)
- original_path = (meta or {}).get('original_path')
- if not original_path:
- return {'success': False,
- 'error': 'Original location unknown — this file was quarantined '
- 'before restore metadata existed'}
-
- if os.path.exists(original_path):
- return {'success': False,
- 'error': f'A file already exists at {original_path}; '
- 'remove it first to restore'}
-
- try:
- os.makedirs(os.path.dirname(original_path), exist_ok=True)
- os.rename(file_path, original_path)
- try:
- os.remove(file_path + '.meta.json')
- except OSError:
- pass
-
- cls._log_alert('quarantine_restore', f'File restored from quarantine: {original_path}', {
- 'quarantine_name': filename,
- 'restored_to': original_path,
- })
- return {'success': True, 'message': 'File restored',
- 'restored_to': original_path}
- except Exception as e:
- return {'success': False, 'error': str(e)}
# ==========================================
# FILE INTEGRITY MONITORING
@@ -824,8 +389,13 @@ class SecurityService:
@classmethod
def get_security_summary(cls) -> Dict:
- """Get overall security status summary."""
- clamav_status = cls.get_clamav_status()
+ """Get overall security status summary.
+
+ Core-only view: malware scanning lives in the serverkit-clamav
+ extension now, so the summary no longer carries `clamav`/`scan_status`
+ fields — the extension's own tabs report scanner state. Events,
+ integrity and notification toggles are core-owned and stay.
+ """
config = cls.get_config()
# Get recent events count
@@ -852,12 +422,7 @@ class SecurityService:
except Exception:
continue
- # Check scan status
- scan_status = cls.get_scan_status()
-
return {
- 'clamav': clamav_status,
- 'scan_status': scan_status.get('status', 'idle'),
'file_integrity': {
'enabled': config.get('file_integrity', {}).get('enabled', False),
'database_exists': os.path.exists(cls.INTEGRITY_DB)
@@ -875,154 +440,6 @@ class SecurityService:
])
}
- # ==========================================
- # FAIL2BAN INTEGRATION
- # ==========================================
- @classmethod
- def get_fail2ban_status(cls) -> Dict:
- """Get Fail2ban installation and service status."""
- result = {
- 'installed': False,
- 'service_running': False,
- 'version': None,
- 'jails': []
- }
-
- try:
- version_output = run_checked(['fail2ban-client', '--version'], timeout=10)
- if version_output['success']:
- result['installed'] = True
- result['version'] = version_output['output'].strip().split('\n')[0]
- except Exception: # noqa: BLE001 - probe only; absence is the answer
- pass
-
- if result['installed']:
- try:
- result['service_running'] = ServiceControl.is_active('fail2ban')
- except Exception:
- pass
-
- if result['service_running']:
- try:
- jails_output = run_checked(['fail2ban-client', 'status'], timeout=10)
- if jails_output['success']:
- for line in jails_output['output'].split('\n'):
- if 'Jail list:' in line:
- jails_str = line.split(':')[1].strip()
- if jails_str:
- result['jails'] = [j.strip() for j in jails_str.split(',')]
- except Exception:
- pass
-
- return result
-
- @classmethod
- def install_fail2ban(cls) -> Dict:
- """Install Fail2ban."""
- try:
- manager = PackageManager.detect()
- if manager is None:
- return {'success': False, 'error': 'Unsupported package manager'}
-
- result = PackageManager.install('fail2ban', timeout=300)
-
- if result.returncode != 0:
- return {'success': False, 'error': result.stderr}
-
- ServiceControl.enable('fail2ban', timeout=10)
- ServiceControl.start('fail2ban', timeout=10)
-
- return {'success': True, 'message': 'Fail2ban installed successfully'}
-
- except subprocess.TimeoutExpired:
- return {'success': False, 'error': 'Installation timed out'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def get_fail2ban_jail_status(cls, jail: str) -> Dict:
- """Get status of a specific Fail2ban jail."""
- try:
- result = run_checked(['fail2ban-client', 'status', jail], timeout=10)
-
- if not result['success']:
- return {'success': False, 'error': f'Jail {jail} not found'}
-
- status = {
- 'jail': jail,
- 'currently_banned': 0,
- 'total_banned': 0,
- 'banned_ips': [],
- 'currently_failed': 0,
- 'total_failed': 0
- }
-
- for line in result['output'].split('\n'):
- line = line.strip()
- if 'Currently banned:' in line:
- status['currently_banned'] = int(line.split(':')[1].strip())
- elif 'Total banned:' in line:
- status['total_banned'] = int(line.split(':')[1].strip())
- elif 'Banned IP list:' in line:
- ips_str = line.split(':')[1].strip()
- if ips_str:
- status['banned_ips'] = ips_str.split()
- elif 'Currently failed:' in line:
- status['currently_failed'] = int(line.split(':')[1].strip())
- elif 'Total failed:' in line:
- status['total_failed'] = int(line.split(':')[1].strip())
-
- return {'success': True, **status}
-
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def get_all_fail2ban_bans(cls) -> Dict:
- """Get all banned IPs across all jails."""
- status = cls.get_fail2ban_status()
- if not status['service_running']:
- return {'success': False, 'error': 'Fail2ban is not running'}
-
- all_bans = []
- for jail in status['jails']:
- jail_status = cls.get_fail2ban_jail_status(jail)
- if jail_status.get('success'):
- for ip in jail_status.get('banned_ips', []):
- all_bans.append({'ip': ip, 'jail': jail})
-
- return {'success': True, 'banned_ips': all_bans, 'total': len(all_bans)}
-
- @classmethod
- def unban_ip(cls, ip: str, jail: str = None) -> Dict:
- """Unban an IP from Fail2ban."""
- try:
- if jail:
- result = run_checked(['fail2ban-client', 'set', jail, 'unbanip', ip],
- timeout=10)
- else:
- result = run_checked(['fail2ban-client', 'unban', ip], timeout=10)
-
- if result['success']:
- return {'success': True, 'message': f'IP {ip} unbanned'}
- return {'success': False, 'error': result['error'] or 'Failed to unban IP'}
-
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def ban_ip(cls, ip: str, jail: str = 'sshd') -> Dict:
- """Manually ban an IP in Fail2ban."""
- try:
- result = run_checked(['fail2ban-client', 'set', jail, 'banip', ip], timeout=10)
-
- if result['success']:
- return {'success': True, 'message': f'IP {ip} banned in {jail}'}
- return {'success': False, 'error': result['error'] or 'Failed to ban IP'}
-
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
# ==========================================
# SSH KEY MANAGEMENT
# ==========================================
@@ -1426,7 +843,8 @@ class SecurityService:
}
checks['total_checks'] += 1
- status = cls.get_fail2ban_status()
+ from app.services.fail2ban_jail_service import Fail2banJailService
+ status = Fail2banJailService.get_fail2ban_status()
if status['service_running']:
checks['passed_checks'] += 1
checks['findings'].append({'severity': 'pass', 'message': f'Fail2ban is running with {len(status["jails"])} jails'})
@@ -1495,297 +913,3 @@ class SecurityService:
return recommendations
- # ==========================================
- # VULNERABILITY SCANNING (Lynis)
- # ==========================================
- @classmethod
- def get_lynis_status(cls) -> Dict:
- """Check if Lynis is installed.
-
- Presence and version are separate questions. Inferring "installed" from
- a successful ``lynis --version`` exec makes any exec failure look like
- absence — and Debian ships lynis in a sbin directory the panel unit's
- PATH omits, so a bare-name call raises FileNotFoundError. Same trap as
- FirewallService._check_ufw.
- """
- installed = is_command_available('lynis') or PackageManager.is_installed('lynis')
- if not installed:
- return {'installed': False, 'version': None}
-
- version = None
- try:
- result = run_privileged(['lynis', '--version'], timeout=10)
- if result.returncode == 0:
- version = (result.stdout or '').strip()
- except Exception:
- pass
- return {'installed': True, 'version': version}
-
- @classmethod
- def install_lynis(cls) -> Dict:
- """Install Lynis security auditing tool."""
- try:
- manager = PackageManager.detect()
- if manager is None:
- return {'success': False, 'error': 'Unsupported package manager'}
-
- result = PackageManager.install('lynis', timeout=300)
-
- if result.returncode != 0:
- return {'success': False, 'error': result.stderr}
-
- return {'success': True, 'message': 'Lynis installed successfully'}
-
- except subprocess.TimeoutExpired:
- return {'success': False, 'error': 'Installation timed out'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- _lynis_scan = None
-
- @classmethod
- def run_lynis_scan(cls) -> Dict:
- """Queue a durable Lynis security audit scan."""
- from app.jobs.models import Job
- from app.jobs.service import JobService
-
- active = Job.query.filter(
- Job.kind == LYNIS_SCAN_JOB_KIND,
- Job.status.in_((Job.STATUS_PENDING, Job.STATUS_RUNNING)),
- ).order_by(Job.created_at.desc()).first()
- if active:
- return {'success': False, 'error': 'A scan is already in progress'}
-
- status = cls.get_lynis_status()
- if not status['installed']:
- return {'success': False, 'error': 'Lynis is not installed'}
-
- cls._lynis_scan = {
- 'status': 'running',
- 'started_at': datetime.now().isoformat(),
- 'output': '',
- 'warnings': [],
- 'suggestions': [],
- 'hardening_index': None
- }
-
- cls.register_jobs()
- job = JobService.enqueue(
- LYNIS_SCAN_JOB_KIND,
- payload={},
- owner_type='system',
- owner_id='host',
- )
- cls._lynis_scan['job_id'] = job.id
- cls._lynis_scan['kind'] = job.kind
-
- return {
- 'success': True,
- 'message': 'Lynis scan started',
- 'job_id': job.id,
- 'kind': job.kind,
- 'status': 'running',
- }
-
- @classmethod
- def run_lynis_scan_job(cls, job) -> Dict:
- """Unified-job handler for a Lynis audit."""
- cls._lynis_scan = {
- 'status': 'running',
- 'started_at': datetime.now().isoformat(),
- 'output': '',
- 'warnings': [],
- 'suggestions': [],
- 'hardening_index': None,
- 'job_id': job.id,
- 'kind': job.kind,
- }
- result = cls._execute_lynis_scan()
- if result['status'] != 'completed':
- raise RuntimeError(result.get('error') or f"Lynis scan {result['status']}")
- return result
-
- @classmethod
- def _execute_lynis_scan(cls) -> Dict:
- """Execute Lynis and update the compatibility status snapshot."""
- try:
- result = run_checked(['lynis', 'audit', 'system', '--quick', '--no-colors'],
- timeout=1800)
-
- cls._lynis_scan['output'] = result['output']
- cls._lynis_scan['status'] = 'completed'
- cls._lynis_scan['completed_at'] = datetime.now().isoformat()
-
- for line in result['output'].split('\n'):
- if 'Warning:' in line:
- cls._lynis_scan['warnings'].append(line.strip())
- elif 'Suggestion:' in line:
- cls._lynis_scan['suggestions'].append(line.strip())
- elif 'Hardening index' in line:
- try:
- idx = line.split(':')[1].strip().split()[0]
- cls._lynis_scan['hardening_index'] = int(idx)
- except Exception:
- pass
-
- except subprocess.TimeoutExpired:
- cls._lynis_scan['status'] = 'timeout'
- cls._lynis_scan['error'] = 'Scan timed out'
- except Exception as e:
- cls._lynis_scan['status'] = 'error'
- cls._lynis_scan['error'] = str(e)
- return cls._lynis_scan.copy()
-
- @classmethod
- def get_lynis_scan_status(cls) -> Dict:
- """Get current Lynis status, backed by the latest persisted job."""
- from app.jobs.models import Job
-
- job = (Job.query.filter_by(kind=LYNIS_SCAN_JOB_KIND)
- .order_by(Job.created_at.desc()).first())
- if job is None and cls._lynis_scan is None:
- return {'status': 'idle', 'message': 'No scan in progress'}
-
- status = cls._lynis_scan.copy() if cls._lynis_scan else {}
- if job:
- status.update({'job_id': job.id, 'kind': job.kind,
- 'job_status': job.status})
- if job.status == Job.STATUS_SUCCEEDED and job.get_result():
- status.update(job.get_result())
- elif job.status in (Job.STATUS_PENDING, Job.STATUS_RUNNING):
- status['status'] = 'running'
- status.setdefault('started_at',
- (job.started_at or job.created_at).isoformat())
- elif job.status == Job.STATUS_FAILED:
- status['status'] = 'error'
- status['error'] = job.error_message or 'Lynis scan failed'
- elif job.status == Job.STATUS_CANCELLED:
- status['status'] = 'cancelled'
- return status
-
- @classmethod
- def register_jobs(cls) -> None:
- """Register the durable Lynis handler (safe to call repeatedly)."""
- from app.jobs import registry
- registry.register(LYNIS_SCAN_JOB_KIND, cls.run_lynis_scan_job, replace=True)
-
- # ==========================================
- # AUTOMATIC SECURITY UPDATES
- # ==========================================
- @classmethod
- def get_auto_updates_status(cls) -> Dict:
- """Get automatic security updates status."""
- result = {
- 'supported': False,
- 'enabled': False,
- 'package': None,
- 'settings': {}
- }
-
- manager = PackageManager.detect()
-
- if manager == 'apt':
- result['supported'] = True
- result['package'] = 'unattended-upgrades'
-
- try:
- result['installed'] = PackageManager.is_installed('unattended-upgrades')
- except Exception:
- result['installed'] = False
-
- config_path = '/etc/apt/apt.conf.d/20auto-upgrades'
- if os.path.exists(config_path):
- try:
- with open(config_path, 'r') as f:
- content = f.read()
- result['enabled'] = 'APT::Periodic::Unattended-Upgrade "1"' in content
- result['settings']['auto_update'] = 'APT::Periodic::Update-Package-Lists "1"' in content
- except Exception:
- pass
-
- elif manager == 'dnf':
- result['supported'] = True
- result['package'] = 'dnf-automatic'
-
- try:
- result['enabled'] = ServiceControl.is_enabled('dnf-automatic.timer')
- except Exception:
- pass
-
- return result
-
- @classmethod
- def install_auto_updates(cls) -> Dict:
- """Install automatic security updates package."""
- try:
- manager = PackageManager.detect()
-
- if manager == 'apt':
- result = PackageManager.install(['unattended-upgrades', 'apt-listchanges'], timeout=300)
- if result.returncode != 0:
- return {'success': False, 'error': result.stderr}
- return {'success': True, 'message': 'unattended-upgrades installed'}
-
- elif manager == 'dnf':
- result = PackageManager.install('dnf-automatic', timeout=300)
- if result.returncode != 0:
- return {'success': False, 'error': result.stderr}
- return {'success': True, 'message': 'dnf-automatic installed'}
-
- return {'success': False, 'error': 'Unsupported package manager'}
-
- except subprocess.TimeoutExpired:
- return {'success': False, 'error': 'Installation timed out'}
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def enable_auto_updates(cls) -> Dict:
- """Enable automatic security updates."""
- try:
- manager = PackageManager.detect()
-
- if manager == 'apt':
- config_content = '''APT::Periodic::Update-Package-Lists "1";
-APT::Periodic::Unattended-Upgrade "1";
-APT::Periodic::AutocleanInterval "7";
-'''
- config_path = '/etc/apt/apt.conf.d/20auto-upgrades'
- with open(config_path, 'w') as f:
- f.write(config_content)
- return {'success': True, 'message': 'Automatic updates enabled'}
-
- elif manager == 'dnf':
- ServiceControl.enable('dnf-automatic.timer', timeout=10)
- ServiceControl.start('dnf-automatic.timer', timeout=10)
- return {'success': True, 'message': 'Automatic updates enabled'}
-
- return {'success': False, 'error': 'Unsupported package manager'}
-
- except Exception as e:
- return {'success': False, 'error': str(e)}
-
- @classmethod
- def disable_auto_updates(cls) -> Dict:
- """Disable automatic security updates."""
- try:
- manager = PackageManager.detect()
-
- if manager == 'apt':
- config_content = '''APT::Periodic::Update-Package-Lists "0";
-APT::Periodic::Unattended-Upgrade "0";
-'''
- config_path = '/etc/apt/apt.conf.d/20auto-upgrades'
- with open(config_path, 'w') as f:
- f.write(config_content)
- return {'success': True, 'message': 'Automatic updates disabled'}
-
- elif manager == 'dnf':
- ServiceControl.disable('dnf-automatic.timer', timeout=10)
- ServiceControl.stop('dnf-automatic.timer', timeout=10)
- return {'success': True, 'message': 'Automatic updates disabled'}
-
- return {'success': False, 'error': 'Unsupported package manager'}
-
- except Exception as e:
- return {'success': False, 'error': str(e)}
diff --git a/backend/app/services/waf_service.py b/backend/app/services/waf_service.py
index e1d13ad1..d3c27fca 100644
--- a/backend/app/services/waf_service.py
+++ b/backend/app/services/waf_service.py
@@ -1,6 +1,6 @@
"""Per-application WAF management (ModSecurity v3 + OWASP Core Rule Set).
-Mirrors :class:`~app.services.image_scanner_service.ImageScannerService`:
+Mirrors the serverkit-image-scan extension's ImageScannerService:
classmethods that shell out to install an external tool and return
``{'success': ...}`` dicts, degrading gracefully when the host lacks
ModSecurity. The rule/snippet renderers are pure functions so they are
diff --git a/backend/app/services/yara_rules/webshells.yar b/backend/app/services/yara_rules/webshells.yar
deleted file mode 100644
index 357826e9..00000000
--- a/backend/app/services/yara_rules/webshells.yar
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- ServerKit curated web-shell / injected-code indicators.
-
- These rules intentionally use regex atoms (not long literal strings) so
- this rules file itself is unlikely to trip other content scanners. The
- rule names MUST stay in sync with the builtin rule table in
- app/services/yara_scan_service.py — severity/description meta is resolved
- from that table when parsing CLI output.
-
- Note: php_in_image and htaccess_auto_prepend are contextual (they depend
- on the *filename*), which plain YARA cannot express; their matches are
- post-filtered by file extension/name in YaraScanService for both the CLI
- and the fallback engine.
-*/
-
-rule php_eval_base64
-{
- meta:
- name = "php_eval_base64"
- severity = "critical"
- description = "eval() of base64-decoded payload (classic obfuscated backdoor loader)"
- strings:
- $a = /eval\s*\(\s*@?\s*base64_[d]ecode\s*\(/ nocase
- condition:
- $a
-}
-
-rule php_gzinflate_base64
-{
- meta:
- name = "php_gzinflate_base64"
- severity = "critical"
- description = "gzinflate(base64_decode(...)) double-obfuscated payload"
- strings:
- $a = /gzinflate\s*\(\s*@?\s*base64_[d]ecode\s*\(/ nocase
- condition:
- $a
-}
-
-rule php_gzuncompress_base64
-{
- meta:
- name = "php_gzuncompress_base64"
- severity = "critical"
- description = "gzuncompress/str_rot13 of base64-decoded payload"
- strings:
- $a = /(gzuncompress|str_rot13)\s*\(\s*@?\s*base64_[d]ecode\s*\(/ nocase
- condition:
- $a
-}
-
-rule preg_replace_e_eval
-{
- meta:
- name = "preg_replace_e_eval"
- severity = "critical"
- description = "preg_replace() with the /e modifier (evaluates the replacement as PHP)"
- strings:
- $a = /preg_replace\s*\(\s*["'][^"']{0,60}\/[imsxu]{0,4}e[imsxu]{0,4}["']\s*,/ nocase
- condition:
- $a
-}
-
-rule assert_request_input
-{
- meta:
- name = "assert_request_input"
- severity = "critical"
- description = "assert() fed directly from request input (code execution primitive)"
- strings:
- $a = /assert\s*\(\s*@?\s*\$_(REQUEST|GET|POST|COOKIE)\b/ nocase
- condition:
- $a
-}
-
-rule system_request_input
-{
- meta:
- name = "system_request_input"
- severity = "critical"
- description = "system() executing raw request input"
- strings:
- $a = /system\s*\(\s*@?\s*\$_(REQUEST|GET|POST|COOKIE)\b/ nocase
- condition:
- $a
-}
-
-rule passthru_request_input
-{
- meta:
- name = "passthru_request_input"
- severity = "critical"
- description = "passthru() executing raw request input"
- strings:
- $a = /passthru\s*\(\s*@?\s*\$_(REQUEST|GET|POST|COOKIE)\b/ nocase
- condition:
- $a
-}
-
-rule shell_exec_request_input
-{
- meta:
- name = "shell_exec_request_input"
- severity = "critical"
- description = "shell_exec() executing raw request input"
- strings:
- $a = /shell_exec\s*\(\s*@?\s*\$_(REQUEST|GET|POST|COOKIE)\b/ nocase
- condition:
- $a
-}
-
-rule eval_request_input
-{
- meta:
- name = "eval_request_input"
- severity = "critical"
- description = "eval() fed directly from request input"
- strings:
- $a = /eval\s*\(\s*@?\s*\$_(REQUEST|GET|POST|COOKIE)\b/ nocase
- condition:
- $a
-}
-
-rule upload_chmod_777_combo
-{
- meta:
- name = "upload_chmod_777_combo"
- severity = "high"
- description = "move_uploaded_file combined with chmod 777 in the same file (dropper pattern)"
- strings:
- $a = /move_uploaded_file\s*\(/ nocase
- $b = /chmod\s*\([^)]{0,120}0?777/ nocase
- condition:
- $a and $b
-}
-
-rule c99_shell_marker
-{
- meta:
- name = "c99_shell_marker"
- severity = "critical"
- description = "c99 web shell family marker"
- strings:
- $a = /c99(sh(ell)?|_launcher|madshell)/ nocase
- condition:
- $a
-}
-
-rule r57_shell_marker
-{
- meta:
- name = "r57_shell_marker"
- severity = "critical"
- description = "r57 web shell family marker"
- strings:
- $a = /r57(shell|_tricks|\s+shell)/ nocase
- condition:
- $a
-}
-
-rule wso_shell_marker
-{
- meta:
- name = "wso_shell_marker"
- severity = "critical"
- description = "WSO (web shell by orb) family marker"
- strings:
- $a = /(wso_version|wsoshell|wso\s*2\.[0-9]|\$wso\b)/ nocase
- condition:
- $a
-}
-
-rule filesman_marker
-{
- meta:
- name = "filesman_marker"
- severity = "critical"
- description = "FilesMan backdoor file-manager marker"
- strings:
- $a = /Files[M]an/
- condition:
- $a
-}
-
-rule php_in_image
-{
- meta:
- name = "php_in_image"
- severity = "high"
- description = "PHP open tag inside an image file (.ico/.jpg/.png/...) - mismatched extension dropper"
- strings:
- $a = /<\?php/ nocase
- condition:
- $a
-}
-
-rule htaccess_auto_prepend
-{
- meta:
- name = "htaccess_auto_prepend"
- severity = "high"
- description = "auto_prepend_file injection via .htaccess/.user.ini (loads a payload before every request)"
- strings:
- $a = /auto_prepend_[f]ile/ nocase
- condition:
- $a
-}
diff --git a/backend/app/services/yara_scan_service.py b/backend/app/services/yara_scan_service.py
deleted file mode 100644
index 15b9d837..00000000
--- a/backend/app/services/yara_scan_service.py
+++ /dev/null
@@ -1,411 +0,0 @@
-"""
-YARA Web-Shell Scan Service
-
-Runs a curated web-shell / injected-code rule set against a path (typically an
-application docroot). Two engines, best-effort and Linux-friendly:
-
-* Real ``yara`` CLI when installed (adds support for arbitrary custom ``.yar``
- rule files dropped in :attr:`YaraScanService.CUSTOM_RULES_DIR`).
-* A built-in pure-Python fallback matcher covering the curated set, so the
- feature works everywhere without yara installed. Custom ``.yar`` files are
- NOT evaluated by the fallback (real YARA is required for those).
-
-The curated rules ship both as Python metadata (below — the source of truth
-for severity/description) and as ``yara_rules/webshells.yar`` for the CLI.
-Indicator strings in this module are assembled from fragments so this file
-does not itself trip content scanners.
-
-Result shape (both engines):
- [{'rule', 'severity', 'file', 'matched', 'description', 'source': 'yara'}]
-"""
-
-import os
-import re
-
-from app.utils.system import run_checked
-import logging
-from typing import Dict, List, Optional
-
-from app.utils.system import is_command_available
-
-logger = logging.getLogger(__name__)
-
-# Fragment-assembled indicators (keeps literal signatures out of this file).
-_B64 = 'base64_' + 'decode'
-_APF = 'auto_prepend_' + 'file'
-_FMAN = 'Files' + 'Man'
-
-_REQ_SOURCES = r'\$_(REQUEST|GET|POST|COOKIE)\b'
-
-# Extensions treated as scannable script/config content by the fallback engine.
-SCRIPT_EXTENSIONS = {
- '.php', '.phtml', '.php3', '.php4', '.php5', '.php7', '.phps',
- '.inc', '.cgi', '.pl', '.py', '.sh', '.js', '.html', '.htm', '.txt',
- '.ini', '.conf',
-}
-IMAGE_EXTENSIONS = {'.ico', '.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp', '.svg'}
-CONFIG_BASENAMES = {'.htaccess', '.user.ini'}
-
-# Contextual rules only apply to certain files. Applied as a post-filter for
-# BOTH engines (plain YARA cannot express filename conditions).
-FILE_CONSTRAINTS = {
- 'php_in_image': lambda p: os.path.splitext(p)[1].lower() in IMAGE_EXTENSIONS,
- 'htaccess_auto_prepend': lambda p: os.path.basename(p).lower() in CONFIG_BASENAMES,
-}
-
-# Curated builtin rules — source of truth for names/severity/description.
-# ``patterns`` are regexes; ``require_all`` means every pattern must match
-# (combo rules). Names match yara_rules/webshells.yar.
-BUILTIN_RULES: List[Dict] = [
- {
- 'name': 'php_eval_base64',
- 'severity': 'critical',
- 'description': 'eval() of base64-decoded payload (classic obfuscated backdoor loader)',
- 'patterns': [r'eval\s*\(\s*@?\s*' + _B64 + r'\s*\('],
- },
- {
- 'name': 'php_gzinflate_base64',
- 'severity': 'critical',
- 'description': 'gzinflate(base64_decode(...)) double-obfuscated payload',
- 'patterns': [r'gzinflate\s*\(\s*@?\s*' + _B64 + r'\s*\('],
- },
- {
- 'name': 'php_gzuncompress_base64',
- 'severity': 'critical',
- 'description': 'gzuncompress/str_rot13 of base64-decoded payload',
- 'patterns': [r'(gzuncompress|str_rot13)\s*\(\s*@?\s*' + _B64 + r'\s*\('],
- },
- {
- 'name': 'preg_replace_e_eval',
- 'severity': 'critical',
- 'description': 'preg_replace() with the /e modifier (evaluates the replacement as PHP)',
- 'patterns': [r'preg_replace\s*\(\s*["\'][^"\']{0,60}/[imsxu]{0,4}e[imsxu]{0,4}["\']\s*,'],
- },
- {
- 'name': 'assert_request_input',
- 'severity': 'critical',
- 'description': 'assert() fed directly from request input (code execution primitive)',
- 'patterns': [r'assert\s*\(\s*@?\s*' + _REQ_SOURCES],
- },
- {
- 'name': 'system_request_input',
- 'severity': 'critical',
- 'description': 'system() executing raw request input',
- 'patterns': [r'system\s*\(\s*@?\s*' + _REQ_SOURCES],
- },
- {
- 'name': 'passthru_request_input',
- 'severity': 'critical',
- 'description': 'passthru() executing raw request input',
- 'patterns': [r'passthru\s*\(\s*@?\s*' + _REQ_SOURCES],
- },
- {
- 'name': 'shell_exec_request_input',
- 'severity': 'critical',
- 'description': 'shell_exec() executing raw request input',
- 'patterns': [r'shell_exec\s*\(\s*@?\s*' + _REQ_SOURCES],
- },
- {
- 'name': 'eval_request_input',
- 'severity': 'critical',
- 'description': 'eval() fed directly from request input',
- 'patterns': [r'eval\s*\(\s*@?\s*' + _REQ_SOURCES],
- },
- {
- 'name': 'upload_chmod_777_combo',
- 'severity': 'high',
- 'description': 'move_uploaded_file combined with chmod 777 in the same file (dropper pattern)',
- 'patterns': [r'move_uploaded_file\s*\(', r'chmod\s*\([^)]{0,120}0?777'],
- 'require_all': True,
- },
- {
- 'name': 'c99_shell_marker',
- 'severity': 'critical',
- 'description': 'c99 web shell family marker',
- 'patterns': [r'c99(sh(ell)?|_launcher|madshell)'],
- },
- {
- 'name': 'r57_shell_marker',
- 'severity': 'critical',
- 'description': 'r57 web shell family marker',
- 'patterns': [r'r57(shell|_tricks|\s+shell)'],
- },
- {
- 'name': 'wso_shell_marker',
- 'severity': 'critical',
- 'description': 'WSO (web shell by orb) family marker',
- 'patterns': [r'(wso_version|wsoshell|wso\s*2\.[0-9]|\$wso\b)'],
- },
- {
- 'name': 'filesman_marker',
- 'severity': 'critical',
- 'description': 'FilesMan backdoor file-manager marker',
- 'patterns': [_FMAN],
- 'case_sensitive': True,
- },
- {
- 'name': 'php_in_image',
- 'severity': 'high',
- 'description': 'PHP open tag inside an image file (mismatched extension dropper)',
- 'patterns': [r'<\?php'],
- },
- {
- 'name': 'htaccess_auto_prepend',
- 'severity': 'high',
- 'description': 'auto_prepend_file injection via .htaccess/.user.ini',
- 'patterns': [_APF],
- },
-]
-
-_RULE_META = {r['name']: r for r in BUILTIN_RULES}
-
-
-class YaraScanService:
- """Curated YARA web-shell pass with a pure-Python fallback engine."""
-
- # Bundled curated rules for the real yara CLI.
- BUILTIN_RULES_FILE = os.path.join(os.path.dirname(__file__), 'yara_rules', 'webshells.yar')
- # Operator-supplied extra rules (real yara only). Class attr so it can be
- # pointed elsewhere (tests, containers).
- CUSTOM_RULES_DIR = os.environ.get('SERVERKIT_YARA_CUSTOM_DIR',
- '/var/serverkit/security/yara-custom')
- MAX_CUSTOM_RULE_SIZE = 64 * 1024 # 64 KB per .yar file
- MAX_SCAN_FILE_SIZE = 2 * 1024 * 1024 # fallback engine skips bigger files
- MAX_FILES = 50000 # fallback engine hard cap
- SNIPPET_CAP = 160 # matched-snippet length cap
-
- # ------------------------------------------------------------------ #
- # Engine selection
- # ------------------------------------------------------------------ #
- @classmethod
- def yara_available(cls) -> bool:
- return is_command_available('yara')
-
- @classmethod
- def engine(cls) -> str:
- return 'yara' if cls.yara_available() else 'fallback'
-
- # ------------------------------------------------------------------ #
- # Scanning
- # ------------------------------------------------------------------ #
- @classmethod
- def scan_path(cls, path: str) -> List[Dict]:
- """Run the curated rules (plus custom .yar with real yara) against
- ``path`` (file or directory). Returns the merged findings list."""
- if not os.path.exists(path):
- raise ValueError(f'Path not found: {path}')
-
- if cls.yara_available():
- findings = cls._scan_with_cli(path)
- else:
- findings = cls._scan_with_fallback(path)
-
- return [f for f in findings if cls._passes_file_constraint(f)]
-
- @classmethod
- def _passes_file_constraint(cls, finding: Dict) -> bool:
- constraint = FILE_CONSTRAINTS.get(finding.get('rule'))
- if constraint is None:
- return True
- try:
- return bool(constraint(finding.get('file') or ''))
- except Exception:
- return False
-
- # ---- real yara CLI ------------------------------------------------ #
- @classmethod
- def _rule_files(cls) -> List[str]:
- files = [cls.BUILTIN_RULES_FILE]
- try:
- if os.path.isdir(cls.CUSTOM_RULES_DIR):
- for name in sorted(os.listdir(cls.CUSTOM_RULES_DIR)):
- if name.endswith('.yar'):
- files.append(os.path.join(cls.CUSTOM_RULES_DIR, name))
- except OSError:
- pass
- return files
-
- @classmethod
- def _scan_with_cli(cls, path: str) -> List[Dict]:
- findings = []
- for rules_file in cls._rule_files():
- result = run_checked(['yara', '-r', '-s', '-w', rules_file, path],
- timeout=1800)
- if result['returncode'] is None:
- logger.warning('yara run failed for %s: %s', rules_file, result['error'])
- continue
- if result['returncode'] not in (0, 1):
- logger.warning('yara error on %s: %s', rules_file, result['error'][:300])
- continue
- findings.extend(cls._parse_cli_output(result['output']))
- return findings
-
- @classmethod
- def _parse_cli_output(cls, output: str) -> List[Dict]:
- """Parse ``yara -s`` output: ``rule file`` lines followed by
- ``0xOFFSET:$id: matched data`` lines."""
- findings = []
- current = None
- for line in output.splitlines():
- if not line:
- continue
- string_match = re.match(r'^0x[0-9a-fA-F]+:\$\w+:\s?(.*)$', line)
- if string_match and current is not None:
- if not current['matched']:
- current['matched'] = string_match.group(1)[:cls.SNIPPET_CAP]
- continue
- parts = line.split(' ', 1)
- if len(parts) == 2:
- rule_name, file_path = parts[0], parts[1].strip()
- meta = _RULE_META.get(rule_name, {})
- current = {
- 'rule': rule_name,
- 'severity': meta.get('severity', 'medium'),
- 'file': file_path,
- 'matched': '',
- 'description': meta.get('description', 'Custom YARA rule match'),
- 'source': 'yara',
- }
- findings.append(current)
- return findings
-
- # ---- pure-Python fallback ----------------------------------------- #
- @classmethod
- def _compiled_rules(cls) -> List[Dict]:
- compiled = []
- for rule in BUILTIN_RULES:
- flags = 0 if rule.get('case_sensitive') else re.IGNORECASE
- compiled.append({
- **rule,
- 'compiled': [re.compile(p, flags) for p in rule['patterns']],
- })
- return compiled
-
- @classmethod
- def _iter_candidate_files(cls, path: str):
- if os.path.isfile(path):
- yield path
- return
- count = 0
- for root, dirs, files in os.walk(path):
- dirs[:] = [d for d in dirs if d not in ('.git', 'node_modules')]
- for name in files:
- count += 1
- if count > cls.MAX_FILES:
- logger.warning('YARA fallback scan hit the %s-file cap under %s',
- cls.MAX_FILES, path)
- return
- yield os.path.join(root, name)
-
- @classmethod
- def _is_scannable(cls, file_path: str) -> bool:
- base = os.path.basename(file_path).lower()
- if base in CONFIG_BASENAMES:
- return True
- ext = os.path.splitext(file_path)[1].lower()
- return ext in SCRIPT_EXTENSIONS or ext in IMAGE_EXTENSIONS
-
- @classmethod
- def _scan_with_fallback(cls, path: str) -> List[Dict]:
- rules = cls._compiled_rules()
- findings = []
- for file_path in cls._iter_candidate_files(path):
- if not cls._is_scannable(file_path):
- continue
- try:
- if os.path.getsize(file_path) > cls.MAX_SCAN_FILE_SIZE:
- continue
- with open(file_path, 'r', encoding='utf-8', errors='ignore') as fh:
- content = fh.read()
- except (OSError, PermissionError):
- continue
- for rule in rules:
- matches = [rx.search(content) for rx in rule['compiled']]
- hit = all(matches) if rule.get('require_all') else any(matches)
- if not hit:
- continue
- first = next((m for m in matches if m), None)
- findings.append({
- 'rule': rule['name'],
- 'severity': rule['severity'],
- 'file': file_path,
- 'matched': (first.group(0) if first else '')[:cls.SNIPPET_CAP],
- 'description': rule['description'],
- 'source': 'yara',
- })
- return findings
-
- # ------------------------------------------------------------------ #
- # Rules management (builtin listing + custom .yar upload/delete)
- # ------------------------------------------------------------------ #
- _SAFE_NAME = re.compile(r'^[A-Za-z0-9._-]+$')
-
- @classmethod
- def list_rules(cls) -> Dict:
- builtin = [{'name': r['name'], 'severity': r['severity'],
- 'description': r['description']} for r in BUILTIN_RULES]
- custom = []
- try:
- if os.path.isdir(cls.CUSTOM_RULES_DIR):
- for name in sorted(os.listdir(cls.CUSTOM_RULES_DIR)):
- if not name.endswith('.yar'):
- continue
- full = os.path.join(cls.CUSTOM_RULES_DIR, name)
- try:
- stat = os.stat(full)
- custom.append({'name': name, 'size': stat.st_size})
- except OSError:
- continue
- except OSError:
- pass
- return {
- 'success': True,
- 'engine': cls.engine(),
- 'builtin': builtin,
- 'builtin_count': len(builtin),
- 'custom': custom,
- 'custom_rules_dir': cls.CUSTOM_RULES_DIR,
- # Fallback engine only evaluates the curated set; real yara
- # additionally loads custom .yar files.
- 'custom_rules_active': cls.yara_available(),
- }
-
- @classmethod
- def save_custom_rule(cls, filename: str, content: str) -> Dict:
- filename = (filename or '').strip()
- if not filename or not cls._SAFE_NAME.match(filename):
- return {'success': False, 'error': 'Invalid rule filename'}
- if not filename.endswith('.yar'):
- return {'success': False, 'error': 'Only .yar rule files are accepted'}
- if not content or not content.strip():
- return {'success': False, 'error': 'Rule content is empty'}
- if len(content.encode('utf-8', errors='ignore')) > cls.MAX_CUSTOM_RULE_SIZE:
- return {'success': False,
- 'error': f'Rule file exceeds {cls.MAX_CUSTOM_RULE_SIZE // 1024} KB limit'}
- if 'rule ' not in content:
- return {'success': False, 'error': 'Content does not look like a YARA rule file'}
- try:
- os.makedirs(cls.CUSTOM_RULES_DIR, exist_ok=True)
- full = os.path.join(cls.CUSTOM_RULES_DIR, filename)
- with open(full, 'w', encoding='utf-8') as fh:
- fh.write(content)
- return {'success': True, 'message': f'Rule file {filename} saved',
- 'custom_rules_active': cls.yara_available()}
- except OSError as exc:
- return {'success': False, 'error': str(exc)}
-
- @classmethod
- def delete_custom_rule(cls, filename: str) -> Dict:
- filename = (filename or '').strip()
- if not filename or not cls._SAFE_NAME.match(filename) or not filename.endswith('.yar'):
- return {'success': False, 'error': 'Invalid rule filename'}
- full = os.path.abspath(os.path.join(cls.CUSTOM_RULES_DIR, filename))
- if not full.startswith(os.path.abspath(cls.CUSTOM_RULES_DIR)):
- return {'success': False, 'error': 'Invalid rule path'}
- if not os.path.exists(full):
- return {'success': False, 'error': 'Rule file not found'}
- try:
- os.remove(full)
- return {'success': True, 'message': f'Rule file {filename} deleted'}
- except OSError as exc:
- return {'success': False, 'error': str(exc)}
diff --git a/backend/tests/test_malware_scan_job.py b/backend/tests/test_malware_scan_job.py
deleted file mode 100644
index ba4d60d4..00000000
--- a/backend/tests/test_malware_scan_job.py
+++ /dev/null
@@ -1,255 +0,0 @@
-"""Proving tests for the job-backed malware scan (security.malware_scan).
-
-Covers: enqueue via the API (202 + job_id), app-docroot resolution, the job
-handler flow with clamav/subprocess stubbed, YARA findings merged with a
-distinct source tag, quarantine (+ restore/delete) of a YARA finding, and
-auth. All fixture files are inert indicator strings in tmp_path.
-"""
-import os
-from unittest.mock import patch
-
-import pytest
-
-from app.exceptions import NotFoundError
-
-from app.jobs.models import Job
-from app.jobs.service import JobService, GROUP_SLUG, QUEUE_SLUG
-from app.jobs.consumer import JobConsumer
-from app.queue_bus.service import QueueBusService
-from app.services.malware_scan_service import MalwareScanService, MALWARE_SCAN_JOB_KIND
-from app.services.security_service import SecurityService
-
-EVAL_B64 = 'eval(' + 'base64_' + 'decode' + '($p));'
-PHP_TAG = '<?' + 'php'
-
-
[email protected](autouse=True)
-def isolated_bus(app, tmp_path):
- """Fresh broker + handler registration; keep scan logs/alerts in tmp."""
- QueueBusService.reset_broker()
- MalwareScanService.register_jobs()
- SecurityService._current_scan = None
- with patch.object(SecurityService, 'SCAN_LOG', str(tmp_path / 'scans.log')), \
- patch.object(SecurityService, 'ALERTS_LOG', str(tmp_path / 'alerts.log')), \
- patch('app.services.security_service.NotificationService') as notify:
- notify.send_all.return_value = None
- yield
- SecurityService._current_scan = None
-
-
-def docroot(tmp_path):
- root = tmp_path / 'site'
- root.mkdir()
- (root / 'shell.php').write_text(f'{PHP_TAG}\n{EVAL_B64}\n')
- (root / 'clean.php').write_text(f'{PHP_TAG} echo "ok";')
- return root
-
-
-def _make_app_row(name, root_path):
- from app import db
- from app.models import User
- from app.models.application import Application
- from werkzeug.security import generate_password_hash
- owner = User(email=f'{name}@test.local', username=f'owner-{name}',
- password_hash=generate_password_hash('x'), is_active=True)
- db.session.add(owner)
- db.session.flush()
- row = Application(name=name, app_type='php', root_path=root_path,
- user_id=owner.id)
- db.session.add(row)
- db.session.commit()
- return row
-
-
-def application(app, docroot):
- return _make_app_row('scan-me', str(docroot))
-
-
-def _drain_once():
- messages = QueueBusService.receive(GROUP_SLUG, QUEUE_SLUG, max_messages=1)
- assert messages, 'expected a queued job message'
- JobConsumer().process_message(messages[0])
- return messages[0]
-
-
-def _no_tools():
- """Patch both tool probes off: YARA falls back, ClamAV is skipped."""
- return (
- patch('app.services.malware_scan_service.is_command_available', return_value=False),
- patch('app.services.yara_scan_service.is_command_available', return_value=False),
- )
-
-
-class TestAppDocrootResolution:
- def test_resolves_root_path(self, application, docroot):
- assert MalwareScanService.resolve_app_path(application.id) == str(docroot)
-
- def test_unknown_app_raises(self, app):
- with pytest.raises(NotFoundError, match='not found'):
- MalwareScanService.resolve_app_path(999999)
-
- def test_missing_docroot_raises(self, app, tmp_path):
- row = _make_app_row('ghost', str(tmp_path / 'gone'))
- with patch('app.services.malware_scan_service.paths.APPS_DIR',
- str(tmp_path / 'no-apps')):
- with pytest.raises(NotFoundError, match='No docroot'):
- MalwareScanService.resolve_app_path(row.id)
-
-
-class TestScanJobFlow:
- def test_job_runs_yara_pass_without_clamav(self, application, docroot):
- p1, p2 = _no_tools()
- with p1, p2:
- job = MalwareScanService.enqueue_scan(app_id=application.id)
- _drain_once()
-
- refreshed = Job.query.get(job.id)
- assert refreshed.status == Job.STATUS_SUCCEEDED
- result = refreshed.get_result()
- assert result['status'] == 'completed'
- assert result['clamav_available'] is False
- assert result['yara_engine'] == 'fallback'
- assert result['counts']['yara'] >= 1
- assert result['counts']['clamav'] == 0
- yara_hits = [f for f in result['findings'] if f['source'] == 'yara']
- assert any(f['rule'] == 'php_eval_base64' and f['file'].endswith('shell.php')
- for f in yara_hits)
- # clean file untouched
- assert not any(f['file'].endswith('clean.php') for f in result['findings'])
-
- def test_clamav_findings_merged_with_distinct_source(self, application, docroot):
- infected = str(docroot / 'shell.php')
- clam_stdout = f'{infected}: Eicar-Test-Signature FOUND\n'
-
- class FakeCompleted:
- returncode = 1
- stdout = clam_stdout
- stderr = ''
-
- with patch('app.services.malware_scan_service.is_command_available', return_value=True), \
- patch('app.services.yara_scan_service.is_command_available', return_value=False), \
- patch('app.services.malware_scan_service.subprocess.run',
- return_value=FakeCompleted()) as run_mock:
- job = MalwareScanService.enqueue_scan(app_id=application.id)
- _drain_once()
-
- assert run_mock.called
- assert run_mock.call_args[0][0][0] == 'clamscan'
- result = Job.query.get(job.id).get_result()
- sources = {f['source'] for f in result['findings']}
- assert sources == {'yara', 'clamav'}
- clam = [f for f in result['findings'] if f['source'] == 'clamav']
- assert clam[0]['rule'] == 'Eicar-Test-Signature'
- assert clam[0]['severity'] == 'critical'
- assert result['counts']['clamav'] == 1
-
- def test_job_status_mirrored_to_scan_status(self, application):
- p1, p2 = _no_tools()
- with p1, p2:
- MalwareScanService.enqueue_scan(app_id=application.id)
- _drain_once()
- status = SecurityService.get_scan_status()
- assert status['status'] == 'completed'
- assert status['job_id'] is not None
- assert status['findings']
-
- def test_payload_with_raw_path(self, app, docroot):
- p1, p2 = _no_tools()
- with p1, p2:
- job = JobService.enqueue(MALWARE_SCAN_JOB_KIND, {'path': str(docroot)})
- _drain_once()
- result = Job.query.get(job.id).get_result()
- assert result['directory'] == str(docroot)
- assert result['counts']['yara'] >= 1
-
- def test_empty_payload_fails_job(self, app):
- job = JobService.enqueue(MALWARE_SCAN_JOB_KIND, {}, max_attempts=1)
- _drain_once()
- refreshed = Job.query.get(job.id)
- assert refreshed.status == Job.STATUS_FAILED
- assert 'path or app_id' in (refreshed.error_message or '')
-
-
-class TestQuarantineOfYaraFinding:
- @pytest.fixture
- def quarantine_cfg(self, tmp_path):
- qdir = tmp_path / 'quarantine'
- config = SecurityService.get_config()
- config['clamav']['quarantine_path'] = str(qdir)
- with patch.object(SecurityService, 'get_config', classmethod(lambda cls: config)):
- yield qdir
-
- def test_quarantine_restore_delete_roundtrip(self, app, docroot, quarantine_cfg):
- p1, p2 = _no_tools()
- with p1, p2:
- report = MalwareScanService.execute_scan(str(docroot))
- finding = next(f for f in report['findings'] if f['rule'] == 'php_eval_base64')
-
- # Quarantine the YARA finding via the existing mechanics
- result = SecurityService.quarantine_file(finding['file'])
- assert result['success'] is True
- assert not os.path.exists(finding['file'])
-
- listed = SecurityService.get_quarantined_files()
- assert len(listed['files']) == 1
- entry = listed['files'][0]
- assert entry['original_path'] == os.path.abspath(finding['file'])
-
- # Restore puts it back
- restored = SecurityService.restore_quarantined_file(entry['name'])
- assert restored['success'] is True
- assert os.path.exists(finding['file'])
- assert SecurityService.get_quarantined_files()['files'] == []
-
- # Quarantine again, then delete permanently
- SecurityService.quarantine_file(finding['file'])
- entry = SecurityService.get_quarantined_files()['files'][0]
- deleted = SecurityService.delete_quarantined_file(entry['name'])
- assert deleted['success'] is True
- assert SecurityService.get_quarantined_files()['files'] == []
-
- def test_restore_without_meta_errors(self, app, quarantine_cfg):
- qdir = quarantine_cfg
- qdir.mkdir(parents=True, exist_ok=True)
- (qdir / 'legacy.quarantine').write_text('x')
- result = SecurityService.restore_quarantined_file('legacy.quarantine')
- assert result['success'] is False
- assert 'Original location unknown' in result['error']
-
-
-class TestScanApi:
- def test_scan_app_returns_202_job(self, client, auth_headers, application):
- p1, p2 = _no_tools()
- with p1, p2:
- resp = client.post(f'/api/v1/security/scan/app/{application.id}',
- headers=auth_headers)
- assert resp.status_code == 202
- body = resp.get_json()
- assert body['job_id']
- assert body['kind'] == MALWARE_SCAN_JOB_KIND
- assert Job.query.get(body['job_id']) is not None
-
- def test_scan_app_unknown_id_404(self, client, auth_headers):
- resp = client.post('/api/v1/security/scan/app/424242', headers=auth_headers)
- assert resp.status_code == 404
- assert 'error' in resp.get_json()
-
- def test_scan_app_requires_auth(self, client, application):
- resp = client.post(f'/api/v1/security/scan/app/{application.id}')
- assert resp.status_code in (401, 422)
-
- def test_scan_job_path_endpoint(self, client, auth_headers, docroot):
- resp = client.post('/api/v1/security/scan/job', headers=auth_headers,
- json={'path': str(docroot)})
- assert resp.status_code == 202
- assert resp.get_json()['job_id']
-
- def test_scan_job_requires_path(self, client, auth_headers):
- resp = client.post('/api/v1/security/scan/job', headers=auth_headers, json={})
- assert resp.status_code == 400
-
- def test_quarantine_restore_endpoint_requires_auth(self, client):
- resp = client.post('/api/v1/security/quarantine/x.quarantine/restore')
- assert resp.status_code in (401, 422)
diff --git a/backend/tests/test_security_clamav.py b/backend/tests/test_security_clamav.py
deleted file mode 100644
index 55a9ead3..00000000
--- a/backend/tests/test_security_clamav.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""Proving tests for the ClamAV start endpoint.
-
-`install_clamav` does not start the daemon, so the Security Overview posture
-exposes a one-click "Start service" fix backed by POST /security/clamav/start.
-These tests pin its wiring without touching systemctl: ServiceControl is mocked,
-so they run on any OS (the service layer itself is Linux-only).
-"""
-from types import SimpleNamespace
-from unittest.mock import patch
-
-
-def _completed(returncode=0):
- return SimpleNamespace(returncode=returncode, stdout='', stderr='')
-
-
-def test_start_clamav_success(client, auth_headers):
- """A daemon that comes up active returns 200 + success."""
- with patch('app.services.security_service.ServiceControl') as svc:
- svc.enable.return_value = _completed()
- svc.start.return_value = _completed()
- svc.is_active.return_value = True
-
- resp = client.post('/api/v1/security/clamav/start', headers=auth_headers)
-
- assert resp.status_code == 200
- body = resp.get_json()
- assert body['success'] is True
- svc.start.assert_called() # we actually attempted the start
-
-
-def test_start_clamav_failure_when_inactive(client, auth_headers):
- """systemctl returns 0 but the unit never goes active -> 400, no false success."""
- with patch('app.services.security_service.ServiceControl') as svc:
- svc.enable.return_value = _completed()
- svc.start.return_value = _completed(returncode=0)
- svc.is_active.return_value = False
-
- resp = client.post('/api/v1/security/clamav/start', headers=auth_headers)
-
- assert resp.status_code == 400
- assert resp.get_json()['success'] is False
-
-
-def test_start_clamav_requires_auth(client):
- """Unauthenticated callers cannot start services."""
- resp = client.post('/api/v1/security/clamav/start')
- assert resp.status_code in (401, 422)
diff --git a/backend/tests/test_security_scan_jobs.py b/backend/tests/test_security_scan_jobs.py
deleted file mode 100644
index 475e4aa6..00000000
--- a/backend/tests/test_security_scan_jobs.py
+++ /dev/null
@@ -1,163 +0,0 @@
-"""Job-convergence tests for image CVE scans and Lynis audits."""
-
-from unittest.mock import patch
-
-import pytest
-
-from app import db
-from app.jobs.consumer import JobConsumer
-from app.jobs.models import Job
-from app.jobs.service import GROUP_SLUG, QUEUE_SLUG
-from app.models import Application, ImageVulnerabilityScan, User
-from app.queue_bus.service import QueueBusService
-from app.services.image_scanner_service import (
- IMAGE_SCAN_JOB_KIND,
- ImageScannerService,
-)
-from app.services.security_service import LYNIS_SCAN_JOB_KIND, SecurityService
-
-
[email protected](autouse=True)
-def isolated_jobs(app):
- QueueBusService.reset_broker()
- ImageScannerService.register_jobs()
- SecurityService.register_jobs()
- SecurityService._lynis_scan = None
- yield
- SecurityService._lynis_scan = None
-
-
-def image_app(app):
- owner = User(
- username='image-owner',
- password_hash='unused',
- is_active=True,
- )
- db.session.add(owner)
- db.session.flush()
- application = Application(
- name='image-scan-app',
- app_type='docker',
- docker_image='registry.example.test/demo:latest',
- user_id=owner.id,
- )
- db.session.add(application)
- db.session.commit()
- return application
-
-
-def _drain_once():
- messages = QueueBusService.receive(GROUP_SLUG, QUEUE_SLUG, max_messages=1)
- assert messages, 'expected one queued job'
- JobConsumer().process_message(messages[0])
-
-
-def test_image_scan_keeps_legacy_fields_and_runs_as_a_job(image_app, monkeypatch):
- grype = {
- 'descriptor': {'version': '1.2.3'},
- 'matches': [{
- 'vulnerability': {
- 'id': 'CVE-TEST-1',
- 'severity': 'High',
- 'fix': {'versions': ['2.0']},
- },
- 'artifact': {'name': 'demo', 'version': '1.0', 'type': 'deb'},
- }],
- }
- monkeypatch.setattr(
- ImageScannerService,
- '_run_grype',
- classmethod(lambda cls, image_ref: {'success': True, 'data': grype}),
- )
-
- response = ImageScannerService.scan_application(image_app.id)
-
- assert response['success'] is True
- assert response['status'] == 'running'
- assert response['scan_id']
- assert response['job_id']
- assert response['kind'] == IMAGE_SCAN_JOB_KIND
- job = db.session.get(Job, response['job_id'])
- assert job.owner_type == 'application'
- assert job.owner_id == str(image_app.id)
- assert job.get_payload()['scan_id'] == response['scan_id']
-
- _drain_once()
-
- job = db.session.get(Job, response['job_id'])
- scan = db.session.get(ImageVulnerabilityScan, response['scan_id'])
- assert job.status == Job.STATUS_SUCCEEDED
- assert job.get_result()['scan_id'] == scan.id
- assert scan.status == 'completed'
- assert scan.scanner_version == '1.2.3'
- assert scan.get_counts()['high'] == 1
- assert scan.get_findings()[0]['id'] == 'CVE-TEST-1'
-
-
-def test_image_scan_api_preserves_200_and_adds_job_identity(
- client, auth_headers, image_app, monkeypatch):
- monkeypatch.setattr(
- ImageScannerService,
- '_run_grype',
- classmethod(lambda cls, image_ref: {'success': True, 'data': {'matches': []}}),
- )
- response = client.post(
- f'/api/v1/security/image-scans/applications/{image_app.id}',
- headers=auth_headers,
- )
- assert response.status_code == 200
- body = response.get_json()
- assert {'scan_id', 'status', 'job_id', 'kind'} <= set(body)
- assert body['kind'] == IMAGE_SCAN_JOB_KIND
-
-
-def test_lynis_scan_runs_as_a_job_and_status_remains_compatible(monkeypatch):
- monkeypatch.setattr(
- SecurityService,
- 'get_lynis_status',
- classmethod(lambda cls: {'installed': True, 'version': '3.1'}),
- )
-
- class Completed:
- returncode = 0
- stderr = ''
- stdout = '\n'.join([
- 'Warning: test warning',
- 'Suggestion: test suggestion',
- 'Hardening index : 72 [############## ]',
- ])
-
- monkeypatch.setattr('app.services.security_service.subprocess.run',
- lambda *args, **kwargs: Completed())
-
- response = SecurityService.run_lynis_scan()
- assert response['success'] is True
- assert response['status'] == 'running'
- assert response['job_id']
- assert response['kind'] == LYNIS_SCAN_JOB_KIND
-
- _drain_once()
-
- job = db.session.get(Job, response['job_id'])
- status = SecurityService.get_lynis_scan_status()
- assert job.status == Job.STATUS_SUCCEEDED
- assert status['status'] == 'completed'
- assert status['job_id'] == job.id
- assert status['job_status'] == Job.STATUS_SUCCEEDED
- assert status['hardening_index'] == 72
- assert status['warnings'] == ['Warning: test warning']
- assert status['suggestions'] == ['Suggestion: test suggestion']
-
-
-def test_lynis_rejects_a_second_active_job(monkeypatch):
- monkeypatch.setattr(
- SecurityService,
- 'get_lynis_status',
- classmethod(lambda cls: {'installed': True, 'version': '3.1'}),
- )
- first = SecurityService.run_lynis_scan()
- second = SecurityService.run_lynis_scan()
- assert first['success'] is True
- assert second == {'success': False, 'error': 'A scan is already in progress'}
diff --git a/backend/tests/test_security_suite_extraction.py b/backend/tests/test_security_suite_extraction.py
new file mode 100644
index 00000000..9789efe9
--- /dev/null
+++ b/backend/tests/test_security_suite_extraction.py
@@ -0,0 +1,249 @@
+"""Prove the security-suite split (plan 47 Ph3b-4 / plan 55 Phase 3).
+
+The install-gated security tools left core for standalone extensions
+(serverkit-clamav, serverkit-fail2ban, serverkit-lynis, serverkit-auto-updates,
+serverkit-image-scan). A core panel keeps only the zero-host-package baseline:
+status/config, legacy integrity, suspicious activity, events, SSH keys, IP
+lists, the audit and scoped FIM. These tests pin the absent-extension shape —
+the moved prefixes 404 (blueprint never registered, so routing wins before
+auth), the core surfaces still answer, and the probes core kept (fail2ban
+status on Fail2banJailService) still drive Setup Health and the audit.
+"""
+import pytest
+
+from app.services.security_service import SecurityService
+from app.services.fail2ban_jail_service import Fail2banJailService
+
+
+# Route paths that moved to security extensions, one representative per
+# extension surface. On a lean panel every one of them is unrouted (404).
+MOVED_ROUTE_PREFIXES = [
+ '/api/v1/security/clamav/status', # serverkit-clamav
+ '/api/v1/security/scan/status', # serverkit-clamav
+ '/api/v1/security/quarantine', # serverkit-clamav
+ '/api/v1/security/yara/rules', # serverkit-clamav
+ '/api/v1/security/fail2ban/status', # serverkit-fail2ban
+ '/api/v1/security/lynis/status', # serverkit-lynis
+ '/api/v1/security/auto-updates/status', # serverkit-auto-updates
+ '/api/v1/security/image-scans/install', # serverkit-image-scan
+ '/api/v1/security/sboms/1', # serverkit-image-scan
+]
+
+
+def test_moved_security_routes_are_unrouted(app):
+ rules = {r.rule for r in app.url_map.iter_rules()}
+ for path in MOVED_ROUTE_PREFIXES:
+ static_prefix = path.replace('/1', '')
+ offenders = [r for r in rules if r.startswith(static_prefix)]
+ assert not offenders, f'{path}: still routed in core: {offenders}'
+
+
+def test_moved_route_404s_before_auth(client):
+ """No blueprint => plain 404, no auth prompt, no 500."""
+ for path in MOVED_ROUTE_PREFIXES:
+ resp = client.get(path)
+ assert resp.status_code == 404, f'{path} -> {resp.status_code}'
+
+
+def test_core_security_routes_survive(app):
+ rules = {r.rule for r in app.url_map.iter_rules()}
+ for path in [
+ '/api/v1/security/status',
+ '/api/v1/security/config',
+ '/api/v1/security/audit',
+ '/api/v1/security/events',
+ '/api/v1/security/failed-logins',
+ '/api/v1/security/ssh-keys',
+ '/api/v1/security/ip-lists',
+ '/api/v1/security/integrity/check',
+ '/api/v1/security/fim',
+ ]:
+ assert path in rules, f'{path} missing from the lean core surface'
+
+
+def test_security_summary_is_core_only(app):
+ """The summary no longer reaches for scanner state the core doesn't own."""
+ with app.app_context():
+ summary = SecurityService.get_security_summary()
+ assert 'clamav' not in summary
+ assert 'scan_status' not in summary
+ # Core-owned fields stay.
+ assert 'file_integrity' in summary
+ assert 'recent_alerts' in summary
+ assert 'notifications_enabled' in summary
+
+
+def test_security_service_shed_the_moved_buckets():
+ """The moved tool methods are gone from the core service (no zombies)."""
+ for gone in [
+ 'get_clamav_status', 'install_clamav', 'scan_directory',
+ 'quarantine_file', 'get_fail2ban_status', 'install_fail2ban',
+ 'ban_ip', 'get_lynis_status', 'run_lynis_scan',
+ 'get_auto_updates_status', 'register_jobs',
+ ]:
+ assert not hasattr(SecurityService, gone), f'SecurityService.{gone} still exists'
+
+
+def test_jail_service_owns_the_fail2ban_probes():
+ """Core seam: probes + unban live on the jail write-half service."""
+ for kept in ['get_fail2ban_status', 'get_fail2ban_jail_status', 'unban_ip']:
+ assert hasattr(Fail2banJailService, kept), f'Fail2banJailService.{kept} missing'
+
+
+def test_moved_services_left_the_tree():
+ for module in [
+ 'app.services.malware_scan_service',
+ 'app.services.yara_scan_service',
+ 'app.services.image_scanner_service',
+ ]:
+ with pytest.raises(ImportError):
+ __import__(module)
+
+
+def test_no_core_registration_of_extension_job_kinds(app):
+ """The three scanner job kinds register via the extensions' manifest
+ `jobs` key — a lean core must not have them (a queued job on a panel
+ whose extension was removed fails loudly instead of running stale code).
+ """
+ from app.jobs import registry
+ for kind in ('security.malware_scan', 'security.lynis_scan', 'security.image_scan'):
+ assert not registry.is_registered(kind), f'{kind} registered in lean core'
+
+
+def test_image_scan_models_stay_core():
+ """Core data seam (plan 52 D1): the extension reads/writes core tables."""
+ from app.models import ImageVulnerabilityScan, SbomArtifact
+ assert ImageVulnerabilityScan.__tablename__ == 'image_vulnerability_scans'
+ assert SbomArtifact.__tablename__ == 'sbom_artifacts'
+
+
+# ---------------------------------------------------------------------------
+# Upgrade parity: run_registry_auto_install (the GATED_BUILTIN_SLUGS analogue
+# for registry-only security extensions).
+# ---------------------------------------------------------------------------
+
+def _reset_registry_marker(app):
+ from app.services.settings_service import SettingsService
+ with app.app_context():
+ SettingsService.set('extensions.registry_auto_installed_slugs', '')
+
+
+def test_registry_auto_install_defers_until_entry_published(app, monkeypatch):
+ """Host tool present + entry unpublished => no burn, retried next boot."""
+ from app.services import extension_migration as em
+
+ _reset_registry_marker(app)
+ monkeypatch.setattr(em, '_looks_like_existing_install', lambda: True)
+ monkeypatch.setattr(em, 'REGISTRY_GATED_SLUGS',
+ {'serverkit-fail2ban': lambda: True})
+ from app.services import registry_service
+ monkeypatch.setattr(registry_service, 'get_entry', lambda slug: None)
+
+ with app.app_context():
+ em.run_registry_auto_install()
+ assert 'serverkit-fail2ban' not in em._registry_processed_slugs()
+
+
+def test_registry_auto_install_installs_once_when_published(app, monkeypatch):
+ from app.services import extension_migration as em
+
+ _reset_registry_marker(app)
+ monkeypatch.setattr(em, '_looks_like_existing_install', lambda: True)
+ monkeypatch.setattr(em, 'REGISTRY_GATED_SLUGS',
+ {'serverkit-fail2ban': lambda: True})
+ from app.services import registry_service
+ monkeypatch.setattr(registry_service, 'get_entry',
+ lambda slug: {'slug': slug, 'source': 'https://x/z.zip'})
+
+ calls = []
+ from app.services import plugin_service
+ monkeypatch.setattr(plugin_service, 'install_registry_extension',
+ lambda slug, user_id=None: calls.append(slug))
+
+ with app.app_context():
+ em.run_registry_auto_install()
+ assert calls == ['serverkit-fail2ban']
+ assert 'serverkit-fail2ban' in em._registry_processed_slugs()
+ # Second run: marked, nothing reinstalls.
+ em.run_registry_auto_install()
+ assert calls == ['serverkit-fail2ban']
+
+
+def test_registry_auto_install_skips_fresh_installs(app, monkeypatch):
+ from app.services import extension_migration as em
+
+ _reset_registry_marker(app)
+ monkeypatch.setattr(em, '_looks_like_existing_install', lambda: False)
+ monkeypatch.setattr(em, 'REGISTRY_GATED_SLUGS',
+ {'serverkit-clamav': lambda: True})
+
+ with app.app_context():
+ em.run_registry_auto_install()
+ # Marked done without installing — fresh installs use the wizard.
+ assert 'serverkit-clamav' in em._registry_processed_slugs()
+
+
+def test_registry_auto_install_tool_absent_marks_done(app, monkeypatch):
+ from app.services import extension_migration as em
+
+ _reset_registry_marker(app)
+ monkeypatch.setattr(em, '_looks_like_existing_install', lambda: True)
+ monkeypatch.setattr(em, 'REGISTRY_GATED_SLUGS',
+ {'serverkit-lynis': lambda: False})
+
+ with app.app_context():
+ em.run_registry_auto_install()
+ assert 'serverkit-lynis' in em._registry_processed_slugs()
+
+
+# ---------------------------------------------------------------------------
+# Wizard round 2 (plan 47 Ph5): security posture.
+# ---------------------------------------------------------------------------
+
+def test_security_posture_levels_shape():
+ from app.services.plugin_service import SECURITY_POSTURE_LEVELS
+ assert set(SECURITY_POSTURE_LEVELS) == {'minimal', 'recommended', 'hardened'}
+ assert SECURITY_POSTURE_LEVELS['minimal'] == []
+ # hardened is a superset of recommended
+ assert set(SECURITY_POSTURE_LEVELS['recommended']) <= set(
+ SECURITY_POSTURE_LEVELS['hardened'])
+
+
+def test_recommend_security_extensions_drops_unpublished(app):
+ """With the bundled index (no security extensions published yet) every
+ level resolves to only what the catalog can install — no dead buttons."""
+ from app.services.plugin_service import (
+ SECURITY_POSTURE_LEVELS, recommend_security_extensions)
+ with app.app_context():
+ for level in SECURITY_POSTURE_LEVELS:
+ resolved = recommend_security_extensions(level)
+ slugs = {e['slug'] for e in resolved}
+ assert slugs <= set(SECURITY_POSTURE_LEVELS[level])
+ for entry in resolved:
+ assert entry.get('display_name')
+
+
+def test_recommendations_endpoint_carries_postures(client, auth_headers):
+ resp = client.get('/api/v1/plugins/recommendations', headers=auth_headers)
+ assert resp.status_code == 200
+ body = resp.get_json()
+ assert set(body.get('security_postures', {})) == {
+ 'minimal', 'recommended', 'hardened'}
+
+
+def test_complete_onboarding_persists_posture(client, auth_headers, app):
+ resp = client.post('/api/v1/auth/complete-onboarding', headers=auth_headers,
+ json={'use_cases': [], 'security_posture': 'hardened'})
+ assert resp.status_code == 200
+ from app.services.settings_service import SettingsService
+ with app.app_context():
+ assert SettingsService.get('onboarding_security_posture') == 'hardened'
+
+
+def test_complete_onboarding_invalid_posture_falls_back(client, auth_headers, app):
+ resp = client.post('/api/v1/auth/complete-onboarding', headers=auth_headers,
+ json={'use_cases': [], 'security_posture': 'yolo'})
+ assert resp.status_code == 200
+ from app.services.settings_service import SettingsService
+ with app.app_context():
+ assert SettingsService.get('onboarding_security_posture') == 'minimal'
diff --git a/backend/tests/test_setup_health.py b/backend/tests/test_setup_health.py
index 29d860f0..29a4538e 100644
--- a/backend/tests/test_setup_health.py
+++ b/backend/tests/test_setup_health.py
@@ -213,8 +213,8 @@ def fake_firewall(monkeypatch, **status):
def fake_fail2ban(monkeypatch, **status):
- from app.services.security_service import SecurityService
- monkeypatch.setattr(SecurityService, 'get_fail2ban_status',
+ from app.services.fail2ban_jail_service import Fail2banJailService
+ monkeypatch.setattr(Fail2banJailService, 'get_fail2ban_status',
classmethod(lambda cls: status))
diff --git a/backend/tests/test_yara_scan.py b/backend/tests/test_yara_scan.py
deleted file mode 100644
index f3536d9c..00000000
--- a/backend/tests/test_yara_scan.py
+++ /dev/null
@@ -1,194 +0,0 @@
-"""Proving tests for the YARA web-shell pass (YaraScanService).
-
-Fixture "malware" files contain fragment-assembled indicator strings only —
-they never execute and are planted in tmp_path. The pure-Python fallback
-matcher is forced (yara CLI patched absent) so these run on any OS.
-"""
-import os
-from unittest.mock import patch
-
-import pytest
-
-from app.services.yara_scan_service import YaraScanService
-
-
-# Assemble indicators from fragments so this test file doesn't itself carry
-# literal signatures.
-EVAL_B64 = 'eval(' + 'base64_' + 'decode' + '($x));'
-GZ_B64 = 'gzinflate(' + 'base64_' + 'decode' + '($y));'
-PHP_TAG = '<?' + 'php'
-APF = 'auto_prepend_' + 'file'
-FMAN = 'Files' + 'Man'
-
-
[email protected](autouse=True)
-def force_fallback():
- """Force the pure-Python engine regardless of the host having yara."""
- with patch('app.services.yara_scan_service.is_command_available', return_value=False):
- yield
-
-
-def docroot(tmp_path):
- (tmp_path / 'shell.php').write_text(f'{PHP_TAG}\n{EVAL_B64}\n')
- (tmp_path / 'packed.php').write_text(f'{PHP_TAG} {GZ_B64}')
- (tmp_path / 'clean.php').write_text(
- f'{PHP_TAG}\necho "hello";\n$data = base64_encode("ok");\n')
- (tmp_path / 'favicon.ico').write_text(f'{PHP_TAG} echo 1;')
- (tmp_path / '.htaccess').write_text(f'php_value {APF} "/tmp/x.php"\n')
- (tmp_path / 'dropper.php').write_text(
- f'{PHP_TAG}\nmove_uploaded_file($f, $d);\nchmod($d, 0777);\n')
- (tmp_path / 'manager.php').write_text(f'{PHP_TAG} // {FMAN} v2')
- return tmp_path
-
-
-class TestFallbackMatcher:
- def test_engine_is_fallback_without_yara(self):
- assert YaraScanService.yara_available() is False
- assert YaraScanService.engine() == 'fallback'
-
- def test_detections_and_severities(self, docroot):
- findings = YaraScanService.scan_path(str(docroot))
- by_rule = {}
- for f in findings:
- by_rule.setdefault(f['rule'], []).append(f)
-
- assert 'php_eval_base64' in by_rule
- assert by_rule['php_eval_base64'][0]['severity'] == 'critical'
- assert by_rule['php_eval_base64'][0]['file'].endswith('shell.php')
-
- assert 'php_gzinflate_base64' in by_rule
- assert by_rule['php_gzinflate_base64'][0]['severity'] == 'critical'
-
- assert 'upload_chmod_777_combo' in by_rule
- assert by_rule['upload_chmod_777_combo'][0]['severity'] == 'high'
-
- assert 'filesman_marker' in by_rule
-
- # All findings share the result shape + source tag
- for f in findings:
- assert f['source'] == 'yara'
- assert set(f) >= {'rule', 'severity', 'file', 'matched', 'description'}
- assert len(f['matched']) <= YaraScanService.SNIPPET_CAP
-
- def test_no_false_positive_on_clean_file(self, docroot):
- findings = YaraScanService.scan_path(str(docroot))
- assert not any(f['file'].endswith('clean.php') for f in findings)
-
- def test_php_in_image_only_fires_on_images(self, docroot):
- findings = YaraScanService.scan_path(str(docroot))
- img = [f for f in findings if f['rule'] == 'php_in_image']
- assert len(img) == 1
- assert img[0]['file'].endswith('favicon.ico')
- assert img[0]['severity'] == 'high'
-
- def test_htaccess_auto_prepend_scoped_to_config_files(self, docroot):
- findings = YaraScanService.scan_path(str(docroot))
- apf = [f for f in findings if f['rule'] == 'htaccess_auto_prepend']
- assert len(apf) == 1
- assert os.path.basename(apf[0]['file']) == '.htaccess'
-
- def test_single_file_scan(self, docroot):
- findings = YaraScanService.scan_path(str(docroot / 'shell.php'))
- assert any(f['rule'] == 'php_eval_base64' for f in findings)
-
- def test_missing_path_raises(self, tmp_path):
- with pytest.raises(ValueError):
- YaraScanService.scan_path(str(tmp_path / 'nope'))
-
- def test_matched_snippet_capped(self, tmp_path):
- payload = 'eval( ' + 'base64_' + 'decode' + '(' + 'A' * 500 + '));'
- (tmp_path / 'big.php').write_text(f'{PHP_TAG} {payload}')
- findings = YaraScanService.scan_path(str(tmp_path))
- assert findings
- assert all(len(f['matched']) <= YaraScanService.SNIPPET_CAP for f in findings)
-
-
-class TestCliOutputParser:
- def test_parse_rule_and_snippet_lines(self):
- out = (
- 'php_eval_base64 /var/www/site/shell.php\n'
- '0x1c:$a: ' + 'eval(base64_' + 'decode' + '(\n'
- 'custom_rule_x /var/www/site/other.php\n'
- )
- findings = YaraScanService._parse_cli_output(out)
- assert findings[0]['rule'] == 'php_eval_base64'
- assert findings[0]['severity'] == 'critical'
- assert findings[0]['matched'].startswith('eval(')
- # Unknown (custom) rules get a default severity
- assert findings[1]['rule'] == 'custom_rule_x'
- assert findings[1]['severity'] == 'medium'
-
-
-class TestCustomRulesManagement:
- @pytest.fixture(autouse=True)
- def custom_dir(self, tmp_path):
- with patch.object(YaraScanService, 'CUSTOM_RULES_DIR', str(tmp_path / 'custom')):
- yield tmp_path / 'custom'
-
- def test_save_and_list_and_delete(self, custom_dir):
- content = 'rule my_rule { strings: $a = "abc" condition: $a }'
- result = YaraScanService.save_custom_rule('mine.yar', content)
- assert result['success'] is True
- listing = YaraScanService.list_rules()
- assert listing['builtin_count'] >= 10
- assert any(c['name'] == 'mine.yar' for c in listing['custom'])
- assert listing['engine'] == 'fallback'
-
- deleted = YaraScanService.delete_custom_rule('mine.yar')
- assert deleted['success'] is True
- assert not (custom_dir / 'mine.yar').exists()
-
- def test_rejects_non_yar_extension(self):
- result = YaraScanService.save_custom_rule('evil.php', 'rule x {condition: true}')
- assert result['success'] is False
- assert '.yar' in result['error']
-
- def test_rejects_oversized_rule(self):
- content = 'rule big { condition: true } //' + 'x' * (YaraScanService.MAX_CUSTOM_RULE_SIZE + 1)
- result = YaraScanService.save_custom_rule('big.yar', content)
- assert result['success'] is False
-
- def test_rejects_path_traversal_names(self):
- assert YaraScanService.save_custom_rule('../esc.yar', 'rule x {condition: true}')['success'] is False
- assert YaraScanService.delete_custom_rule('../../etc.yar')['success'] is False
-
- def test_rejects_non_rule_content(self):
- result = YaraScanService.save_custom_rule('junk.yar', 'just some text')
- assert result['success'] is False
-
-
-class TestYaraRulesApi:
- @pytest.fixture(autouse=True)
- def custom_dir(self, tmp_path):
- with patch.object(YaraScanService, 'CUSTOM_RULES_DIR', str(tmp_path / 'custom')):
- yield
-
- def test_list_requires_auth(self, client):
- resp = client.get('/api/v1/security/yara/rules')
- assert resp.status_code in (401, 422)
-
- def test_list_rules(self, client, auth_headers):
- resp = client.get('/api/v1/security/yara/rules', headers=auth_headers)
- assert resp.status_code == 200
- body = resp.get_json()
- assert body['builtin_count'] >= 10
- assert any(r['name'] == 'php_eval_base64' for r in body['builtin'])
-
- def test_upload_rejects_php(self, client, auth_headers):
- resp = client.post('/api/v1/security/yara/rules', headers=auth_headers,
- json={'filename': 'shell.php', 'content': 'rule x {condition: true}'})
- assert resp.status_code == 400
- assert 'error' in resp.get_json()
-
- def test_upload_and_delete_roundtrip(self, client, auth_headers):
- resp = client.post('/api/v1/security/yara/rules', headers=auth_headers,
- json={'filename': 'ops.yar',
- 'content': 'rule ops { strings: $a = "zz" condition: $a }'})
- assert resp.status_code == 200
-
- resp = client.get('/api/v1/security/yara/rules', headers=auth_headers)
- assert any(c['name'] == 'ops.yar' for c in resp.get_json()['custom'])
-
- resp = client.delete('/api/v1/security/yara/rules/ops.yar', headers=auth_headers)
- assert resp.status_code == 200
diff --git a/docs/API_SURFACE.md b/docs/API_SURFACE.md
index 181d5ee6..9b1bacfe 100644
--- a/docs/API_SURFACE.md
+++ b/docs/API_SURFACE.md
@@ -90,9 +90,7 @@ Regenerate (backend/):
- `DELETE /registrars/connections/{cid}`
- `DELETE /secrets/{secret_id}`
- `DELETE /security/ip-lists/{list_type}/{ip}`
-- `DELETE /security/quarantine/{filename}`
- `DELETE /security/ssh-keys/{key_id}`
-- `DELETE /security/yara/rules/{filename}`
- `DELETE /server-templates/assignments/{assignment_id}`
- `DELETE /server-templates/{template_id}`
- `DELETE /servers/groups/{group_id}`
@@ -536,30 +534,14 @@ Regenerate (backend/):
- `GET /search`
- `GET /secrets/{secret_id}`
- `GET /security/audit`
-- `GET /security/auto-updates/status`
-- `GET /security/clamav/status`
- `GET /security/config`
- `GET /security/events`
-- `GET /security/fail2ban/bans`
-- `GET /security/fail2ban/jails/{jail}`
-- `GET /security/fail2ban/status`
- `GET /security/failed-logins`
- `GET /security/fim`
-- `GET /security/image-scans/applications/{application_id}`
-- `GET /security/image-scans/applications/{application_id}/deploy-gate`
-- `GET /security/image-scans/{scan_id}`
- `GET /security/integrity/check`
- `GET /security/ip-lists`
-- `GET /security/lynis/scan/status`
-- `GET /security/lynis/status`
-- `GET /security/quarantine`
-- `GET /security/sboms/applications/{application_id}`
-- `GET /security/sboms/{sbom_id}`
-- `GET /security/scan/history`
-- `GET /security/scan/status`
- `GET /security/ssh-keys`
- `GET /security/status`
-- `GET /security/yara/rules`
- `GET /server-templates/`
- `GET /server-templates/compliance`
- `GET /server-templates/library`
@@ -1168,36 +1150,12 @@ Regenerate (backend/):
- `POST /restore-points/{point_id}/preview`
- `POST /restore-points/{point_id}/restore`
- `POST /secrets/{secret_id}/reveal`
-- `POST /security/auto-updates/disable`
-- `POST /security/auto-updates/enable`
-- `POST /security/auto-updates/install`
-- `POST /security/clamav/install`
-- `POST /security/clamav/start`
-- `POST /security/clamav/update`
-- `POST /security/fail2ban/ban`
-- `POST /security/fail2ban/install`
-- `POST /security/fail2ban/unban`
- `POST /security/fim/{scope}/accept`
- `POST /security/fim/{scope}/baseline`
- `POST /security/fim/{scope}/check`
-- `POST /security/image-scans/applications/{application_id}`
-- `POST /security/image-scans/install`
- `POST /security/integrity/initialize`
- `POST /security/ip-lists/{list_type}`
-- `POST /security/lynis/install`
-- `POST /security/lynis/scan`
-- `POST /security/quarantine`
-- `POST /security/quarantine/{filename}/restore`
-- `POST /security/sboms/applications/{application_id}`
-- `POST /security/scan/app/{app_id}`
-- `POST /security/scan/cancel`
-- `POST /security/scan/directory`
-- `POST /security/scan/file`
-- `POST /security/scan/full`
-- `POST /security/scan/job`
-- `POST /security/scan/quick`
- `POST /security/ssh-keys`
-- `POST /security/yara/rules`
- `POST /server-templates/`
- `POST /server-templates/assignments/{assignment_id}/check`
- `POST /server-templates/assignments/{assignment_id}/remediate`
diff --git a/frontend/src/components/security/AutoUpdatesTab.jsx b/frontend/src/components/security/AutoUpdatesTab.jsx
deleted file mode 100644
index 958f84f6..00000000
--- a/frontend/src/components/security/AutoUpdatesTab.jsx
+++ /dev/null
@@ -1,143 +0,0 @@
-import { useState, useEffect } from 'react';
-import { AlertTriangle } from 'lucide-react';
-import api from '../../services/api';
-import { useToast } from '../../contexts/ToastContext';
-import EmptyState from '@/components/EmptyState';
-import { Button } from '@/components/ui/button';
-import { Pill } from '@/components/ds';
-import { useTranslation } from 'react-i18next';
-
-const AutoUpdatesTab = () => {
- const { t } = useTranslation();
- const [status, setStatus] = useState(null);
- const [loading, setLoading] = useState(true);
- const [actionLoading, setActionLoading] = useState(false);
- const toast = useToast();
-
- useEffect(() => {
- loadStatus();
- }, []);
-
- const loadStatus = async () => {
- setLoading(true);
- try {
- const data = await api.getAutoUpdatesStatus();
- setStatus(data);
- } catch (error) {
- console.error('Failed to load auto-updates status:', error);
- } finally {
- setLoading(false);
- }
- };
-
- const handleInstall = async () => {
- setActionLoading(true);
- try {
- await api.installAutoUpdates();
- toast.success(t('app.autoUpdatesTab.autoUpdatesPackageInstalled', 'Auto-updates package installed'));
- await loadStatus();
- } catch (error) {
- toast.error(t('app.autoUpdatesTab.failedToInstall', 'Failed to install: {{message}}', { message: error.message }));
- } finally {
- setActionLoading(false);
- }
- };
-
- const handleEnable = async () => {
- setActionLoading(true);
- try {
- await api.enableAutoUpdates();
- toast.success(t('app.autoUpdatesTab.automaticUpdatesEnabled', 'Automatic updates enabled'));
- await loadStatus();
- } catch (error) {
- toast.error(t('app.autoUpdatesTab.failedToEnable', 'Failed to enable: {{message}}', { message: error.message }));
- } finally {
- setActionLoading(false);
- }
- };
-
- const handleDisable = async () => {
- setActionLoading(true);
- try {
- await api.disableAutoUpdates();
- toast.success(t('app.autoUpdatesTab.automaticUpdatesDisabled', 'Automatic updates disabled'));
- await loadStatus();
- } catch (error) {
- toast.error(t('app.autoUpdatesTab.failedToDisable', 'Failed to disable: {{message}}', { message: error.message }));
- } finally {
- setActionLoading(false);
- }
- };
-
- if (loading) {
- return <div className="loading-sm">{t('app.autoUpdatesTab.loadingAutoUpdatesStatus', 'Loading auto-updates status…')}</div>;
- }
-
- if (!status?.supported) {
- return (
- <div className="auto-updates-tab">
- <EmptyState
- icon={AlertTriangle}
- title={t('app.autoUpdatesTab.notSupported', 'Not Supported')}
- description={t('app.autoUpdatesTab.automaticSecurityUpdatesAreNotSupported', 'Automatic security updates are not supported on this system.')}
- />
- </div>
- );
- }
-
- return (
- <div className="auto-updates-tab">
- <div className="card">
- <div className="card-header">
- <h3>{t('app.autoUpdatesTab.automaticSecurityUpdates', 'Automatic Security Updates')}</h3>
- <Button variant="outline" size="sm" onClick={loadStatus}>{t('common.actions.refresh', 'Refresh')}</Button>
- </div>
- <div className="card-body">
- <div className="sec-rows">
- <div className="sk-info-row">
- <span className="k">{t('app.autoUpdatesTab.package', 'Package')}</span>
- <span className="v">{status.package}</span>
- </div>
- <div className="sk-info-row">
- <span className="k">{t('app.autoUpdatesTab.installed', 'Installed')}</span>
- <Pill kind={status.installed ? 'green' : 'amber'}>
- {status.installed ? 'Yes' : 'No'}
- </Pill>
- </div>
- <div className="sk-info-row">
- <span className="k">{t('common.labels.status', 'Status')}</span>
- <Pill kind={status.enabled ? 'green' : 'gray'}>
- {status.enabled ? 'Enabled' : 'Disabled'}
- </Pill>
- </div>
- </div>
-
- <div className="auto-updates-actions">
- {!status.installed ? (
- <Button variant="default" onClick={handleInstall} disabled={actionLoading}>
- {actionLoading ? 'Installing...' : 'Install Auto-Updates'}
- </Button>
- ) : status.enabled ? (
- <Button variant="secondary" onClick={handleDisable} disabled={actionLoading}>
- {actionLoading ? 'Disabling...' : 'Disable Auto-Updates'}
- </Button>
- ) : (
- <Button variant="default" onClick={handleEnable} disabled={actionLoading}>
- {actionLoading ? 'Enabling...' : 'Enable Auto-Updates'}
- </Button>
- )}
- </div>
-
- <div className="sec-note">
- <p>
- <strong>{t('app.autoUpdatesTab.whatAreAutomaticSecurityUpdates', 'What are automatic security updates?')}</strong><br/>
- {t('app.autoUpdatesTab.whenEnabledYourServerWillAutomatically', 'When enabled, your server will automatically download and install security updates, helping protect against known vulnerabilities without manual intervention.')}
- </p>
- </div>
- </div>
- </div>
- </div>
- );
-};
-
-export default AutoUpdatesTab;
diff --git a/frontend/src/components/security/Fail2banTab.jsx b/frontend/src/components/security/Fail2banTab.jsx
deleted file mode 100644
index 3c9dce87..00000000
--- a/frontend/src/components/security/Fail2banTab.jsx
+++ /dev/null
@@ -1,390 +0,0 @@
-import { useState, useEffect, useMemo } from 'react';
-import { Ban, Shield } from 'lucide-react';
-import api from '../../services/api';
-import { useToast } from '../../contexts/ToastContext';
-import { useConfirm } from '@/hooks/useConfirm';
-import EmptyState from '@/components/EmptyState';
-import Modal from '../Modal';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
-import { Label } from '@/components/ui/label';
-import { DataTable, DataTableFooter, Pill } from '@/components/ds';
-import {
- useTableChrome, GridViewPicker, GridChips, GridFilterButton,
- GridToolsMenu, GridFilterDrawer, applyFilters,
-} from '@/components/ds/grid';
-import { useTableSort } from '@/hooks/useTableSort';
-import { useColumnVisibility } from '@/hooks/useColumnVisibility';
-import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select';
-import { useTranslation } from 'react-i18next';
-
-// Fail2ban's own default jail name since 0.9, and the one this tab's Ban modal
-// pre-selects — so it is the value a preset can actually count on being there.
-const SSH_JAIL = 'sshd';
-
-// Built-in saved views. A ban row is only { ip, jail }, so the jail is the one
-// axis worth slicing: SSH is where the internet-wide noise lands, and everything
-// else is a jail someone configured on purpose and should be reading.
-const FAIL2BAN_VIEWS = [
- {
- // The drive-by traffic. Usually the longest list on the page and the
- // one you scan for a source you recognise rather than act on row by row.
- name: 'SSH bans',
- state: {
- sorts: [{ key: 'ip', direction: 'asc' }],
- hiddenKeys: [],
- columnFilters: {
- match: 'all',
- rules: [{ id: 'f2b1', field: 'jail', op: 'any', value: [SSH_JAIL] }],
- },
- },
- },
- {
- // Everything the SSH view buries: web-auth, WordPress and per-app jails.
- // A ban here means something reached an application, so it is the half
- // worth reading first. Jail before IP, so each jail stays together.
- name: 'App & web jail bans',
- state: {
- sorts: [{ key: 'jail', direction: 'asc' }, { key: 'ip', direction: 'asc' }],
- hiddenKeys: [],
- columnFilters: {
- match: 'all',
- rules: [{ id: 'f2b2', field: 'jail', op: 'none', value: [SSH_JAIL] }],
- },
- },
- },
-];
-
-const Fail2banTab = () => {
- const { t } = useTranslation();
- const [status, setStatus] = useState(null);
- const [bans, setBans] = useState([]);
- const [jailStats, setJailStats] = useState({});
- const [loading, setLoading] = useState(true);
- const [actionLoading, setActionLoading] = useState(false);
- const [showBanModal, setShowBanModal] = useState(false);
- const [banIP, setBanIP] = useState('');
- const [banJail, setBanJail] = useState('sshd');
- const toast = useToast();
- const { confirm } = useConfirm();
- const { sorts, setSorts } = useTableSort({ storageKey: 'serverkit-table-fail2ban-bans-sort' });
- const {
- hiddenKeys, setHiddenKeys,
- } = useColumnVisibility({ storageKey: 'serverkit-table-fail2ban-bans-cols' });
-
- useEffect(() => {
- loadData();
- }, []);
-
- const loadData = async () => {
- setLoading(true);
- try {
- const [statusData, bansData] = await Promise.all([
- api.getFail2banStatus(),
- api.getAllFail2banBans().catch(() => ({ banned_ips: [] }))
- ]);
- setStatus(statusData);
- setBans(bansData.banned_ips || []);
-
- if (statusData?.installed && statusData.jails?.length) {
- const entries = await Promise.all(
- statusData.jails.map(async (jail) => {
- try {
- return [jail, await api.getFail2banJailStatus(jail)];
- } catch {
- return [jail, null];
- }
- })
- );
- setJailStats(Object.fromEntries(entries));
- } else {
- setJailStats({});
- }
- } catch (error) {
- console.error('Failed to load Fail2ban data:', error);
- } finally {
- setLoading(false);
- }
- };
-
- const handleInstall = async () => {
- setActionLoading(true);
- try {
- await api.installFail2ban();
- toast.success(t('app.fail2banTab.fail2banInstalledSuccessfully', 'Fail2ban installed successfully'));
- await loadData();
- } catch (error) {
- toast.error(t('app.fail2banTab.failedToInstall', 'Failed to install: {{message}}', { message: error.message }));
- } finally {
- setActionLoading(false);
- }
- };
-
- const handleBan = async () => {
- if (!banIP.trim()) return;
- setActionLoading(true);
- try {
- await api.fail2banBan(banIP, banJail);
- toast.success(t('app.fail2banTab.ipBannedIn', 'IP {{banIP}} banned in {{banJail}}', { banIP: banIP, banJail: banJail }));
- setShowBanModal(false);
- setBanIP('');
- await loadData();
- } catch (error) {
- toast.error(t('app.fail2banTab.failedToBanIp', 'Failed to ban IP: {{message}}', { message: error.message }));
- } finally {
- setActionLoading(false);
- }
- };
-
- const handleUnban = async (ip, jail) => {
- const confirmed = await confirm({
- title: t('app.fail2banTab.unbanIp', 'Unban IP'),
- message: t('app.fail2banTab.areYouSureYouWantTo', 'Are you sure you want to unban {{ip}} from {{jail}}?', { ip: ip, jail: jail }),
- confirmText: t('app.fail2banTab.unban', 'Unban'),
- variant: 'warning',
- });
- if (!confirmed) return;
- try {
- await api.fail2banUnban(ip, jail);
- toast.success(t('app.fail2banTab.ipUnbanned', 'IP {{ip}} unbanned', { ip: ip }));
- await loadData();
- } catch (error) {
- toast.error(t('app.fail2banTab.failedToUnban', 'Failed to unban: {{message}}', { message: error.message }));
- }
- };
-
- // Cell markup/classNames identical to the hand-rolled table they replace.
- // Declared above the loading guard now: the chrome below is a hook, so it
- // cannot sit behind an early return.
- const banColumns = [
- {
- key: 'ip',
- headerKey: 'common.labels.ipAddress', header: 'IP Address',
- sortable: true,
- hideable: false,
- sortValue: (ban) => ban.ip || '',
- cellClassName: 'sk-cell-mono sec-ip--red',
- render: (ban) => ban.ip,
- },
- {
- key: 'jail',
- headerKey: 'app.fail2banTab.jail', header: 'Jail',
- sortable: true,
- // Declared, not inferred: a host with two jails and two bans fails
- // the enum cardinality test and would fall back to text, which
- // turns the jail pick-list into a typed fragment and both views
- // above into no-ops. `value` is what the rules read.
- type: 'enum',
- value: (ban) => ban.jail || '',
- sortValue: (ban) => ban.jail || '',
- render: (ban) => <span className="sk-tag">{ban.jail}</span>,
- },
- {
- key: 'actions',
- headerKey: 'common.labels.actions', header: 'Actions',
- sortable: false,
- hideable: false,
- render: (ban) => (
- <Button variant="secondary" size="sm" onClick={() => handleUnban(ban.ip, ban.jail)}>
- {t('app.fail2banTab.unban', 'Unban')}
- </Button>
- ),
- },
- ];
-
- // Scoped to this table, not to Security as a page: one tab is mounted at a
- // time, so a picker at the page heading would sit above whichever tab
- // happened to be open. No `urlScope` — the bans table is the only one on
- // this tab, so its links keep the plain ?view= names.
- const chrome = useTableChrome({
- columns: banColumns,
- rows: bans,
- viewPageKey: 'security-fail2ban',
- builtinViews: FAIL2BAN_VIEWS,
- noun: 'bans',
- sorts,
- setSorts,
- hiddenKeys,
- setHiddenKeys,
- });
-
- // DataTable applies the column rules itself, so the count has to be
- // re-derived here or a view that narrows to two rows still claims the total.
- const shownBans = useMemo(
- () => applyFilters(bans, chrome.cfg.filters, chrome.columns),
- [bans, chrome.cfg.filters, chrome.columns],
- );
-
- if (loading) {
- return <div className="loading-sm">{t('app.fail2banTab.loadingFail2banStatus', 'Loading Fail2ban status…')}</div>;
- }
-
- return (
- <div className="fail2ban-tab">
- {!status?.installed ? (
- <EmptyState
- icon={Shield}
- title={t('app.fail2banTab.fail2banNotInstalled', 'Fail2ban Not Installed')}
- description={t('app.fail2banTab.installFail2banToProtectAgainstBrute', 'Install Fail2ban to protect against brute force attacks.')}
- action={(
- <Button variant="default" onClick={handleInstall} disabled={actionLoading}>
- {actionLoading ? 'Installing...' : 'Install Fail2ban'}
- </Button>
- )}
- />
- ) : (
- <>
- <div className="card">
- <div className="card-header">
- <h3>{t('app.fail2banTab.fail2banStatus', 'Fail2ban Status')}</h3>
- <div className="card-actions">
- <Button variant="default" size="sm" onClick={() => setShowBanModal(true)}>
- {t('app.fail2banTab.banIp', 'Ban IP')}
- </Button>
- <Button variant="outline" size="sm" onClick={loadData}>
- {t('common.actions.refresh', 'Refresh')}
- </Button>
- </div>
- </div>
- <div className="card-body">
- <div className="sec-rows">
- <div className="sk-info-row">
- <span className="k">{t('common.labels.service', 'Service')}</span>
- <Pill kind={status.service_running ? 'green' : 'red'}>
- {status.service_running ? 'Running' : 'Stopped'}
- </Pill>
- </div>
- <div className="sk-info-row">
- <span className="k">{t('common.labels.version', 'Version')}</span>
- <span className="v">{status.version || 'Unknown'}</span>
- </div>
- <div className="sk-info-row">
- <span className="k">{t('app.fail2banTab.activeJails', 'Active jails')}</span>
- {status.jails?.length > 0 ? (
- <span className="sec-chiprow">
- {status.jails.map((jail) => (
- <span key={jail} className="sk-tag">{jail}</span>
- ))}
- </span>
- ) : (
- <span className="v">{t('app.fail2banTab.none', 'None')}</span>
- )}
- </div>
- <div className="sk-info-row">
- <span className="k">{t('app.fail2banTab.totalBannedIps', 'Total banned IPs')}</span>
- <span className={`v ${bans.length > 0 ? 'sec-v-amber' : ''}`}>{bans.length}</span>
- </div>
- </div>
- </div>
- </div>
-
- {status.jails?.length > 0 && (
- <div className="f2b-jails">
- {status.jails.map((jail) => {
- const s = jailStats[jail] || {};
- return (
- <div className="f2b-jail" key={jail}>
- <div className="f2b-jail__name"><Ban size={15} />{jail}</div>
- <div className="f2b-jail__stats">
- <div className="f2b-jail__stat">
- <div className="f2b-jail__v f2b-jail__v--amber">{s.currently_banned ?? '—'}</div>
- <div className="f2b-jail__l">{t('app.fail2banTab.banned', 'Banned')}</div>
- </div>
- <div className="f2b-jail__stat">
- <div className="f2b-jail__v">{s.currently_failed ?? '—'}</div>
- <div className="f2b-jail__l">{t('common.state.failed', 'Failed')}</div>
- </div>
- <div className="f2b-jail__stat">
- <div className="f2b-jail__v">{s.total_banned ?? '—'}</div>
- <div className="f2b-jail__l">{t('app.fail2banTab.totalBanned', 'Total banned')}</div>
- </div>
- </div>
- </div>
- );
- })}
- </div>
- )}
-
- {/* The view name replaces the old "Banned IPs" <h3>: it is
- the same heading slot, and it now says WHICH bans you
- are looking at rather than just that they are bans. */}
- <GridViewPicker
- views={chrome.views}
- label="bans"
- onCreate={chrome.createView}
- actions={(
- <>
- <GridFilterButton
- count={chrome.filterCount}
- onClick={() => chrome.setDrawerOpen(true)}
- />
- <GridToolsMenu {...chrome.toolsProps} onRefresh={loadData} />
- </>
- )}
- />
-
- <GridChips {...chrome.chipProps} />
-
- {bans.length === 0 ? (
- <div className="card">
- <p className="text-muted">{t('app.fail2banTab.noIpsAreCurrentlyBanned', 'No IPs are currently banned.')}</p>
- </div>
- ) : (
- <div className="card sec-flush">
- <DataTable
- columns={chrome.columns}
- data={bans}
- keyField={(ban) => `${ban.ip}-${ban.jail}`}
- sorts={sorts}
- onSortsChange={setSorts}
- {...chrome.tableProps}
- footer={(
- <DataTableFooter
- shown={shownBans.length}
- total={bans.length}
- noun="banned IP"
- />
- )}
- />
- </div>
- )}
- </>
- )}
-
- <GridFilterDrawer {...chrome.drawerProps} />
-
- <Modal open={showBanModal} onClose={() => setShowBanModal(false)} title={t('app.fail2banTab.banIpAddress', 'Ban IP Address')}>
- <div className="form-group">
- <Label>{t('common.labels.ipAddress', 'IP Address')}</Label>
- <Input
- type="text"
- value={banIP}
- onChange={(e) => setBanIP(e.target.value)}
- placeholder="192.168.1.100"
- />
- </div>
- <div className="form-group">
- <Label>{t('app.fail2banTab.jail', 'Jail')}</Label>
- <Select value={banJail} onValueChange={setBanJail}>
- <SelectTrigger>
- <SelectValue />
- </SelectTrigger>
- <SelectContent>
- {status?.jails?.map(jail => (
- <SelectItem key={jail} value={jail}>{jail}</SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
- <div className="modal-footer">
- <Button variant="outline" onClick={() => setShowBanModal(false)}>{t('common.actions.cancel', 'Cancel')}</Button>
- <Button variant="destructive" onClick={handleBan} disabled={actionLoading || !banIP.trim()}>
- {actionLoading ? 'Banning...' : 'Ban IP'}
- </Button>
- </div>
- </Modal>
- </div>
- );
-};
-
-export default Fail2banTab;
diff --git a/frontend/src/components/security/OverviewTab.jsx b/frontend/src/components/security/OverviewTab.jsx
index d3e916f4..096dc9ea 100644
--- a/frontend/src/components/security/OverviewTab.jsx
+++ b/frontend/src/components/security/OverviewTab.jsx
@@ -1,6 +1,8 @@
import { statusKind } from '@/components/ds/status';
import { useState } from 'react';
+import { Link } from 'react-router-dom';
import api from '../../services/api';
+import { useContributions } from '@/plugins/contributions';
import { Button } from '@/components/ui/button';
import { Pill, ScoreGauge, KpiBand, MetricCard } from '@/components/ds';
import { useTranslation } from 'react-i18next';
@@ -15,13 +17,11 @@ import {
Radar,
} from 'lucide-react';
-const capitalize = (s) => (s ? s.charAt(0).toUpperCase() + s.slice(1) : s);
-
// Status glyph per check state — paired with the label so state never relies on
// color alone (color-blind operators), per the product a11y bar.
const STATE_ICON = { pass: CheckCircle2, warn: AlertTriangle, unknown: Circle };
-const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefresh, onNavigateTab }) => {
+const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
const { t } = useTranslation();
// One action runs at a time; `busyKey` names it so only that row spins and
// the rest disable (no double-submits against the same daemon).
@@ -31,7 +31,12 @@ const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefresh, onNavigat
const alerts = status?.recent_alerts || {};
const integrity = status?.file_integrity || {};
const integrityChanges = alerts.integrity_changes || 0;
- const scanRunning = status?.scan_status === 'running';
+
+ // Do any installed extensions contribute Security tabs? When none do, the
+ // footer offers the Marketplace instead of hardcoding per-tool nag rows —
+ // the plan 47 Ph3e degradation: core posture stays core-only.
+ const { tabs: contributedTabs } = useContributions();
+ const hasSecurityExtensions = (contributedTabs || []).some((tab) => tab.group === 'security');
async function runFix(key, fn) {
setBusyKey(key);
@@ -46,33 +51,12 @@ const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefresh, onNavigat
}
}
- // Posture checks — real boolean signals from this tab's props. Each failing
+ // Posture checks — real boolean signals from this tab's props, core-owned
+ // features only (malware scanning / fail2ban / lynis / auto-updates render
+ // their own state in their extensions' tabs when installed). Each failing
// check carries a `fix`: a server action (re-pulls status on success) or a
- // `nav` jump to the tab that resolves it. Checks that can't be evaluated yet
- // (ClamAV still loading) stay 'unknown' and are excluded from the score.
+ // `nav` jump to the tab that resolves it.
const checks = [
- {
- key: 'clamav-install',
- labelKey: 'app.overviewTab.clamavAntivirusInstalled', label: 'ClamAV antivirus installed',
- state: clamavLoading ? 'unknown' : (clamavStatus?.installed ? 'pass' : 'warn'),
- detail: clamavLoading ? 'checking…' : (clamavStatus?.installed ? 'installed' : 'not installed'),
- fix: !clamavLoading && !clamavStatus?.installed
- ? { labelKey: 'app.overviewTab.installClamav', label: 'Install ClamAV', run: () => api.installClamAV() }
- : null,
- },
- {
- key: 'clamav-service',
- labelKey: 'app.overviewTab.clamavServiceRunning', label: 'ClamAV service running',
- state: clamavLoading || !clamavStatus?.installed
- ? 'unknown'
- : (clamavStatus?.service_running ? 'pass' : 'warn'),
- detail: clamavLoading
- ? 'checking…'
- : (!clamavStatus?.installed ? 'n/a' : (clamavStatus?.service_running ? 'running' : 'stopped')),
- fix: !clamavLoading && clamavStatus?.installed && !clamavStatus?.service_running
- ? { labelKey: 'app.overviewTab.startService', label: 'Start service', run: () => api.startClamAV() }
- : null,
- },
{
key: 'integrity-enabled',
labelKey: 'app.overviewTab.fileIntegrityMonitoringEnabled', label: 'File integrity monitoring enabled',
@@ -128,10 +112,9 @@ const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefresh, onNavigat
const kpis = [
{ key: 'alerts', icon: Siren, value: alerts.total || 0, labelKey: 'app.overviewTab.alerts24h', label: 'Alerts · 24h', tone: alerts.total > 0 ? 'amber' : 'green' },
{ key: 'malware', icon: Bug, value: alerts.malware_detections || 0, labelKey: 'app.overviewTab.malware', label: 'Malware', tone: alerts.malware_detections > 0 ? 'red' : 'green' },
- { key: 'scan', icon: Radar, value: capitalize(status?.scan_status) || 'Idle', labelKey: 'app.overviewTab.scan', label: 'Scan', tone: scanRunning ? 'cyan' : 'accent' },
+ { key: 'integrity', icon: Radar, value: integrityChanges, labelKey: 'app.overviewTab.integrityChanges', label: 'Integrity · 24h', tone: integrityChanges > 0 ? 'amber' : 'green' },
];
- const defsUpdated = clamavStatus?.last_update ? new Date(clamavStatus.last_update).toLocaleDateString() : null;
const busy = busyKey !== null;
return (
@@ -209,19 +192,11 @@ const OverviewTab = ({ status, clamavStatus, clamavLoading, onRefresh, onNavigat
</div>
<p className="sec-hint sec-posture__foot">
- {clamavStatus?.installed && (
+ {!hasSecurityExtensions && (
<>
- {t('app.overviewTab.virusDefinitions', 'Virus definitions')} {defsUpdated ? `updated ${defsUpdated}` : 'status unknown'}
- {' · '}
- <Button
- variant="link"
- size="sm"
- className="sec-posture__inline"
- onClick={() => runFix('defs', () => api.updateVirusDefinitions())}
- disabled={busy}
- >
- {busyKey === 'defs' ? 'Updating…' : 'Update definitions'}
- </Button>
+ {t('app.overviewTab.moreSecurityTools', 'More security tools — malware scanning, brute-force protection, vulnerability scans, auto-updates — are available as extensions in the')}
+ {' '}
+ <Link to="/marketplace">{t('app.overviewTab.marketplaceLink', 'Marketplace')}</Link>
{'. '}
</>
)}
diff --git a/frontend/src/components/security/QuarantineTab.jsx b/frontend/src/components/security/QuarantineTab.jsx
deleted file mode 100644
index ceb68c5e..00000000
--- a/frontend/src/components/security/QuarantineTab.jsx
+++ /dev/null
@@ -1,292 +0,0 @@
-import { useState, useEffect, useMemo } from 'react';
-import { ShieldCheck } from 'lucide-react';
-import api from '../../services/api';
-import EmptyState from '@/components/EmptyState';
-import { Button } from '@/components/ui/button';
-import { DataTable, DataTableFooter } from '@/components/ds';
-import {
- useTableChrome, GridViewPicker, GridChips, GridFilterButton,
- GridToolsMenu, GridFilterDrawer, applyFilters,
-} from '@/components/ds/grid';
-import { useTableSort } from '@/hooks/useTableSort';
-import { useColumnVisibility } from '@/hooks/useColumnVisibility';
-import { formatBytes } from '@/utils/formatBytes';
-import { useConfirm } from '@/hooks/useConfirm';
-import { useTranslation } from 'react-i18next';
-
-// Built-in saved views. Three, because the quarantine list only ever answers
-// three questions: what did the last scan catch, what is filling the
-// quarantine directory, and which of these can still be put back.
-//
-// Every rule matches a column's `value` accessor (ds/grid/fields.js), never
-// `sortValue` — see the `quarantined` column for why that distinction bites.
-const NO_RULES = { match: 'all', rules: [] };
-
-const QUARANTINE_VIEWS = [
- {
- // The landing view: quarantine is an event log, so the newest catch is
- // the one nobody has looked at yet.
- name: 'Newest first',
- state: {
- sorts: [{ key: 'quarantined', direction: 'desc' }],
- hiddenKeys: [],
- columnFilters: NO_RULES,
- },
- },
- {
- // Nothing ages out of quarantine on its own, so this is the view you
- // open when the partition holding it starts to fill.
- name: 'Largest first',
- state: {
- sorts: [{ key: 'size', direction: 'desc' }],
- hiddenKeys: [],
- columnFilters: NO_RULES,
- },
- },
- {
- // Restore needs the sidecar that recorded where the file came from —
- // without it the Restore button is dead and delete is the only move.
- // The rule is "an absolute path was recorded": the quarantine service
- // writes os.path.abspath(), and a row with no sidecar reads '', which
- // starts with nothing.
- name: 'Restorable',
- state: {
- sorts: [{ key: 'quarantined', direction: 'desc' }],
- hiddenKeys: [],
- columnFilters: {
- match: 'all',
- rules: [{ id: 'qr1', field: 'original', op: 'starts', value: '/' }],
- },
- },
- },
-];
-
-const QuarantineTab = () => {
- const { t } = useTranslation();
- const { confirm } = useConfirm();
- const [files, setFiles] = useState([]);
- const [loading, setLoading] = useState(true);
- const [message, setMessage] = useState(null);
- const { sorts, setSorts } = useTableSort({ storageKey: 'serverkit-table-quarantine-sort' });
- const {
- hiddenKeys, setHiddenKeys,
- } = useColumnVisibility({ storageKey: 'serverkit-table-quarantine-cols' });
-
- useEffect(() => {
- loadFiles();
- }, []);
-
- async function loadFiles() {
- try {
- const data = await api.getQuarantinedFiles();
- setFiles(data.files || []);
- } catch (err) {
- console.error('Failed to load quarantined files:', err);
- } finally {
- setLoading(false);
- }
- }
-
- async function handleDelete(filename) {
- if (!await confirm({
- title: t('app.quarantineTab.deleteQuarantinedFile', 'Delete quarantined file'),
- message: t('app.quarantineTab.permanentlyDeleteThisCannotBeUndone', 'Permanently delete {{filename}}? This cannot be undone.', { filename: filename }),
- confirmText: t('app.quarantineTab.deleteFile', 'Delete file'),
- })) return;
-
- try {
- await api.deleteQuarantinedFile(filename);
- setMessage({ type: 'success', text: 'File deleted' });
- loadFiles();
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- }
- }
-
- async function handleRestore(file) {
- const target = file.original_path || 'its original location';
- if (!await confirm({
- title: t('app.quarantineTab.restoreQuarantinedFile', 'Restore quarantined file'),
- message: t('app.quarantineTab.restoreToOnlyDoThisFor', 'Restore {{name}} to {{target}}? Only do this for false positives.', { name: file.name, target: target }),
- confirmText: t('app.quarantineTab.restoreFile', 'Restore file'),
- variant: 'warning',
- })) return;
-
- try {
- const result = await api.restoreQuarantinedFile(file.name);
- setMessage({ type: 'success', text: result.message || 'File restored' });
- loadFiles();
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- }
- }
-
- // Cell markup/classNames identical to the hand-rolled table they replace.
- // Two accessors per column on purpose: `value` is what the column menu, the
- // filter rules and the export read, `sortValue` is what DataTable's sorter
- // reads — it has no fallback to `value`, so a column needs both.
- const columns = [
- {
- key: 'filename',
- headerKey: 'app.quarantineTab.filename', header: 'Filename',
- sortable: true,
- hideable: false,
- type: 'text',
- value: (file) => file.name || '',
- sortValue: (file) => file.name || '',
- cellClassName: 'sk-cell-mono sec-path sec-path--red',
- render: (file) => file.name,
- },
- {
- key: 'original',
- headerKey: 'app.quarantineTab.originalLocation', header: 'Original Location',
- sortable: true,
- type: 'text',
- // '' rather than null when the sidecar is missing: the Restorable
- // view asks whether the recorded path is absolute, and a null would
- // make that rule compare against the string "null".
- value: (file) => file.original_path || '',
- sortValue: (file) => file.original_path || '',
- cellClassName: 'sk-cell-mono sec-path sec-faint',
- render: (file) => (
- <span title={file.original_path || ''}>
- {file.original_path || '—'}
- </span>
- ),
- },
- {
- key: 'size',
- headerKey: 'common.labels.size', header: 'Size',
- sortable: true,
- type: 'num',
- value: (file) => (file.size == null ? null : Number(file.size)),
- sortValue: (file) => (file.size == null ? null : Number(file.size)),
- cellClassName: 'sk-cell-mono',
- render: (file) => formatBytes(file.size, { defaultValue: '0 B' }),
- },
- {
- key: 'quarantined',
- headerKey: 'app.quarantineTab.quarantined', header: 'Quarantined',
- sortable: true,
- // Declared, not inferred: the sorter wants epoch ms, and letting
- // that number type the column would offer "is under 1754…" instead
- // of a date picker — and make any date rule match nothing.
- type: 'date',
- value: (file) => file.quarantined_at || null,
- sortValue: (file) => {
- const t = new Date(file.quarantined_at).getTime();
- return Number.isNaN(t) ? null : t;
- },
- cellClassName: 'sk-cell-mono sec-faint',
- render: (file) => new Date(file.quarantined_at).toLocaleString(),
- },
- {
- key: 'actions',
- headerKey: 'common.labels.actions', header: 'Actions',
- sortable: false,
- hideable: false,
- render: (file) => (
- <div className="quarantine-actions">
- <Button
- variant="outline"
- size="sm"
- onClick={() => handleRestore(file)}
- disabled={!file.original_path}
- title={file.original_path ? t('app.quarantineTab.restoreToOriginalLocation', 'Restore to original location') : t('app.quarantineTab.originalLocationUnknown', 'Original location unknown')}
- >
- {t('common.actions.restore', 'Restore')}
- </Button>
- <Button
- variant="destructive"
- size="sm"
- onClick={() => handleDelete(file.name)}
- >
- {t('common.actions.delete', 'Delete')}
- </Button>
- </div>
- ),
- },
- ];
-
- // No `pageState`: the endpoint returns the whole quarantine directory
- // unpaginated, and the tab owns no search or server-side filter of its own,
- // so there is nothing page-private for a saved view to carry.
- const chrome = useTableChrome({
- columns,
- rows: files,
- viewPageKey: 'security-quarantine',
- builtinViews: QUARANTINE_VIEWS,
- noun: 'files',
- sorts,
- setSorts,
- hiddenKeys,
- setHiddenKeys,
- });
-
- // DataTable applies the column rules itself, so the tab has to re-run them
- // to say how many rows survived. Cheap — the list is a directory listing.
- const shownCount = useMemo(
- () => applyFilters(files, chrome.cfg.filters, chrome.columns).length,
- [files, chrome.cfg.filters, chrome.columns],
- );
-
- return (
- <div className="quarantine-tab">
- {message && (
- <div className={`alert alert-${message.type === 'success' ? 'success' : 'danger'}`}>
- {message.text}
- </div>
- )}
-
- {/* One row of chrome. The view name replaces the old "Quarantined
- Files · N" eyebrow — the view IS what you are looking at — and
- the filter and the "⋮" ride the same line. Refresh is not
- repeated as a button: it is in the "⋮" with the other
- table-wide actions. */}
- <GridViewPicker
- views={chrome.views}
- label="files"
- onCreate={chrome.createView}
- actions={(
- <>
- <GridFilterButton
- count={chrome.filterCount}
- onClick={() => chrome.setDrawerOpen(true)}
- />
- <GridToolsMenu {...chrome.toolsProps} onRefresh={loadFiles} />
- </>
- )}
- />
-
- <GridChips {...chrome.chipProps} />
-
- <DataTable
- loading={loading}
- columns={chrome.columns}
- data={files}
- keyField="name"
- sorts={sorts}
- onSortsChange={setSorts}
- {...chrome.tableProps}
- emptyState={(
- <EmptyState
- icon={ShieldCheck}
- title={t('app.quarantineTab.noFilesInQuarantine', 'No files in quarantine')}
- description={t('app.quarantineTab.infectedFilesWillAppearHereWhen', 'Infected files will appear here when detected')}
- />
- )}
- footer={(
- <DataTableFooter
- shown={shownCount}
- total={files.length}
- noun="file"
- />
- )}
- />
-
- <GridFilterDrawer {...chrome.drawerProps} />
- </div>
- );
-};
-
-export default QuarantineTab;
diff --git a/frontend/src/components/security/ScannerTab.jsx b/frontend/src/components/security/ScannerTab.jsx
deleted file mode 100644
index 44d6ec05..00000000
--- a/frontend/src/components/security/ScannerTab.jsx
+++ /dev/null
@@ -1,819 +0,0 @@
-import { useState, useEffect, useRef } from 'react';
-import { statusKind } from '@/components/ds/status';
-import api from '../../services/api';
-import { Button } from '@/components/ui/button';
-import { Input } from '@/components/ui/input';
-import { DataTable, DataTableFooter, Pill } from '@/components/ds';
-import {
- useTableChrome, GridViewPicker, GridChips, GridFilterButton,
- GridToolsMenu, GridFilterDrawer, applyFilters,
-} from '@/components/ds/grid';
-import { useTableSort } from '@/hooks/useTableSort';
-import { useColumnVisibility } from '@/hooks/useColumnVisibility';
-import { Zap, Radar, FolderSearch, Download, Box, FileCode2, Trash2, Search } from 'lucide-react';
-import EmptyState from '@/components/EmptyState';
-import { useConfirm } from '@/hooks/useConfirm';
-import { usePolling } from '@/hooks/usePolling';
-import { useTranslation } from 'react-i18next';
-import { useOperations } from '@/contexts/OperationsContext';
-
-// Scan status cadence, and the faster cadence while a scan job runs.
-const SCAN_STATUS_POLL_MS = 5000;
-const SCAN_JOB_POLL_MS = 3000;
-
-
-// Urgency order for the Severity column. The severity strings sort
-// alphabetically — critical, high, low, medium — which files "low" above
-// "medium" and puts the wrong finding on top of a triage list.
-const SEVERITY_RANK = { critical: 0, high: 1, medium: 2, low: 3 };
-
-const NO_RULES = { match: 'all', rules: [] };
-
-// Built-in views for the findings table. Every rule matches a column's `value`
-// accessor, which for Severity and Source is the raw scanner word the cell
-// renders — never the rank the table sorts by.
-const FINDING_VIEWS = [
- {
- // The triage default: worst first. Sort only, and the empty rule set is
- // spelled out so switching here clears the previous view's filters.
- name: 'Worst first',
- state: {
- sorts: [{ key: 'severity', direction: 'asc' }],
- hiddenKeys: [],
- groupBy: null,
- columnFilters: NO_RULES,
- },
- },
- {
- // What you act on before closing the tab. 'medium' is deliberately out:
- // the curated rules emit it as their default, so it is the bucket an
- // unclassified match lands in rather than a judgement about the file.
- name: 'Critical & high',
- state: {
- sorts: [{ key: 'severity', direction: 'asc' }],
- hiddenKeys: [],
- groupBy: null,
- columnFilters: {
- match: 'all',
- rules: [{ id: 'fs1', field: 'severity', op: 'any', value: ['critical', 'high'] }],
- },
- },
- },
- {
- // The curated web-shell pass on its own — a backdoor in a docroot, not
- // a known-malware signature. Grouped by file through the sort, because
- // one shell usually trips several rules and you quarantine the FILE.
- name: 'Web-shell hits',
- state: {
- sorts: [{ key: 'file', direction: 'asc' }],
- hiddenKeys: [],
- groupBy: null,
- columnFilters: {
- match: 'all',
- rules: [{ id: 'fw1', field: 'source', op: 'any', value: ['yara'] }],
- },
- },
- },
-];
-
-// Built-in views for the scan-history table.
-const HISTORY_VIEWS = [
- {
- name: 'Newest first',
- state: {
- sorts: [{ key: 'date', direction: 'desc' }],
- hiddenKeys: [],
- groupBy: null,
- columnFilters: NO_RULES,
- },
- },
- {
- // Scans that actually found something — the audit trail you re-read
- // after an incident. A scan with no infected list reads 0 threats, so
- // `over 0` can only ever be a real hit.
- name: 'Threats found',
- state: {
- sorts: [{ key: 'date', direction: 'desc' }],
- hiddenKeys: [],
- groupBy: null,
- columnFilters: {
- match: 'all',
- rules: [{ id: 'hs1', field: 'threats', op: 'gt', value: 0 }],
- },
- },
- },
- {
- // A scan that never finished proves nothing about the directory it was
- // pointed at — 'completed with 0 threats' and 'timed out' look equally
- // green from a distance, and only one of them is an answer.
- name: 'Did not finish',
- state: {
- sorts: [{ key: 'date', direction: 'desc' }],
- hiddenKeys: [],
- groupBy: null,
- columnFilters: {
- match: 'all',
- rules: [{
- id: 'hf1',
- field: 'status',
- op: 'any',
- value: ['error', 'timeout', 'cancelled'],
- }],
- },
- },
- },
-];
-
-const ScannerTab = () => {
- const { t } = useTranslation();
- const { confirm } = useConfirm();
- const { openRun } = useOperations();
- const [scanStatus, setScanStatus] = useState({ status: 'idle' });
- const [scanPath, setScanPath] = useState('/var/www');
- const [scanning, setScanning] = useState(false);
- const [updating, setUpdating] = useState(false);
- const [history, setHistory] = useState([]);
- const [message, setMessage] = useState(null);
-
- // App scan (job-backed)
- const [apps, setApps] = useState([]);
- const [selectedApp, setSelectedApp] = useState('');
- const [scanJob, setScanJob] = useState(null); // { id, status, result }
- const [scanJobId, setScanJobId] = useState(null);
-
- // Findings (YARA + ClamAV) from the last completed job/scan
- const [findings, setFindings] = useState([]);
- const [quarantining, setQuarantining] = useState(null);
- // Per-table sort + column visibility (persisted, mirrored by header menus)
- const findingsSorts = useTableSort({ storageKey: 'serverkit-table-scanner-findings-sort' });
- const findingsCols = useColumnVisibility({ storageKey: 'serverkit-table-scanner-findings-cols' });
- const historySorts = useTableSort({ storageKey: 'serverkit-table-scanner-history-sort' });
- const historyCols = useColumnVisibility({ storageKey: 'serverkit-table-scanner-history-cols' });
-
- // YARA rules manager
- const [rules, setRules] = useState(null);
- const [showRules, setShowRules] = useState(false);
- const ruleFileRef = useRef(null);
-
- useEffect(() => {
- loadScanStatus();
- loadHistory();
- loadApps();
- }, []);
-
- usePolling(loadScanStatus, SCAN_STATUS_POLL_MS, { immediate: false });
-
- async function loadScanStatus() {
- try {
- const data = await api.getScanStatus();
- setScanStatus(data);
- if (data.status === 'completed' && Array.isArray(data.findings)) {
- setFindings(data.findings);
- }
- } catch (err) {
- console.error('Failed to load scan status:', err);
- }
- }
-
- async function loadHistory() {
- try {
- const data = await api.getScanHistory(20);
- setHistory(data.scans || []);
- } catch (err) {
- console.error('Failed to load scan history:', err);
- }
- }
-
- async function loadApps() {
- try {
- const data = await api.getApps();
- setApps(data.apps || []);
- } catch (err) {
- console.error('Failed to load apps:', err);
- }
- }
-
- async function loadRules() {
- try {
- const data = await api.getYaraRules();
- setRules(data);
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- }
- }
-
- // The job id IS the "are we polling" state; the hook owns the schedule,
- // so this only has to say which job to watch.
- function pollJob(jobId) {
- setScanJobId(jobId);
- }
-
- usePolling(async () => {
- try {
- const response = await api.getJob(scanJobId);
- const job = response.job || response;
- setScanJob(job);
- if (!['succeeded', 'failed', 'cancelled'].includes(job.status)) return;
- setScanJobId(null);
- if (job.status === 'succeeded' && job.result?.findings) {
- setFindings(job.result.findings);
- const n = job.result.findings.length;
- setMessage({
- type: n > 0 ? 'error' : 'success',
- text: n > 0
- ? `Scan finished: ${n} finding(s) — review below`
- : 'Scan finished: no threats found',
- });
- } else if (job.status === 'failed') {
- setMessage({ type: 'error', text: job.error_message || 'Scan job failed' });
- }
- loadScanStatus();
- loadHistory();
- } catch (err) {
- console.error('Failed to poll scan job:', err);
- }
- }, SCAN_JOB_POLL_MS, { enabled: Boolean(scanJobId), immediate: false });
-
- async function handleScanApp() {
- if (!selectedApp) return;
- setScanning(true);
- setMessage(null);
- try {
- const result = await api.scanApp(selectedApp);
- setScanJob({ id: result.job_id, status: 'pending' });
- openRun('job', result.job_id);
- setMessage({ type: 'success', text: `Scan queued for ${result.path || 'app docroot'}` });
- pollJob(result.job_id);
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- } finally {
- setScanning(false);
- }
- }
-
- async function handleStartScan(type) {
- setScanning(true);
- setMessage(null);
- try {
- let result;
- if (type === 'quick') {
- result = await api.runQuickScan();
- } else if (type === 'full') {
- result = await api.runFullScan();
- } else {
- result = await api.scanDirectory(scanPath);
- }
- setMessage({ type: 'success', text: result.message });
- loadScanStatus();
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- } finally {
- setScanning(false);
- }
- }
-
- async function handleUpdateDefinitions() {
- setUpdating(true);
- setMessage(null);
- try {
- const result = await api.updateVirusDefinitions();
- setMessage({ type: result.success ? 'success' : 'error', text: result.message || result.error });
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- } finally {
- setUpdating(false);
- }
- }
-
- async function handleCancelScan() {
- try {
- await api.cancelScan();
- loadScanStatus();
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- }
- }
-
- async function handleQuarantine(finding) {
- setQuarantining(finding.file);
- try {
- await api.quarantineFile(finding.file);
- setFindings((prev) => prev.filter((f) => f.file !== finding.file));
- setMessage({ type: 'success', text: `Quarantined ${finding.file}` });
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- } finally {
- setQuarantining(null);
- }
- }
-
- async function handleToggleRules() {
- const next = !showRules;
- setShowRules(next);
- if (next && !rules) loadRules();
- }
-
- async function handleRuleFileChosen(e) {
- const file = e.target.files?.[0];
- e.target.value = '';
- if (!file) return;
- if (!file.name.endsWith('.yar')) {
- setMessage({ type: 'error', text: 'Only .yar rule files are accepted' });
- return;
- }
- if (file.size > 64 * 1024) {
- setMessage({ type: 'error', text: 'Rule file exceeds the 64 KB limit' });
- return;
- }
- try {
- const content = await file.text();
- await api.uploadYaraRule(file.name, content);
- setMessage({ type: 'success', text: `Rule file ${file.name} uploaded` });
- loadRules();
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- }
- }
-
- async function handleDeleteRule(name) {
- if (!await confirm({
- title: t('app.scannerTab.deleteScannerRule', 'Delete scanner rule'),
- message: t('app.scannerTab.deleteCustomRuleFile', 'Delete custom rule file {{name}}?', { name: name }),
- confirmText: t('app.scannerTab.deleteRule', 'Delete rule'),
- })) return;
- try {
- await api.deleteYaraRule(name);
- loadRules();
- } catch (err) {
- setMessage({ type: 'error', text: err.message });
- }
- }
-
- const isScanning = scanStatus.status === 'running';
- const jobRunning = scanJob && ['pending', 'running'].includes(scanJob.status);
-
- // Cell markup/classNames identical to the hand-rolled tables they replace.
- const findingColumns = [
- {
- key: 'rule',
- headerKey: 'app.scannerTab.rule', header: 'Rule',
- sortable: true,
- hideable: false,
- type: 'text',
- value: (f) => f.rule || '',
- sortValue: (f) => f.rule || '',
- cellClassName: 'sk-cell-mono',
- render: (f) => <span title={f.description}>{f.rule}</span>,
- },
- {
- key: 'severity',
- headerKey: 'common.labels.severity', header: 'Severity',
- sortable: true,
- type: 'enum',
- // Both accessors spelled out: `value` is the word a rule matches,
- // `sortValue` is the urgency rank the table orders by. A numeric
- // sortValue on its own would type the column `num`, and every
- // severity preset would then match exactly zero rows.
- value: (f) => f.severity || 'unknown',
- sortValue: (f) => SEVERITY_RANK[f.severity] ?? 9,
- enumOrder: ['critical', 'high', 'medium', 'low'],
- render: (f) => (
- <span className={`sec-state sec-state--${statusKind(f.severity)}`}>
- {f.severity}
- </span>
- ),
- },
- {
- key: 'file',
- headerKey: 'app.scannerTab.file', header: 'File',
- sortable: true,
- type: 'text',
- value: (f) => f.file || '',
- sortValue: (f) => f.file || '',
- cellClassName: 'sk-cell-mono sec-path sec-path--red',
- render: (f) => <span title={f.file}>{f.file}</span>,
- },
- {
- key: 'match',
- headerKey: 'app.scannerTab.match', header: 'Match',
- // The row field is `matched`, not `match`, so without an accessor
- // the column has nothing behind it: no filter, and an export column
- // of empty strings.
- type: 'text',
- value: (f) => f.matched || '',
- cellClassName: 'sk-cell-mono scan-snippet',
- render: (f) => f.matched || '—',
- },
- {
- key: 'source',
- headerKey: 'common.labels.source', header: 'Source',
- sortable: true,
- type: 'enum',
- value: (f) => f.source || 'unknown',
- sortValue: (f) => f.source || '',
- enumOrder: ['yara', 'clamav'],
- render: (f) => <span className="sec-state sec-state--gray">{f.source}</span>,
- },
- {
- key: 'actions',
- header: '',
- sortable: false,
- hideable: false,
- cellClassName: 'sec-rowend',
- render: (f) => (
- <Button
- variant="destructive"
- size="sm"
- onClick={() => handleQuarantine(f)}
- disabled={quarantining === f.file}
- >
- {quarantining === f.file ? 'Moving…' : 'Quarantine'}
- </Button>
- ),
- },
- ];
-
- const historyColumns = [
- {
- key: 'date',
- headerKey: 'app.scannerTab.date', header: 'Date',
- sortable: true,
- hideable: false,
- // Declared, not inferred: the sorter wants epoch ms, and letting
- // that number type the column would offer "is under 1754…" instead
- // of a date picker — and make any date rule match nothing.
- type: 'date',
- value: (scan) => scan.started_at || null,
- sortValue: (scan) => {
- const t = new Date(scan.started_at).getTime();
- return Number.isNaN(t) ? null : t;
- },
- cellClassName: 'sk-cell-mono sec-faint',
- render: (scan) => new Date(scan.started_at).toLocaleString(),
- },
- {
- key: 'directory',
- headerKey: 'app.scannerTab.directory', header: 'Directory',
- sortable: true,
- sortValue: (scan) => scan.directory || '',
- cellClassName: 'sk-cell-mono sec-path',
- render: (scan) => scan.directory,
- },
- {
- key: 'status',
- headerKey: 'common.labels.status', header: 'Status',
- sortable: true,
- type: 'enum',
- value: (scan) => scan.status || 'unknown',
- sortValue: (scan) => scan.status || '',
- enumOrder: ['completed', 'running', 'error', 'timeout', 'cancelled'],
- render: (scan) => (
- <Pill kind={scan.status === 'completed' ? 'green' : scan.status === 'error' ? 'red' : 'amber'}>
- {scan.status}
- </Pill>
- ),
- },
- {
- key: 'threats',
- headerKey: 'app.scannerTab.threats', header: 'Threats',
- sortable: true,
- type: 'num',
- // A scan with no infected list reads 0 rather than blank, so the
- // "over 0" preset can only ever be a real hit — a scan that failed
- // before it wrote a list can never look like a clean one.
- value: (scan) => scan.infected_files?.length ?? 0,
- sortValue: (scan) => scan.infected_files?.length ?? 0,
- render: (scan) => (
- scan.infected_files?.length > 0 ? (
- <span className="sec-state sec-state--red">{scan.infected_files.length} found</span>
- ) : (
- <span className="sec-state sec-state--green">clean</span>
- )
- ),
- },
- ];
-
- // Two tables on one route, so two chrome instances — each with its own view
- // bucket AND its own `urlScope`. The link params (`view`, `sort`, `hide`,
- // `f`…) are global names: unscoped, the findings table's sort would arrive
- // as the history table's and each would overwrite the other's ?view=.
- const findingsChrome = useTableChrome({
- columns: findingColumns,
- rows: findings,
- viewPageKey: 'security-scanner-findings',
- urlScope: 'findings',
- builtinViews: FINDING_VIEWS,
- noun: 'findings',
- sorts: findingsSorts.sorts,
- setSorts: findingsSorts.setSorts,
- hiddenKeys: findingsCols.hiddenKeys,
- setHiddenKeys: findingsCols.setHiddenKeys,
- });
- const historyChrome = useTableChrome({
- columns: historyColumns,
- rows: history,
- viewPageKey: 'security-scan-history',
- urlScope: 'history',
- builtinViews: HISTORY_VIEWS,
- noun: 'scans',
- sorts: historySorts.sorts,
- setSorts: historySorts.setSorts,
- hiddenKeys: historyCols.hiddenKeys,
- setHiddenKeys: historyCols.setHiddenKeys,
- });
-
- // The tables filter internally, so mirror the rules here for the footers —
- // a count reading "12 findings" under 3 filtered rows is the table lying
- // about what you are looking at.
- const shownFindings = applyFilters(findings, findingsChrome.cfg.filters, findingsChrome.columns);
- const shownHistory = applyFilters(history, historyChrome.cfg.filters, historyChrome.columns);
-
- return (
- <div className="scanner-tab">
- {message && (
- <div className={`alert alert-${message.type === 'success' ? 'success' : 'danger'}`}>
- {message.text}
- </div>
- )}
-
- <div className="scan-options">
- <div className="scan-card scan-card--quick" onClick={() => !isScanning && !scanning && handleStartScan('quick')}>
- <div className="scan-card-icon">
- <Zap size={20} />
- </div>
- <h4>{t('app.scannerTab.quickScan', 'Quick Scan')}</h4>
- <span className="scan-desc">{t('app.scannerTab.scanCommonWebDirectories', 'Scan common web directories')}</span>
- <Button
- variant="default"
- size="sm"
- onClick={(e) => { e.stopPropagation(); handleStartScan('quick'); }}
- disabled={isScanning || scanning}
- >
- {t('app.scannerTab.startScan', 'Start Scan')}
- </Button>
- </div>
-
- <div className="scan-card scan-card--full" onClick={() => !isScanning && !scanning && handleStartScan('full')}>
- <div className="scan-card-icon">
- <Radar size={20} />
- </div>
- <h4>{t('app.scannerTab.fullScan', 'Full Scan')}</h4>
- <span className="scan-desc">{t('app.scannerTab.scanEntireSystemSlow', 'Scan entire system (slow)')}</span>
- <Button
- variant="default"
- size="sm"
- onClick={(e) => { e.stopPropagation(); handleStartScan('full'); }}
- disabled={isScanning || scanning}
- >
- {t('app.scannerTab.startScan', 'Start Scan')}
- </Button>
- </div>
-
- <div className="scan-card scan-card--custom">
- <div className="scan-card-icon">
- <FolderSearch size={20} />
- </div>
- <h4>{t('app.scannerTab.customPath', 'Custom Path')}</h4>
- <span className="scan-desc">{t('app.scannerTab.scanASpecificDirectory', 'Scan a specific directory')}</span>
- <div className="scan-custom-input">
- <Input
- type="text"
- value={scanPath}
- onChange={(e) => setScanPath(e.target.value)}
- placeholder="/path/to/scan"
- disabled={isScanning}
- onClick={(e) => e.stopPropagation()}
- />
- <Button
- variant="default"
- size="sm"
- onClick={() => handleStartScan('custom')}
- disabled={isScanning || scanning || !scanPath}
- >
- {t('app.scannerTab.scan', 'Scan')}
- </Button>
- </div>
- </div>
-
- <div className="scan-card scan-card--app">
- <div className="scan-card-icon">
- <Box size={20} />
- </div>
- <h4>{t('app.scannerTab.scanAnApp', 'Scan an App')}</h4>
- <span className="scan-desc">{t('app.scannerTab.webShellMalwareScanOfA', 'Web-shell + malware scan of a docroot')}</span>
- <div className="scan-custom-input">
- <select
- className="scan-app-select"
- value={selectedApp}
- onChange={(e) => setSelectedApp(e.target.value)}
- disabled={jobRunning}
- >
- <option value="">{t('app.scannerTab.selectAnApp', 'Select an app…')}</option>
- {apps.map((a) => (
- <option key={a.id} value={a.id}>{a.name}</option>
- ))}
- </select>
- <Button
- variant="default"
- size="sm"
- onClick={handleScanApp}
- disabled={!selectedApp || scanning || jobRunning}
- >
- {jobRunning ? 'Running…' : 'Scan'}
- </Button>
- </div>
- </div>
- </div>
-
- <div className="scan-toolbar">
- <Button variant="outline" size="sm" onClick={handleToggleRules}>
- <FileCode2 size={14} />
- {t('app.scannerTab.webShellRules', 'Web-shell Rules')}
- </Button>
- <Button variant="outline" size="sm" onClick={handleUpdateDefinitions} disabled={updating}>
- <Download size={14} />
- {updating ? 'Updating...' : 'Update Definitions'}
- </Button>
- </div>
-
- {showRules && (
- <div className="card sec-flush yara-rules-card">
- <div className="card-header">
- <h3>{t('app.scannerTab.webShellDetectionRules', 'Web-shell Detection Rules')}{rules && <span className="sec-count"> · {rules.builtin_count} builtin</span>}</h3>
- <div className="card-actions">
- <input
- ref={ruleFileRef}
- type="file"
- accept=".yar"
- className="yara-file-input"
- onChange={handleRuleFileChosen}
- />
- <Button variant="outline" size="sm" onClick={() => ruleFileRef.current?.click()}>
- {t('app.scannerTab.uploadYar', 'Upload .yar')}
- </Button>
- </div>
- </div>
- <div className="card-body">
- {!rules ? (
- <div className="loading-sm">{t('common.loading', 'Loading…')}</div>
- ) : (
- <>
- <p className="sec-hint sec-hint--lead">
- {rules.builtin_count} {t('app.scannerTab.curatedWebShellIndicatorsRunOn', 'curated web-shell indicators run on every scan (engine:')} <span className="sec-mono">{rules.engine}</span>).
- {rules.engine === 'fallback' && ' Install yara to enable custom .yar rule files.'}
- </p>
- {rules.custom.length === 0 ? (
- <p className="sec-hint">{t('app.scannerTab.noCustomRuleFilesUploadA', 'No custom rule files. Upload a .yar file (max 64 KB) to extend the rule set.')}</p>
- ) : (
- <div className="yara-custom-list">
- {rules.custom.map((c) => (
- <div key={c.name} className="yara-custom-item">
- <span className="sec-mono">{c.name}</span>
- <span className="sec-faint sec-mono">{c.size} B</span>
- {!rules.custom_rules_active && (
- <span className="sec-state sec-state--gray">{t('app.scannerTab.inactiveYaraNotInstalled', 'inactive — yara not installed')}</span>
- )}
- <Button variant="ghost" size="sm" onClick={() => handleDeleteRule(c.name)}>
- <Trash2 size={14} />
- </Button>
- </div>
- ))}
- </div>
- )}
- </>
- )}
- </div>
- </div>
- )}
-
- {(isScanning || jobRunning) && (
- <div className="card scan-progress">
- <div className="card-header">
- <h3>{t('app.scannerTab.scanInProgress', 'Scan in Progress')}</h3>
- {isScanning && (
- <Button variant="destructive" size="sm" onClick={handleCancelScan}>
- {t('common.actions.cancel', 'Cancel')}
- </Button>
- )}
- </div>
- <div className="card-body">
- <div className="progress-info">
- <div className="spinner"></div>
- <div>
- {scanStatus.directory && (
- <p><strong>{t('app.scannerTab.scanning', 'Scanning:')}</strong> <span className="sec-mono">{scanStatus.directory}</span></p>
- )}
- {scanStatus.started_at && (
- <p><strong>{t('app.scannerTab.started', 'Started:')}</strong> <span className="sec-mono">{new Date(scanStatus.started_at).toLocaleString()}</span></p>
- )}
- {jobRunning && (
- <p><strong>{t('app.scannerTab.job', 'Job:')}</strong> <span className="sec-mono">{scanJob.id} · {scanJob.status}</span></p>
- )}
- {scanStatus.files_scanned > 0 && (
- <p><strong>{t('app.scannerTab.filesScanned', 'Files scanned:')}</strong> <span className="sec-mono">{scanStatus.files_scanned}</span></p>
- )}
- </div>
- </div>
- </div>
- </div>
- )}
-
- {findings.length > 0 && (
- <div className="card sec-flush scan-findings">
- <div className="card-header">
- {/* The view name replaces the section heading — two
- titles stacked would compete, and the view IS what
- you are looking at. The card keeps its red border,
- so the alarm does not depend on the words. */}
- <GridViewPicker
- views={findingsChrome.views}
- label="findings"
- onCreate={findingsChrome.createView}
- actions={(
- <>
- <GridFilterButton
- count={findingsChrome.filterCount}
- onClick={() => findingsChrome.setDrawerOpen(true)}
- />
- <GridToolsMenu {...findingsChrome.toolsProps} onRefresh={loadScanStatus} />
- </>
- )}
- />
- <div className="sec-tableactions">
- {/* Dismiss throws the findings away rather than
- narrowing them, so it stays out of the chrome. */}
- <Button variant="outline" size="sm" onClick={() => setFindings([])}>{t('common.actions.dismiss', 'Dismiss')}</Button>
- </div>
- </div>
- <GridChips {...findingsChrome.chipProps} />
- <DataTable
- columns={findingsChrome.columns}
- data={findings}
- keyField={(f) => `${f.file}-${f.rule}-${f.source}`}
- sorts={findingsSorts.sorts}
- onSortsChange={findingsSorts.setSorts}
- {...findingsChrome.tableProps}
- footer={(
- <DataTableFooter
- shown={shownFindings.length}
- total={findings.length}
- noun="finding"
- />
- )}
- />
- <GridFilterDrawer {...findingsChrome.drawerProps} />
- </div>
- )}
-
- <div className="card sec-flush">
- <div className="card-header">
- {/* Refresh is not repeated as a button next to the "⋮" that
- already carries it. */}
- <GridViewPicker
- views={historyChrome.views}
- label="scans"
- onCreate={historyChrome.createView}
- actions={(
- <>
- <GridFilterButton
- count={historyChrome.filterCount}
- onClick={() => historyChrome.setDrawerOpen(true)}
- />
- <GridToolsMenu {...historyChrome.toolsProps} onRefresh={loadHistory} />
- </>
- )}
- />
- </div>
- <GridChips {...historyChrome.chipProps} />
- {history.length === 0 ? (
- <div className="card-body">
- <EmptyState
- icon={Search}
- title={t('app.scannerTab.noScansHaveBeenRunYet', 'No scans have been run yet.')}
- description={t('app.scannerTab.startAScanAboveToCheck', 'Start a scan above to check for threats.')}
- />
- </div>
- ) : (
- <DataTable
- columns={historyChrome.columns}
- data={history}
- keyField={(scan) => `${scan.started_at}-${scan.directory}`}
- sorts={historySorts.sorts}
- onSortsChange={historySorts.setSorts}
- {...historyChrome.tableProps}
- footer={(
- <DataTableFooter
- shown={shownHistory.length}
- total={history.length}
- noun="scan"
- />
- )}
- />
- )}
- <GridFilterDrawer {...historyChrome.drawerProps} />
- </div>
- </div>
- );
-};
-
-export default ScannerTab;
diff --git a/frontend/src/components/security/VulnerabilityTab.jsx b/frontend/src/components/security/VulnerabilityTab.jsx
deleted file mode 100644
index 799a4996..00000000
--- a/frontend/src/components/security/VulnerabilityTab.jsx
+++ /dev/null
@@ -1,219 +0,0 @@
-import { useState, useEffect } from 'react';
-import { Target } from 'lucide-react';
-import api from '../../services/api';
-import { useToast } from '../../contexts/ToastContext';
-import EmptyState from '@/components/EmptyState';
-import { Button } from '@/components/ui/button';
-import { Pill, ScoreGauge } from '@/components/ds';
-import { usePolling } from '@/hooks/usePolling';
-import { useTranslation } from 'react-i18next';
-
-// Cadence while a Lynis scan is running.
-const SCAN_POLL_MS = 5000;
-
-
-const hardeningColor = (score) => {
- if (score >= 70) return 'var(--green)';
- if (score >= 50) return 'var(--amber)';
- return 'var(--red)';
-};
-
-const VulnerabilityTab = () => {
- const { t } = useTranslation();
- const [lynisStatus, setLynisStatus] = useState(null);
- const [scanStatus, setScanStatus] = useState(null);
- const [loading, setLoading] = useState(true);
- const [actionLoading, setActionLoading] = useState(false);
- const toast = useToast();
-
- useEffect(() => {
- loadStatus();
- }, []);
-
- // Only while a scan is actually running.
- usePolling(loadScanStatus, SCAN_POLL_MS, {
- enabled: scanStatus?.status === 'running',
- immediate: false,
- });
-
- const loadStatus = async () => {
- setLoading(true);
- try {
- const [lynis, scan] = await Promise.all([
- api.getLynisStatus(),
- api.getLynisScanStatus()
- ]);
- setLynisStatus(lynis);
- setScanStatus(scan);
- } catch (error) {
- console.error('Failed to load Lynis status:', error);
- } finally {
- setLoading(false);
- }
- };
-
- const loadScanStatus = async () => {
- try {
- const scan = await api.getLynisScanStatus();
- setScanStatus(scan);
- } catch (error) {
- console.error('Failed to load scan status:', error);
- }
- };
-
- const handleInstall = async () => {
- setActionLoading(true);
- try {
- await api.installLynis();
- toast.success(t('app.vulnerabilityTab.lynisInstalledSuccessfully', 'Lynis installed successfully'));
- await loadStatus();
- } catch (error) {
- toast.error(t('app.vulnerabilityTab.failedToInstall', 'Failed to install: {{message}}', { message: error.message }));
- } finally {
- setActionLoading(false);
- }
- };
-
- const handleStartScan = async () => {
- setActionLoading(true);
- try {
- await api.runLynisScan();
- toast.success(t('app.vulnerabilityTab.vulnerabilityScanStarted', 'Vulnerability scan started'));
- await loadScanStatus();
- } catch (error) {
- toast.error(t('app.vulnerabilityTab.failedToStartScan', 'Failed to start scan: {{message}}', { message: error.message }));
- } finally {
- setActionLoading(false);
- }
- };
-
- if (loading) {
- return <div className="loading-sm">{t('app.vulnerabilityTab.loadingVulnerabilityScannerStatus', 'Loading vulnerability scanner status…')}</div>;
- }
-
- return (
- <div className="vulnerability-tab">
- {!lynisStatus?.installed ? (
- <EmptyState
- icon={Target}
- title={t('app.vulnerabilityTab.lynisNotInstalled', 'Lynis Not Installed')}
- description={t('app.vulnerabilityTab.installLynisToPerformSecurityAudits', 'Install Lynis to perform security audits and vulnerability scanning.')}
- action={(
- <Button variant="default" onClick={handleInstall} disabled={actionLoading}>
- {actionLoading ? 'Installing...' : 'Install Lynis'}
- </Button>
- )}
- />
- ) : (
- <>
- <div className="card">
- <div className="card-header">
- <h3>{t('app.vulnerabilityTab.lynisVulnerabilityScanner', 'Lynis Vulnerability Scanner')}</h3>
- <Button
- variant="default"
- onClick={handleStartScan}
- disabled={actionLoading || scanStatus?.status === 'running'}
- >
- {scanStatus?.status === 'running' ? 'Scanning...' : 'Start Scan'}
- </Button>
- </div>
- <div className="card-body">
- <div className="sec-rows">
- <div className="sk-info-row">
- <span className="k">{t('common.labels.version', 'Version')}</span>
- <span className="v">{lynisStatus.version || 'Unknown'}</span>
- </div>
- <div className="sk-info-row">
- <span className="k">{t('app.vulnerabilityTab.scanStatus', 'Scan status')}</span>
- <Pill kind={scanStatus?.status === 'completed' ? 'green' : scanStatus?.status === 'running' ? 'cyan' : 'gray'}>
- {scanStatus?.status || 'Idle'}
- </Pill>
- </div>
- </div>
- </div>
- </div>
-
- {scanStatus?.status === 'running' && (
- <div className="card scan-progress">
- <div className="card-header">
- <h3>{t('app.vulnerabilityTab.scanInProgress', 'Scan in Progress')}</h3>
- </div>
- <div className="card-body">
- <div className="progress-info">
- <div className="spinner"></div>
- <div>
- <p>{t('app.vulnerabilityTab.scanningSystemForVulnerabilities', 'Scanning system for vulnerabilities…')}</p>
- <p className="sec-mono sec-faint">{t('app.vulnerabilityTab.started', 'Started:')} {new Date(scanStatus.started_at).toLocaleString()}</p>
- </div>
- </div>
- </div>
- </div>
- )}
-
- {scanStatus?.status === 'completed' && (
- <div className="card">
- <div className="card-header">
- <h3>{t('app.vulnerabilityTab.scanResults', 'Scan Results')}</h3>
- </div>
- <div className="card-body">
- {scanStatus.hardening_index && (
- <div className="sec-hardening">
- <ScoreGauge
- value={scanStatus.hardening_index}
- size={104}
- stroke={9}
- color={hardeningColor(scanStatus.hardening_index)}
- label="hardening"
- />
- <div className="sec-hardening__info">
- <div className="sec-hardening__title">{t('app.vulnerabilityTab.hardeningIndex', 'Hardening index')}</div>
- <div className="sec-hardening__sub">
- {scanStatus.warnings?.length || 0} {t('app.vulnerabilityTab.warnings', 'warnings ·')} {scanStatus.suggestions?.length || 0} suggestions
- </div>
- </div>
- </div>
- )}
-
- {scanStatus.warnings?.length > 0 && (
- <div className="scan-section">
- <h4>{t('app.vulnerabilityTab.warnings2', 'Warnings (')}{scanStatus.warnings.length})</h4>
- <div className="sec-finding-list">
- {scanStatus.warnings.slice(0, 20).map((warning, idx) => (
- <div key={idx} className="sec-finding">
- <span className="sec-dot sec-dot--amber" />
- <span className="sec-finding__msg">{warning}</span>
- </div>
- ))}
- {scanStatus.warnings.length > 20 && (
- <div className="sec-finding sec-finding--more">...and {scanStatus.warnings.length - 20} more</div>
- )}
- </div>
- </div>
- )}
-
- {scanStatus.suggestions?.length > 0 && (
- <div className="scan-section">
- <h4>{t('app.vulnerabilityTab.suggestions', 'Suggestions (')}{scanStatus.suggestions.length})</h4>
- <div className="sec-finding-list">
- {scanStatus.suggestions.slice(0, 20).map((suggestion, idx) => (
- <div key={idx} className="sec-finding">
- <span className="sec-dot sec-dot--cyan" />
- <span className="sec-finding__msg">{suggestion}</span>
- </div>
- ))}
- {scanStatus.suggestions.length > 20 && (
- <div className="sec-finding sec-finding--more">...and {scanStatus.suggestions.length - 20} more</div>
- )}
- </div>
- </div>
- )}
- </div>
- </div>
- )}
- </>
- )}
- </div>
- );
-};
-
-export default VulnerabilityTab;
diff --git a/frontend/src/components/security/index.js b/frontend/src/components/security/index.js
index 47ee9275..d102ce62 100644
--- a/frontend/src/components/security/index.js
+++ b/frontend/src/components/security/index.js
@@ -1,13 +1,13 @@
+// Core Security tabs only. The install-gated tool tabs (Fail2ban, Malware
+// Scanner, Quarantine, Vulnerability Scan, Auto Updates) live in their
+// security extensions now (serverkit-fail2ban / serverkit-clamav /
+// serverkit-lynis / serverkit-auto-updates) and contribute themselves into
+// the Security tab group when installed.
export { default as OverviewTab } from './OverviewTab';
export { default as FirewallTab } from './FirewallTab';
-export { default as Fail2banTab } from './Fail2banTab';
export { default as SSHKeysTab } from './SSHKeysTab';
export { default as IPListsTab } from './IPListsTab';
-export { default as ScannerTab } from './ScannerTab';
-export { default as QuarantineTab } from './QuarantineTab';
export { default as IntegrityTab } from './IntegrityTab';
export { default as AuditTab } from './AuditTab';
-export { default as VulnerabilityTab } from './VulnerabilityTab';
-export { default as AutoUpdatesTab } from './AutoUpdatesTab';
export { default as EventsTab } from './EventsTab';
export { default as SecurityConfigTab } from './SecurityConfigTab';
diff --git a/frontend/src/components/security/securityTabs.jsx b/frontend/src/components/security/securityTabs.jsx
index 919c7368..4b71698a 100644
--- a/frontend/src/components/security/securityTabs.jsx
+++ b/frontend/src/components/security/securityTabs.jsx
@@ -1,26 +1,23 @@
import {
- LayoutDashboard, Shield, Ban, Key, Network, Radar, ShieldOff,
- FileCheck, ScrollText, Bug, RefreshCw, Bell, Settings,
+ LayoutDashboard, Shield, Key, Network,
+ FileCheck, ScrollText, Bell, Settings,
} from 'lucide-react';
// Shared sub-nav for the Security page group. Rendered in the shared PageTopbar
// tabs so every section lives in the page top bar — matching the Domains/
-// Services top-bar layout (see docs/REDESIGN_MAP.md §6 decision 3). There are 13
-// sections, more than fit on one row, so the PageTopbar collapses the overflow
-// into a "More" menu. All sections render from the single Security page, keyed
-// off the /security/:tab route.
+// Services top-bar layout (see docs/REDESIGN_MAP.md §6 decision 3). Core
+// sections only: the install-gated tools (Fail2ban, Malware Scanner,
+// Quarantine, Vulnerability Scan, Auto Updates) are security extensions that
+// contribute their own tabs into this group when installed (groupId
+// "security" — TabGroupLayout merges them in). All core sections render from
+// the single Security page, keyed off the /security/:tab route.
export const SECURITY_TABS = [
{ to: '/security', labelKey: 'common.labels.overview', label: 'Overview', end: true, icon: <LayoutDashboard size={15} /> },
{ to: '/security/firewall', labelKey: 'app.securityTabs.firewall', label: 'Firewall', icon: <Shield size={15} /> },
- { to: '/security/fail2ban', labelKey: 'app.securityTabs.fail2ban', label: 'Fail2ban', icon: <Ban size={15} /> },
{ to: '/security/ssh-keys', labelKey: 'app.securityTabs.sshKeys', label: 'SSH Keys', icon: <Key size={15} /> },
{ to: '/security/ip-lists', labelKey: 'app.securityTabs.ipLists', label: 'IP Lists', icon: <Network size={15} /> },
- { to: '/security/scanner', labelKey: 'app.securityTabs.malwareScanner', label: 'Malware Scanner', icon: <Radar size={15} /> },
- { to: '/security/quarantine', labelKey: 'app.securityTabs.quarantine', label: 'Quarantine', icon: <ShieldOff size={15} /> },
{ to: '/security/integrity', labelKey: 'app.securityTabs.fileIntegrity', label: 'File Integrity', icon: <FileCheck size={15} /> },
{ to: '/security/audit', labelKey: 'app.securityTabs.audit', label: 'Audit', icon: <ScrollText size={15} /> },
- { to: '/security/vulnerability', labelKey: 'app.securityTabs.vulnerabilityScan', label: 'Vulnerability Scan', icon: <Bug size={15} /> },
- { to: '/security/updates', labelKey: 'app.securityTabs.autoUpdates', label: 'Auto Updates', icon: <RefreshCw size={15} /> },
{ to: '/security/events', labelKey: 'app.securityTabs.events', label: 'Events', icon: <Bell size={15} /> },
{ to: '/security/settings', labelKey: 'common.labels.settings', label: 'Settings', icon: <Settings size={15} /> },
];
diff --git a/frontend/src/components/setup/SetupStepSummary.jsx b/frontend/src/components/setup/SetupStepSummary.jsx
index 48be857b..33242b3b 100644
--- a/frontend/src/components/setup/SetupStepSummary.jsx
+++ b/frontend/src/components/setup/SetupStepSummary.jsx
@@ -38,6 +38,13 @@ const SetupStepSummary = ({ accountInfo, useCases, twoFactorEnabled, onFinish })
const [installing, setInstalling] = useState(false);
const [installState, setInstallState] = useState({}); // slug -> 'installing'|'done'|'error'
+ // Security posture (plan 47 Ph5). Levels come catalog-resolved from the
+ // backend — a level only lists extensions that are installable right now,
+ // so this section renders honestly even before every security extension
+ // is published. 'minimal' is the lean default.
+ const [postures, setPostures] = useState({});
+ const [securityPosture, setSecurityPosture] = useState('minimal');
+
useEffect(() => {
let active = true;
setRecsLoading(true);
@@ -46,6 +53,7 @@ const SetupStepSummary = ({ accountInfo, useCases, twoFactorEnabled, onFinish })
if (!active) return;
const recs = res?.recommendations || [];
setRecommendations(recs);
+ setPostures(res?.security_postures || {});
// Default: everything checked ("lean" = uncheck what you don't want)
setChecked(new Set(recs.filter((r) => !r.installed).map((r) => r.slug)));
})
@@ -70,19 +78,22 @@ const SetupStepSummary = ({ accountInfo, useCases, twoFactorEnabled, onFinish })
}
async function handleFinish() {
- // Install the checked (not-already-installed) extensions, source-aware,
- // one at a time with per-item progress. Fail-soft: an install failure is
- // surfaced but never blocks completing onboarding.
- const toInstall = recommendations.filter(
- (r) => checked.has(r.slug) && !r.installed
- );
+ // Install the checked (not-already-installed) extensions plus the
+ // chosen security posture's extensions, source-aware, one at a time
+ // with per-item progress. Fail-soft: an install failure is surfaced
+ // but never blocks completing onboarding.
+ const postureExts = (postures[securityPosture] || []);
+ const seen = new Set(recommendations.map((r) => r.slug));
+ const queue = recommendations
+ .filter((r) => checked.has(r.slug) && !r.installed)
+ .concat(postureExts.filter((r) => !r.installed && !seen.has(r.slug)));
const installedSlugs = recommendations
.filter((r) => r.installed && checked.has(r.slug))
.map((r) => r.slug);
- if (toInstall.length > 0) {
+ if (queue.length > 0) {
setInstalling(true);
- for (const rec of toInstall) {
+ for (const rec of queue) {
setInstallState((s) => ({ ...s, [rec.slug]: 'installing' }));
try {
if (rec.source === 'registry') {
@@ -98,7 +109,7 @@ const SetupStepSummary = ({ accountInfo, useCases, twoFactorEnabled, onFinish })
}
}
- await onFinish(installedSlugs, sidebarPreset);
+ await onFinish(installedSlugs, sidebarPreset, securityPosture);
}
function formatSpecs() {
@@ -196,6 +207,47 @@ const SetupStepSummary = ({ accountInfo, useCases, twoFactorEnabled, onFinish })
{twoFactorEnabled ? 'Enabled' : 'Off — you can turn it on in Settings'}
</span>
</div>
+
+ {/* Security posture (plan 47 Ph5): how much tooling to
+ install now. Only levels that resolve at least one
+ installable extension differ from "minimal"; each card
+ names exactly what it would install. */}
+ <p className="recommendation-hint">
+ {t('app.setupStepSummary.howMuchSecurityTooling', 'How much security tooling should we install? Everything here is an extension — add or remove any of it later from the Marketplace.')}
+ </p>
+ <div className="summary-preset-list">
+ {[
+ { key: 'minimal', label: t('app.setupStepSummary.postureMinimal', 'Minimal'), desc: t('app.setupStepSummary.postureMinimalDesc', 'The lean default: firewall, SSH keys, IP lists, integrity and audit — nothing extra installed.') },
+ { key: 'recommended', label: t('app.setupStepSummary.postureRecommended', 'Recommended'), desc: t('app.setupStepSummary.postureRecommendedDesc', 'Adds brute-force protection and automatic security updates.') },
+ { key: 'hardened', label: t('app.setupStepSummary.postureHardened', 'Hardened'), desc: t('app.setupStepSummary.postureHardenedDesc', 'Adds malware scanning, host audits, container image scanning and crowd-sourced IP blocking.') },
+ ].map((level) => {
+ const exts = postures[level.key] || [];
+ return (
+ <button
+ type="button"
+ key={level.key}
+ className={`summary-preset-card${securityPosture === level.key ? ' active' : ''}`}
+ onClick={() => setSecurityPosture(level.key)}
+ aria-pressed={securityPosture === level.key}
+ disabled={installing}
+ >
+ <span className="summary-preset-card__head">
+ <span className="summary-preset-card__label">{level.label}</span>
+ {securityPosture === level.key && <Check size={14} />}
+ </span>
+ <span className="summary-preset-card__desc">
+ {level.desc}
+ {level.key !== 'minimal' && exts.length > 0 && (
+ <> {'— '}{exts.map((e) => e.display_name).join(', ')}</>
+ )}
+ {level.key !== 'minimal' && exts.length === 0 && (
+ <> {t('app.setupStepSummary.postureNotYetAvailable', '— not yet available from the extension registry; pick it later from the Marketplace.')}</>
+ )}
+ </span>
+ </button>
+ );
+ })}
+ </div>
</div>
<div className="summary-section">
diff --git a/frontend/src/contexts/AuthContext.jsx b/frontend/src/contexts/AuthContext.jsx
index a40bebdb..368865cd 100644
--- a/frontend/src/contexts/AuthContext.jsx
+++ b/frontend/src/contexts/AuthContext.jsx
@@ -121,8 +121,8 @@ export function AuthProvider({ children }) {
return data;
}
- async function completeOnboarding(useCases, installedExtensions = [], sidebarPreset = null) {
- await api.completeOnboarding(useCases, installedExtensions);
+ async function completeOnboarding(useCases, installedExtensions = [], sidebarPreset = null, securityPosture = 'minimal') {
+ await api.completeOnboarding(useCases, installedExtensions, securityPosture);
// Tailor the initial sidebar so a fresh install opens focused instead of
// showing every item. The Summary step passes an explicit profile (which
// it pre-selects from the use cases and the user may override); fall back
diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.json
index 45c72c35..c8d6bfa2 100644
--- a/frontend/src/i18n/locales/ar.json
+++ b/frontend/src/i18n/locales/ar.json
@@ -320,22 +320,6 @@
"securityAudit": "التدقيق الأمني",
"securityScore": "درجة الأمان"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "تم تثبيت حزمة التحديثات التلقائية",
- "automaticSecurityUpdates": "تحديثات الأمان التلقائية",
- "automaticSecurityUpdatesAreNotSupported": "التحديثات الأمنية التلقائية غير مدعومة على هذا النظام.",
- "automaticUpdatesDisabled": "تم تعطيل التحديثات التلقائية",
- "automaticUpdatesEnabled": "تم تمكين التحديثات التلقائية",
- "failedToDisable": "فشل التعطيل: {{message}}",
- "failedToEnable": "فشل التمكين: {{message}}",
- "failedToInstall": "فشل التثبيت: {{message}}",
- "installed": "تم التثبيت",
- "loadingAutoUpdatesStatus": "جارٍ تحميل حالة التحديثات التلقائية...",
- "notSupported": "غير مدعوم",
- "package": "طَرد",
- "whatAreAutomaticSecurityUpdates": "ما هي التحديثات الأمنية التلقائية؟",
- "whenEnabledYourServerWillAutomatically": "عند التمكين، سيقوم خادمك تلقائيًا بتنزيل التحديثات الأمنية وتثبيتها، مما يساعد على الحماية من الثغرات الأمنية المعروفة دون تدخل يدوي."
- },
"backupCalendar": {
"nextMonth": "الشهر المقبل",
"previousMonth": "الشهر السابق",
@@ -2180,30 +2164,6 @@
"writePermission": "إذن الكتابة",
"yourServerIpOrDomain": "IP الخادم الخاص بك أو المجال"
},
- "fail2banTab": {
- "activeJails": "السجون النشطة",
- "areYouSureYouWantTo": "هل أنت متأكد أنك تريد إلغاء الحظر عن {{ip}} من {{jail}}؟",
- "banIp": "حظر IP",
- "banIpAddress": "حظر عنوان IP",
- "banned": "محظور",
- "fail2banInstalledSuccessfully": "تم تثبيت Fail2ban بنجاح",
- "fail2banNotInstalled": "لم يتم تثبيت Fail2ban",
- "fail2banStatus": "حالة Fail2ban",
- "failedToBanIp": "فشل حظر IP: {{message}}",
- "failedToInstall": "فشل التثبيت: {{message}}",
- "failedToUnban": "فشل رفع الحظر: {{message}}",
- "installFail2banToProtectAgainstBrute": "قم بتثبيت Fail2ban للحماية من هجمات القوة الغاشمة.",
- "ipBannedIn": "IP {{banIP}} محظور في {{banJail}}",
- "ipUnbanned": "IP {{ip}} غير محظور",
- "jail": "سجن",
- "loadingFail2banStatus": "جارٍ تحميل حالة Fail2ban...",
- "noIpsAreCurrentlyBanned": "لا توجد عناوين IP محظورة حاليًا.",
- "none": "لا أحد",
- "totalBanned": "المحظورة تماما",
- "totalBannedIps": "إجمالي عناوين IP المحظورة",
- "unban": "إلغاء الحظر",
- "unbanIp": "إلغاء حظر IP"
- },
"favoriteStar": {
"addToFavorites": "أضف إلى المفضلة",
"removeFromFavorites": "إزالة من المفضلة"
@@ -3699,8 +3659,6 @@
"applicationInfo": "معلومات التطبيق",
"areYouSureYouWantTo": "هل أنت متأكد أنك تريد إلغاء ربط هذه التطبيقات؟ ستبقى بيانات اعتماد قاعدة البيانات دون تغيير.",
"bandwidth": "عرض النطاق الترددي",
- "clamavAntivirusInstalled": "تم تثبيت برنامج مكافحة الفيروسات ClamAV",
- "clamavServiceRunning": "خدمة ClamAV قيد التشغيل",
"clickRunDiagnosticsToCheckRouting": "انقر فوق \"تشغيل التشخيص\" للتحقق من تكوين التوجيه وتحديد المشكلات.",
"computing": "الحوسبة…",
"cpuLoad": "تحميل وحدة المعالجة المركزية",
@@ -3711,7 +3669,6 @@
"environmentLinking": "الربط البيئي",
"fileIntegrityMonitoringEnabled": "تم تمكين مراقبة سلامة الملف",
"initializeBaseline": "تهيئة خط الأساس",
- "installClamav": "قم بتثبيت كلاماف",
"integrityBaselineInitialized": "تمت تهيئة خط الأساس للنزاهة",
"last90Days": "آخر 90 يومًا",
"linkThisAppToAnotherTo": "اربط هذا التطبيق بآخر لإنشاء زوج إنتاج/تطوير. يمكن للتطبيقات المرتبطة مشاركة بيانات اعتماد قاعدة البيانات.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "مراجعة التغييرات",
"rootPath": "مسار الجذر",
"routingDiagnostics": "تشخيص التوجيه",
- "scan": "مسح",
"securityAlertsConfigured": "تم تكوين التنبيهات الأمنية",
"securityPosture": "الموقف الأمني",
"serviceInfo": "معلومات الخدمة",
- "startService": "ابدأ الخدمة",
"startTheContainerToSeeLive": "ابدأ الحاوية لرؤية الموارد الحية.",
"successful": "ناجح",
"tags": "العلامات",
"thisMonth": "هذا الشهر",
"totalDeploys": "إجمالي عمليات النشر",
"unlinkApps": "إلغاء ربط التطبيقات",
- "virusDefinitions": "تعريفات الفيروسات",
"workers": "العمال"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "تم الحل",
"statusPageUnavailable": "صفحة الحالة غير متاحة"
},
- "quarantineTab": {
- "deleteFile": "حذف الملف",
- "deleteQuarantinedFile": "حذف الملف المعزول",
- "filename": "اسم الملف",
- "infectedFilesWillAppearHereWhen": "ستظهر الملفات المصابة هنا عند اكتشافها",
- "noFilesInQuarantine": "لا توجد ملفات في الحجر الصحي",
- "originalLocation": "الموقع الأصلي",
- "originalLocationUnknown": "الموقع الأصلي غير معروف",
- "permanentlyDeleteThisCannotBeUndone": "هل تريد حذف {{filename}} نهائيًا؟ لا يمكن التراجع عن هذا.",
- "quarantined": "معزول",
- "restoreFile": "استعادة الملف",
- "restoreQuarantinedFile": "استعادة الملف المعزول",
- "restoreToOnlyDoThisFor": "هل تريد استعادة {{name}} إلى {{target}}؟ افعل ذلك فقط من أجل الإيجابيات الكاذبة.",
- "restoreToOriginalLocation": "استعادة إلى الموقع الأصلي"
- },
"queueDetail": {
"allStatuses": "جميع الحالات",
"attempts": "محاولات",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "وضع SSO فقط",
"viewer": "مشاهد"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "تعمل مؤشرات غلاف الويب المنسقة في كل عملية مسح (المحرك:",
- "customPath": "مسار مخصص",
- "date": "تاريخ",
- "deleteCustomRuleFile": "هل تريد حذف ملف القاعدة المخصصة {{name}}؟",
- "deleteRule": "حذف القاعدة",
- "deleteScannerRule": "حذف قاعدة الماسح الضوئي",
- "directory": "دليل",
- "file": "ملف",
- "filesScanned": "الملفات التي تم فحصها:",
- "fullScan": "المسح الكامل",
- "inactiveYaraNotInstalled": "غير نشط — لم يتم تثبيت يارا",
- "job": "وظيفة:",
- "match": "مباراة",
- "noCustomRuleFilesUploadA": "لا توجد ملفات قاعدة مخصصة. قم بتحميل ملف .yar (بحد أقصى 64 كيلو بايت) لتوسيع مجموعة القواعد.",
- "noScansHaveBeenRunYet": "لم يتم إجراء أي عمليات فحص حتى الآن.",
- "quickScan": "المسح السريع",
- "rule": "قاعدة",
- "scan": "مسح",
- "scanASpecificDirectory": "مسح دليل محدد",
- "scanAnApp": "مسح التطبيق",
- "scanCommonWebDirectories": "مسح أدلة الويب المشتركة",
- "scanEntireSystemSlow": "فحص النظام بأكمله (بطيء)",
- "scanInProgress": "المسح قيد التقدم",
- "scanning": "مسح:",
- "selectAnApp": "حدد تطبيقًا…",
- "startAScanAboveToCheck": "ابدأ الفحص أعلاه للتحقق من وجود تهديدات.",
- "startScan": "ابدأ المسح",
- "started": "بدأت:",
- "threats": "التهديدات",
- "uploadYar": "تحميل .yar",
- "webShellDetectionRules": "قواعد الكشف عن قشرة الويب",
- "webShellMalwareScanOfA": "Web-Shell + فحص البرامج الضارة لـ docroot",
- "webShellRules": "قواعد قشرة الويب"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "يتم أخذ نسخة احتياطية كاملة كل N من الأيام؛ والباقي تدريجي.",
"backupsRunQuietlyInTheBackground": "تعمل النسخ الاحتياطية بهدوء في الخلفية.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "مراجعة",
- "autoUpdates": "التحديثات التلقائية",
"events": "الأحداث",
- "fail2ban": "Fail2ban",
"fileIntegrity": "سلامة الملف",
"firewall": "جدار الحماية",
"ipLists": "قوائم IP",
- "malwareScanner": "ماسح البرامج الضارة",
- "quarantine": "الحجر الصحي",
- "sshKeys": "مفاتيح SSH",
- "vulnerabilityScan": "فحص الثغرات الأمنية"
+ "sshKeys": "مفاتيح SSH"
},
"serverDetail": {
"alerts": "التنبيهات",
@@ -6562,25 +6461,6 @@
"volumeName": "اسم المجلد *",
"volumeRemovedSuccessfully": "تمت إزالة المجلد بنجاح"
},
- "vulnerabilityTab": {
- "failedToInstall": "فشل التثبيت: {{message}}",
- "failedToStartScan": "فشل بدء الفحص: {{message}}",
- "hardeningIndex": "مؤشر تصلب",
- "installLynisToPerformSecurityAudits": "قم بتثبيت Lynis لإجراء عمليات التدقيق الأمني وفحص الثغرات الأمنية.",
- "loadingVulnerabilityScannerStatus": "جارٍ تحميل حالة فحص الثغرات الأمنية...",
- "lynisInstalledSuccessfully": "تم تثبيت Lynis بنجاح",
- "lynisNotInstalled": "لينيس غير مثبت",
- "lynisVulnerabilityScanner": "برنامج فحص الثغرات الأمنية في Lynis",
- "scanInProgress": "المسح قيد التقدم",
- "scanResults": "نتائج المسح",
- "scanStatus": "حالة المسح",
- "scanningSystemForVulnerabilities": "نظام فحص نقاط الضعف...",
- "started": "بدأت:",
- "suggestions": "الاقتراحات (",
- "vulnerabilityScanStarted": "بدأ فحص الثغرات الأمنية",
- "warnings": "تحذيرات ·",
- "warnings2": "تحذيرات ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "إنشاء اشتراك Webhook",
"eGSlackNotificationsCiTrigger": "على سبيل المثال إشعارات الركود، مشغل CI",
diff --git a/frontend/src/i18n/locales/bn.json b/frontend/src/i18n/locales/bn.json
index 1775cf55..a6b21d82 100644
--- a/frontend/src/i18n/locales/bn.json
+++ b/frontend/src/i18n/locales/bn.json
@@ -320,22 +320,6 @@
"securityAudit": "নিরাপত্তা নিরীক্ষা",
"securityScore": "নিরাপত্তা স্কোর"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "স্বয়ংক্রিয় আপডেট প্যাকেজ ইনস্টল করা হয়েছে",
- "automaticSecurityUpdates": "স্বয়ংক্রিয় নিরাপত্তা আপডেট",
- "automaticSecurityUpdatesAreNotSupported": "এই সিস্টেমে স্বয়ংক্রিয় নিরাপত্তা আপডেট সমর্থিত নয়।",
- "automaticUpdatesDisabled": "স্বয়ংক্রিয় আপডেট নিষ্ক্রিয়",
- "automaticUpdatesEnabled": "স্বয়ংক্রিয় আপডেট সক্রিয়",
- "failedToDisable": "নিষ্ক্রিয় করতে ব্যর্থ হয়েছে: {{message}}",
- "failedToEnable": "সক্ষম করতে ব্যর্থ হয়েছে: {{message}}",
- "failedToInstall": "ইনস্টল করতে ব্যর্থ হয়েছে: {{message}}",
- "installed": "ইনস্টল করা হয়েছে",
- "loadingAutoUpdatesStatus": "স্বয়ংক্রিয়-আপডেট স্থিতি লোড হচ্ছে...",
- "notSupported": "সমর্থিত নয়",
- "package": "প্যাকেজ",
- "whatAreAutomaticSecurityUpdates": "স্বয়ংক্রিয় নিরাপত্তা আপডেট কি?",
- "whenEnabledYourServerWillAutomatically": "সক্রিয় করা হলে, আপনার সার্ভার স্বয়ংক্রিয়ভাবে নিরাপত্তা আপডেটগুলি ডাউনলোড এবং ইনস্টল করবে, ম্যানুয়াল হস্তক্ষেপ ছাড়াই পরিচিত দুর্বলতাগুলির বিরুদ্ধে রক্ষা করতে সহায়তা করবে৷"
- },
"backupCalendar": {
"nextMonth": "পরের মাসে",
"previousMonth": "আগের মাস",
@@ -2180,30 +2164,6 @@
"writePermission": "অনুমতি লিখুন",
"yourServerIpOrDomain": "আপনার সার্ভার আইপি বা ডোমেইন"
},
- "fail2banTab": {
- "activeJails": "সক্রিয় কারাগার",
- "areYouSureYouWantTo": "আপনি কি {{jail}} থেকে {{ip}} নিষিদ্ধ করার বিষয়ে নিশ্চিত?",
- "banIp": "আইপি নিষিদ্ধ করুন",
- "banIpAddress": "আইপি ঠিকানা নিষিদ্ধ করুন",
- "banned": "নিষিদ্ধ",
- "fail2banInstalledSuccessfully": "Fail2ban সফলভাবে ইনস্টল করা হয়েছে",
- "fail2banNotInstalled": "Fail2ban ইনস্টল করা হয়নি",
- "fail2banStatus": "Fail2ban অবস্থা",
- "failedToBanIp": "আইপি নিষিদ্ধ করতে ব্যর্থ হয়েছে: {{message}}",
- "failedToInstall": "ইনস্টল করতে ব্যর্থ হয়েছে: {{message}}",
- "failedToUnban": "নিষেধাজ্ঞা মুক্ত করতে ব্যর্থ হয়েছে: {{message}}",
- "installFail2banToProtectAgainstBrute": "নৃশংস শক্তি আক্রমণ থেকে রক্ষা করতে Fail2ban ইনস্টল করুন।",
- "ipBannedIn": "IP {{banIP}} {{banJail}}-এ নিষিদ্ধ",
- "ipUnbanned": "IP {{ip}} নিষিদ্ধ",
- "jail": "জেল",
- "loadingFail2banStatus": "Fail2ban স্থিতি লোড হচ্ছে...",
- "noIpsAreCurrentlyBanned": "বর্তমানে কোনো আইপি নিষিদ্ধ করা হয়নি।",
- "none": "কোনোটিই নয়",
- "totalBanned": "সম্পূর্ণ নিষিদ্ধ",
- "totalBannedIps": "মোট নিষিদ্ধ আইপি",
- "unban": "নিষেধাজ্ঞা মুক্ত করুন",
- "unbanIp": "আইপি নিষিদ্ধ করুন"
- },
"favoriteStar": {
"addToFavorites": "পছন্দসই যোগ করুন",
"removeFromFavorites": "প্রিয় থেকে সরান"
@@ -3699,8 +3659,6 @@
"applicationInfo": "আবেদনের তথ্য",
"areYouSureYouWantTo": "আপনি কি এই অ্যাপ্লিকেশানগুলি লিঙ্কমুক্ত করার বিষয়ে নিশ্চিত? ডাটাবেস শংসাপত্র অপরিবর্তিত থাকবে।",
"bandwidth": "ব্যান্ডউইথ",
- "clamavAntivirusInstalled": "ClamAV অ্যান্টিভাইরাস ইনস্টল করা হয়েছে",
- "clamavServiceRunning": "ClamAV পরিষেবা চলছে",
"clickRunDiagnosticsToCheckRouting": "রাউটিং কনফিগারেশন পরীক্ষা করতে এবং সমস্যা চিহ্নিত করতে \"রান ডায়াগনস্টিকস\" এ ক্লিক করুন।",
"computing": "কম্পিউটিং...",
"cpuLoad": "CPU লোড",
@@ -3711,7 +3669,6 @@
"environmentLinking": "এনভায়রনমেন্ট লিঙ্কিং",
"fileIntegrityMonitoringEnabled": "ফাইল অখণ্ডতা পর্যবেক্ষণ সক্ষম",
"initializeBaseline": "বেসলাইন শুরু করুন",
- "installClamav": "ClamAV ইনস্টল করুন",
"integrityBaselineInitialized": "ইন্টিগ্রিটি বেসলাইন আরম্ভ করা হয়েছে",
"last90Days": "গত 90 দিন",
"linkThisAppToAnotherTo": "একটি প্রোডাকশন/ডেভেলপমেন্ট পেয়ার তৈরি করতে এই অ্যাপটিকে অন্যের সাথে লিঙ্ক করুন। লিঙ্ক করা অ্যাপগুলি ডাটাবেস শংসাপত্র শেয়ার করতে পারে।",
@@ -3736,18 +3693,15 @@
"reviewChanges": "পরিবর্তনগুলি পর্যালোচনা করুন",
"rootPath": "রুট পাথ",
"routingDiagnostics": "রাউটিং ডায়াগনস্টিকস",
- "scan": "স্ক্যান করুন",
"securityAlertsConfigured": "নিরাপত্তা সতর্কতা কনফিগার করা হয়েছে",
"securityPosture": "নিরাপত্তা ভঙ্গি",
"serviceInfo": "পরিষেবা তথ্য",
- "startService": "পরিষেবা শুরু করুন",
"startTheContainerToSeeLive": "লাইভ সম্পদ দেখতে কন্টেইনার শুরু করুন.",
"successful": "সফল",
"tags": "ট্যাগ",
"thisMonth": "এই মাসে",
"totalDeploys": "মোট স্থাপনা",
"unlinkApps": "অ্যাপস লিঙ্কমুক্ত করুন",
- "virusDefinitions": "ভাইরাস সংজ্ঞা",
"workers": "শ্রমিকরা"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "সমাধান করা হয়েছে",
"statusPageUnavailable": "স্থিতি পৃষ্ঠা অনুপলব্ধ"
},
- "quarantineTab": {
- "deleteFile": "ফাইল মুছুন",
- "deleteQuarantinedFile": "কোয়ারেন্টাইন করা ফাইল মুছে দিন",
- "filename": "ফাইলের নাম",
- "infectedFilesWillAppearHereWhen": "সংক্রমিত ফাইল সনাক্ত করা হলে এখানে প্রদর্শিত হবে",
- "noFilesInQuarantine": "কোয়ারেন্টাইনে কোনো ফাইল নেই",
- "originalLocation": "আসল অবস্থান",
- "originalLocationUnknown": "আসল অবস্থান অজানা",
- "permanentlyDeleteThisCannotBeUndone": "স্থায়ীভাবে {{filename}} মুছে ফেলবেন? এটি পূর্বাবস্থায় ফেরানো যাবে না।",
- "quarantined": "কোয়ারেন্টাইন",
- "restoreFile": "ফাইল পুনরুদ্ধার করুন",
- "restoreQuarantinedFile": "কোয়ারেন্টাইন ফাইল পুনরুদ্ধার করুন",
- "restoreToOnlyDoThisFor": "{{name}} {{target}} এ পুনরুদ্ধার করবেন? শুধুমাত্র মিথ্যা ইতিবাচক জন্য এটি করুন.",
- "restoreToOriginalLocation": "আসল অবস্থানে পুনরুদ্ধার করুন"
- },
"queueDetail": {
"allStatuses": "সব স্ট্যাটাস",
"attempts": "প্রচেষ্টা",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "SSO-শুধুমাত্র মোড",
"viewer": "দর্শক"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "কিউরেটেড ওয়েব-শেল সূচকগুলি প্রতিটি স্ক্যানে চলে (ইঞ্জিন:",
- "customPath": "কাস্টম পথ",
- "date": "তারিখ",
- "deleteCustomRuleFile": "কাস্টম নিয়ম ফাইল {{name}} মুছবেন?",
- "deleteRule": "নিয়ম মুছুন",
- "deleteScannerRule": "স্ক্যানার নিয়ম মুছুন",
- "directory": "ডিরেক্টরি",
- "file": "ফাইল",
- "filesScanned": "ফাইল স্ক্যান করা হয়েছে:",
- "fullScan": "সম্পূর্ণ স্ক্যান",
- "inactiveYaraNotInstalled": "নিষ্ক্রিয় — ইয়ারা ইনস্টল করা হয়নি",
- "job": "চাকরি:",
- "match": "ম্যাচ",
- "noCustomRuleFilesUploadA": "কোনো কাস্টম নিয়ম ফাইল নেই। নিয়ম সেট প্রসারিত করতে একটি .yar ফাইল (সর্বোচ্চ 64 KB) আপলোড করুন।",
- "noScansHaveBeenRunYet": "এখনও কোন স্ক্যান চালানো হয়নি.",
- "quickScan": "দ্রুত স্ক্যান",
- "rule": "নিয়ম",
- "scan": "স্ক্যান করুন",
- "scanASpecificDirectory": "একটি নির্দিষ্ট ডিরেক্টরি স্ক্যান করুন",
- "scanAnApp": "একটি অ্যাপ স্ক্যান করুন",
- "scanCommonWebDirectories": "সাধারণ ওয়েব ডিরেক্টরি স্ক্যান করুন",
- "scanEntireSystemSlow": "পুরো সিস্টেম স্ক্যান করুন (ধীরে)",
- "scanInProgress": "স্ক্যান চলছে",
- "scanning": "স্ক্যানিং:",
- "selectAnApp": "একটি অ্যাপ নির্বাচন করুন...",
- "startAScanAboveToCheck": "হুমকির জন্য পরীক্ষা করার জন্য উপরে একটি স্ক্যান শুরু করুন।",
- "startScan": "স্ক্যান শুরু করুন",
- "started": "শুরু হয়েছে:",
- "threats": "হুমকি",
- "uploadYar": "আপলোড .yar",
- "webShellDetectionRules": "ওয়েব-শেল সনাক্তকরণ নিয়ম",
- "webShellMalwareScanOfA": "একটি ডকরুটের ওয়েব-শেল + ম্যালওয়্যার স্ক্যান",
- "webShellRules": "ওয়েব শেল নিয়ম"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "প্রতি N দিনে একটি সম্পূর্ণ ব্যাকআপ নেওয়া হয়; বাকিগুলো ক্রমবর্ধমান।",
"backupsRunQuietlyInTheBackground": "ব্যাকআপগুলি পটভূমিতে শান্তভাবে চলে।",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "নিরীক্ষা",
- "autoUpdates": "স্বয়ংক্রিয় আপডেট",
"events": "ঘটনা",
- "fail2ban": "Fail2ban",
"fileIntegrity": "ফাইল অখণ্ডতা",
"firewall": "ফায়ারওয়াল",
"ipLists": "আইপি তালিকা",
- "malwareScanner": "ম্যালওয়্যার স্ক্যানার",
- "quarantine": "পৃথকীকরণ",
- "sshKeys": "SSH কী",
- "vulnerabilityScan": "দুর্বলতা স্ক্যান"
+ "sshKeys": "SSH কী"
},
"serverDetail": {
"alerts": "সতর্কতা",
@@ -6562,25 +6461,6 @@
"volumeName": "আয়তনের নাম *",
"volumeRemovedSuccessfully": "ভলিউম সফলভাবে সরানো হয়েছে৷"
},
- "vulnerabilityTab": {
- "failedToInstall": "ইনস্টল করতে ব্যর্থ হয়েছে: {{message}}",
- "failedToStartScan": "স্ক্যান শুরু করতে ব্যর্থ হয়েছে: {{message}}",
- "hardeningIndex": "শক্তকরণ সূচক",
- "installLynisToPerformSecurityAudits": "নিরাপত্তা অডিট এবং দুর্বলতা স্ক্যান করার জন্য Lynis ইনস্টল করুন।",
- "loadingVulnerabilityScannerStatus": "দুর্বলতা স্ক্যানার স্থিতি লোড হচ্ছে...",
- "lynisInstalledSuccessfully": "লিনিস সফলভাবে ইনস্টল করা হয়েছে",
- "lynisNotInstalled": "লিনিস ইনস্টল করা হয়নি",
- "lynisVulnerabilityScanner": "লিনিস ভালনারেবিলিটি স্ক্যানার",
- "scanInProgress": "স্ক্যান চলছে",
- "scanResults": "স্ক্যান ফলাফল",
- "scanStatus": "স্ক্যান স্ট্যাটাস",
- "scanningSystemForVulnerabilities": "দুর্বলতার জন্য স্ক্যানিং সিস্টেম...",
- "started": "শুরু হয়েছে:",
- "suggestions": "পরামর্শ (",
- "vulnerabilityScanStarted": "দুর্বলতা স্ক্যান শুরু হয়েছে",
- "warnings": "সতর্কতা",
- "warnings2": "সতর্কতা ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "ওয়েবহুক সাবস্ক্রিপশন তৈরি করুন",
"eGSlackNotificationsCiTrigger": "যেমন স্ল্যাক বিজ্ঞপ্তি, CI ট্রিগার",
diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json
index 2bcb9f30..dfb42bbe 100644
--- a/frontend/src/i18n/locales/de.json
+++ b/frontend/src/i18n/locales/de.json
@@ -320,22 +320,6 @@
"securityAudit": "Sicherheitsaudit",
"securityScore": "Sicherheitsbewertung"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Auto-Updates-Paket installiert",
- "automaticSecurityUpdates": "Automatische Sicherheitsupdates",
- "automaticSecurityUpdatesAreNotSupported": "Automatische Sicherheitsupdates werden auf diesem System nicht unterstützt.",
- "automaticUpdatesDisabled": "Automatische Updates deaktiviert",
- "automaticUpdatesEnabled": "Automatische Updates aktiviert",
- "failedToDisable": "Deaktivierung fehlgeschlagen: {{message}}",
- "failedToEnable": "Aktivierung fehlgeschlagen: {{message}}",
- "failedToInstall": "Installation fehlgeschlagen: {{message}}",
- "installed": "Installiert",
- "loadingAutoUpdatesStatus": "Der Status der automatischen Updates wird geladen...",
- "notSupported": "Nicht unterstützt",
- "package": "Paket",
- "whatAreAutomaticSecurityUpdates": "Was sind automatische Sicherheitsupdates?",
- "whenEnabledYourServerWillAutomatically": "Wenn diese Option aktiviert ist, lädt Ihr Server automatisch Sicherheitsupdates herunter und installiert sie, um so ohne manuelles Eingreifen vor bekannten Schwachstellen zu schützen."
- },
"backupCalendar": {
"nextMonth": "Nächsten Monat",
"previousMonth": "Vorheriger Monat",
@@ -2180,30 +2164,6 @@
"writePermission": "Schreiberlaubnis",
"yourServerIpOrDomain": "Ihre Server-IP oder Domäne"
},
- "fail2banTab": {
- "activeJails": "Aktive Gefängnisse",
- "areYouSureYouWantTo": "Sind Sie sicher, dass Sie die Sperre von {{ip}} für {{jail}} aufheben möchten?",
- "banIp": "IP verbieten",
- "banIpAddress": "IP-Adresse verbieten",
- "banned": "Verboten",
- "fail2banInstalledSuccessfully": "Fail2ban erfolgreich installiert",
- "fail2banNotInstalled": "Fail2ban nicht installiert",
- "fail2banStatus": "Fail2ban-Status",
- "failedToBanIp": "IP konnte nicht gesperrt werden: {{message}}",
- "failedToInstall": "Installation fehlgeschlagen: {{message}}",
- "failedToUnban": "Die Sperrung konnte nicht aufgehoben werden: {{message}}",
- "installFail2banToProtectAgainstBrute": "Installieren Sie Fail2ban, um sich vor Brute-Force-Angriffen zu schützen.",
- "ipBannedIn": "IP {{banIP}} in {{banJail}} gesperrt",
- "ipUnbanned": "IP {{ip}} entsperrt",
- "jail": "Gefängnis",
- "loadingFail2banStatus": "Fail2ban-Status wird geladen...",
- "noIpsAreCurrentlyBanned": "Derzeit sind keine IPs gesperrt.",
- "none": "Keine",
- "totalBanned": "Total verboten",
- "totalBannedIps": "Gesamtzahl der gesperrten IPs",
- "unban": "Verbot aufheben",
- "unbanIp": "IP entsperren"
- },
"favoriteStar": {
"addToFavorites": "Zu Favoriten hinzufügen",
"removeFromFavorites": "Aus Favoriten entfernen"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Bewerbungsinfo",
"areYouSureYouWantTo": "Möchten Sie die Verknüpfung dieser Apps wirklich aufheben? Die Datenbankanmeldeinformationen bleiben unverändert.",
"bandwidth": "Bandbreite",
- "clamavAntivirusInstalled": "ClamAV-Antivirus installiert",
- "clamavServiceRunning": "ClamAV-Dienst läuft",
"clickRunDiagnosticsToCheckRouting": "Klicken Sie auf „Diagnose ausführen“, um die Routing-Konfiguration zu überprüfen und Probleme zu identifizieren.",
"computing": "Computer…",
"cpuLoad": "CPU-Last",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Umgebungsverknüpfung",
"fileIntegrityMonitoringEnabled": "Überwachung der Dateiintegrität aktiviert",
"initializeBaseline": "Grundlinie initialisieren",
- "installClamav": "Installieren Sie ClamAV",
"integrityBaselineInitialized": "Integritätsbasislinie initialisiert",
"last90Days": "Letzte 90 Tage",
"linkThisAppToAnotherTo": "Verknüpfen Sie diese App mit einer anderen, um ein Produktions-/Entwicklungspaar zu erstellen. Verknüpfte Apps können Datenbankanmeldeinformationen teilen.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Überprüfen Sie die Änderungen",
"rootPath": "Root-Pfad",
"routingDiagnostics": "Routing-Diagnose",
- "scan": "Scannen",
"securityAlertsConfigured": "Sicherheitswarnungen konfiguriert",
"securityPosture": "Sicherheitslage",
"serviceInfo": "Service-Info",
- "startService": "Dienst starten",
"startTheContainerToSeeLive": "Starten Sie den Container, um Live-Ressourcen anzuzeigen.",
"successful": "Erfolgreich",
"tags": "Schlagworte",
"thisMonth": "diesen Monat",
"totalDeploys": "Gesamtzahl der Bereitstellungen",
"unlinkApps": "Verknüpfung von Apps aufheben",
- "virusDefinitions": "Virendefinitionen",
"workers": "Arbeiter"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Gelöst",
"statusPageUnavailable": "Statusseite nicht verfügbar"
},
- "quarantineTab": {
- "deleteFile": "Datei löschen",
- "deleteQuarantinedFile": "Quarantänedatei löschen",
- "filename": "Dateiname",
- "infectedFilesWillAppearHereWhen": "Infizierte Dateien werden hier angezeigt, wenn sie erkannt werden",
- "noFilesInQuarantine": "Keine Dateien in Quarantäne",
- "originalLocation": "Ursprünglicher Standort",
- "originalLocationUnknown": "Ursprünglicher Standort unbekannt",
- "permanentlyDeleteThisCannotBeUndone": "{{filename}} dauerhaft löschen? Dies kann nicht rückgängig gemacht werden.",
- "quarantined": "Unter Quarantäne gestellt",
- "restoreFile": "Datei wiederherstellen",
- "restoreQuarantinedFile": "Stellen Sie die unter Quarantäne gestellte Datei wieder her",
- "restoreToOnlyDoThisFor": "{{name}} auf {{target}} wiederherstellen? Tun Sie dies nur bei Fehlalarmen.",
- "restoreToOriginalLocation": "Am ursprünglichen Speicherort wiederherstellen"
- },
"queueDetail": {
"allStatuses": "Alle Status",
"attempts": "Versuche",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Nur-SSO-Modus",
"viewer": "Zuschauer"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "Kuratierte Web-Shell-Indikatoren werden bei jedem Scan ausgeführt (Engine:",
- "customPath": "Benutzerdefinierter Pfad",
- "date": "Datum",
- "deleteCustomRuleFile": "Benutzerdefinierte Regeldatei {{name}} löschen?",
- "deleteRule": "Regel löschen",
- "deleteScannerRule": "Scannerregel löschen",
- "directory": "Verzeichnis",
- "file": "Datei",
- "filesScanned": "Gescannte Dateien:",
- "fullScan": "Vollständiger Scan",
- "inactiveYaraNotInstalled": "inaktiv – Yara nicht installiert",
- "job": "Beruf:",
- "match": "Spiel",
- "noCustomRuleFilesUploadA": "Keine benutzerdefinierten Regeldateien. Laden Sie eine .yar-Datei (maximal 64 KB) hoch, um den Regelsatz zu erweitern.",
- "noScansHaveBeenRunYet": "Es wurden noch keine Scans durchgeführt.",
- "quickScan": "Schneller Scan",
- "rule": "Regel",
- "scan": "Scannen",
- "scanASpecificDirectory": "Scannen Sie ein bestimmtes Verzeichnis",
- "scanAnApp": "Scannen Sie eine App",
- "scanCommonWebDirectories": "Scannen Sie gängige Webverzeichnisse",
- "scanEntireSystemSlow": "Gesamtes System scannen (langsam)",
- "scanInProgress": "Scan läuft",
- "scanning": "Scannen:",
- "selectAnApp": "Wählen Sie eine App aus…",
- "startAScanAboveToCheck": "Starten Sie oben einen Scan, um nach Bedrohungen zu suchen.",
- "startScan": "Starten Sie den Scan",
- "started": "Begonnen:",
- "threats": "Bedrohungen",
- "uploadYar": "Laden Sie .yar hoch",
- "webShellDetectionRules": "Web-Shell-Erkennungsregeln",
- "webShellMalwareScanOfA": "Web-Shell + Malware-Scan eines Docroot",
- "webShellRules": "Web-Shell-Regeln"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Alle N Tage wird ein vollständiges Backup erstellt; der Rest ist inkrementell.",
"backupsRunQuietlyInTheBackground": "Backups laufen leise im Hintergrund.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Prüfung",
- "autoUpdates": "Automatische Updates",
"events": "Veranstaltungen",
- "fail2ban": "Fail2ban",
"fileIntegrity": "Dateiintegrität",
"firewall": "Firewall",
"ipLists": "IP-Listen",
- "malwareScanner": "Malware-Scanner",
- "quarantine": "Quarantäne",
- "sshKeys": "SSH-Schlüssel",
- "vulnerabilityScan": "Schwachstellenscan"
+ "sshKeys": "SSH-Schlüssel"
},
"serverDetail": {
"alerts": "Warnungen",
@@ -6562,25 +6461,6 @@
"volumeName": "Datenträgername *",
"volumeRemovedSuccessfully": "Volume erfolgreich entfernt"
},
- "vulnerabilityTab": {
- "failedToInstall": "Installation fehlgeschlagen: {{message}}",
- "failedToStartScan": "Scan konnte nicht gestartet werden: {{message}}",
- "hardeningIndex": "Härteindex",
- "installLynisToPerformSecurityAudits": "Installieren Sie Lynis, um Sicherheitsüberprüfungen und Schwachstellenscans durchzuführen.",
- "loadingVulnerabilityScannerStatus": "Status des Schwachstellenscanners wird geladen...",
- "lynisInstalledSuccessfully": "Lynis wurde erfolgreich installiert",
- "lynisNotInstalled": "Lynis nicht installiert",
- "lynisVulnerabilityScanner": "Lynis Vulnerability Scanner",
- "scanInProgress": "Scan läuft",
- "scanResults": "Scan-Ergebnisse",
- "scanStatus": "Scanstatus",
- "scanningSystemForVulnerabilities": "Scansystem für Schwachstellen...",
- "started": "Begonnen:",
- "suggestions": "Vorschläge (",
- "vulnerabilityScanStarted": "Der Schwachstellenscan wurde gestartet",
- "warnings": "Warnungen ·",
- "warnings2": "Warnungen ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Erstellen Sie ein Webhook-Abonnement",
"eGSlackNotificationsCiTrigger": "z.B. Slack-Benachrichtigungen, CI-Trigger",
diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json
index 3c01d4a2..e8a3c408 100644
--- a/frontend/src/i18n/locales/en.json
+++ b/frontend/src/i18n/locales/en.json
@@ -331,22 +331,6 @@
"securityAudit": "Security Audit",
"securityScore": "security score"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Auto-updates package installed",
- "automaticSecurityUpdates": "Automatic Security Updates",
- "automaticSecurityUpdatesAreNotSupported": "Automatic security updates are not supported on this system.",
- "automaticUpdatesDisabled": "Automatic updates disabled",
- "automaticUpdatesEnabled": "Automatic updates enabled",
- "failedToDisable": "Failed to disable: {{message}}",
- "failedToEnable": "Failed to enable: {{message}}",
- "failedToInstall": "Failed to install: {{message}}",
- "installed": "Installed",
- "loadingAutoUpdatesStatus": "Loading auto-updates status…",
- "notSupported": "Not Supported",
- "package": "Package",
- "whatAreAutomaticSecurityUpdates": "What are automatic security updates?",
- "whenEnabledYourServerWillAutomatically": "When enabled, your server will automatically download and install security updates, helping protect against known vulnerabilities without manual intervention."
- },
"backupCalendar": {
"nextMonth": "Next month",
"previousMonth": "Previous month",
@@ -2259,30 +2243,6 @@
"writePermission": "Write Permission",
"yourServerIpOrDomain": "Your server IP or domain"
},
- "fail2banTab": {
- "activeJails": "Active jails",
- "areYouSureYouWantTo": "Are you sure you want to unban {{ip}} from {{jail}}?",
- "banIp": "Ban IP",
- "banIpAddress": "Ban IP Address",
- "banned": "Banned",
- "fail2banInstalledSuccessfully": "Fail2ban installed successfully",
- "fail2banNotInstalled": "Fail2ban Not Installed",
- "fail2banStatus": "Fail2ban Status",
- "failedToBanIp": "Failed to ban IP: {{message}}",
- "failedToInstall": "Failed to install: {{message}}",
- "failedToUnban": "Failed to unban: {{message}}",
- "installFail2banToProtectAgainstBrute": "Install Fail2ban to protect against brute force attacks.",
- "ipBannedIn": "IP {{banIP}} banned in {{banJail}}",
- "ipUnbanned": "IP {{ip}} unbanned",
- "jail": "Jail",
- "loadingFail2banStatus": "Loading Fail2ban status…",
- "noIpsAreCurrentlyBanned": "No IPs are currently banned.",
- "none": "None",
- "totalBanned": "Total banned",
- "totalBannedIps": "Total banned IPs",
- "unban": "Unban",
- "unbanIp": "Unban IP"
- },
"favoriteStar": {
"addToFavorites": "Add to favorites",
"removeFromFavorites": "Remove from favorites"
@@ -3824,8 +3784,6 @@
"applicationInfo": "Application Info",
"areYouSureYouWantTo": "Are you sure you want to unlink these apps? Database credentials will remain unchanged.",
"bandwidth": "Bandwidth",
- "clamavAntivirusInstalled": "ClamAV antivirus installed",
- "clamavServiceRunning": "ClamAV service running",
"clickRunDiagnosticsToCheckRouting": "Click \"Run Diagnostics\" to check routing configuration and identify issues.",
"computing": "Computing…",
"cpuLoad": "CPU Load",
@@ -3836,13 +3794,15 @@
"environmentLinking": "Environment Linking",
"fileIntegrityMonitoringEnabled": "File integrity monitoring enabled",
"initializeBaseline": "Initialize baseline",
- "installClamav": "Install ClamAV",
"integrityBaselineInitialized": "Integrity baseline initialized",
+ "integrityChanges": "Integrity · 24h",
"last90Days": "Last 90 days",
"linkThisAppToAnotherTo": "Link this app to another to create a production/development pair. Linked apps can share database credentials.",
"liveResources": "Live Resources",
"loadingMetrics": "Loading metrics…",
"malware": "Malware",
+ "marketplaceLink": "Marketplace",
+ "moreSecurityTools": "More security tools — malware scanning, brute-force protection, vulnerability scans, auto-updates — are available as extensions in the",
"networkIO": "Network I/O",
"noDeploymentsYetDeployYourService": "No deployments yet. Deploy your service to see history here.",
"noIntegrityChanges24h": "No integrity changes (24h)",
@@ -3861,18 +3821,15 @@
"reviewChanges": "Review changes",
"rootPath": "Root Path",
"routingDiagnostics": "Routing Diagnostics",
- "scan": "Scan",
"securityAlertsConfigured": "Security alerts configured",
"securityPosture": "Security posture",
"serviceInfo": "Service Info",
- "startService": "Start service",
"startTheContainerToSeeLive": "Start the container to see live resources.",
"successful": "Successful",
"tags": "Tags",
"thisMonth": "this month",
"totalDeploys": "Total Deploys",
"unlinkApps": "Unlink Apps",
- "virusDefinitions": "Virus definitions",
"workers": "Workers"
},
"packagesTab": {
@@ -4196,21 +4153,6 @@
"resolved": "Resolved",
"statusPageUnavailable": "Status page unavailable"
},
- "quarantineTab": {
- "deleteFile": "Delete file",
- "deleteQuarantinedFile": "Delete quarantined file",
- "filename": "Filename",
- "infectedFilesWillAppearHereWhen": "Infected files will appear here when detected",
- "noFilesInQuarantine": "No files in quarantine",
- "originalLocation": "Original Location",
- "originalLocationUnknown": "Original location unknown",
- "permanentlyDeleteThisCannotBeUndone": "Permanently delete {{filename}}? This cannot be undone.",
- "quarantined": "Quarantined",
- "restoreFile": "Restore file",
- "restoreQuarantinedFile": "Restore quarantined file",
- "restoreToOnlyDoThisFor": "Restore {{name}} to {{target}}? Only do this for false positives.",
- "restoreToOriginalLocation": "Restore to original location"
- },
"queueDetail": {
"allStatuses": "All statuses",
"attempts": "Attempts",
@@ -4657,41 +4599,6 @@
"ssoOnlyMode": "SSO-only mode",
"viewer": "Viewer"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "curated web-shell indicators run on every scan (engine:",
- "customPath": "Custom Path",
- "date": "Date",
- "deleteCustomRuleFile": "Delete custom rule file {{name}}?",
- "deleteRule": "Delete rule",
- "deleteScannerRule": "Delete scanner rule",
- "directory": "Directory",
- "file": "File",
- "filesScanned": "Files scanned:",
- "fullScan": "Full Scan",
- "inactiveYaraNotInstalled": "inactive — yara not installed",
- "job": "Job:",
- "match": "Match",
- "noCustomRuleFilesUploadA": "No custom rule files. Upload a .yar file (max 64 KB) to extend the rule set.",
- "noScansHaveBeenRunYet": "No scans have been run yet.",
- "quickScan": "Quick Scan",
- "rule": "Rule",
- "scan": "Scan",
- "scanASpecificDirectory": "Scan a specific directory",
- "scanAnApp": "Scan an App",
- "scanCommonWebDirectories": "Scan common web directories",
- "scanEntireSystemSlow": "Scan entire system (slow)",
- "scanInProgress": "Scan in Progress",
- "scanning": "Scanning:",
- "selectAnApp": "Select an app…",
- "startAScanAboveToCheck": "Start a scan above to check for threats.",
- "startScan": "Start Scan",
- "started": "Started:",
- "threats": "Threats",
- "uploadYar": "Upload .yar",
- "webShellDetectionRules": "Web-shell Detection Rules",
- "webShellMalwareScanOfA": "Web-shell + malware scan of a docroot",
- "webShellRules": "Web-shell Rules"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "A full backup is taken every N days; the rest are incremental.",
"backupsRunQuietlyInTheBackground": "Backups run quietly in the background.",
@@ -4822,16 +4729,11 @@
},
"securityTabs": {
"audit": "Audit",
- "autoUpdates": "Auto Updates",
"events": "Events",
- "fail2ban": "Fail2ban",
"fileIntegrity": "File Integrity",
"firewall": "Firewall",
"ipLists": "IP Lists",
- "malwareScanner": "Malware Scanner",
- "quarantine": "Quarantine",
- "sshKeys": "SSH Keys",
- "vulnerabilityScan": "Vulnerability Scan"
+ "sshKeys": "SSH Keys"
},
"serverDetail": {
"alerts": "Alerts",
@@ -5624,9 +5526,17 @@
"email": "Email",
"hereSASummaryOfYour": "Here's a summary of your setup. You can change these later in Settings.",
"hiddenPagesStayReachableByUrl": "Hidden pages stay reachable by URL and from search — this only trims the sidebar. Change it any time in Settings.",
+ "howMuchSecurityTooling": "How much security tooling should we install? Everything here is an extension — add or remove any of it later from the Marketplace.",
"installed": "Installed",
"loadingRecommendations": "Loading recommendations…",
"noneSelected": "None selected",
+ "postureHardened": "Hardened",
+ "postureHardenedDesc": "Adds malware scanning, host audits, container image scanning and crowd-sourced IP blocking.",
+ "postureMinimal": "Minimal",
+ "postureMinimalDesc": "The lean default: firewall, SSH keys, IP lists, integrity and audit — nothing extra installed.",
+ "postureNotYetAvailable": "— not yet available from the extension registry; pick it later from the Marketplace.",
+ "postureRecommended": "Recommended",
+ "postureRecommendedDesc": "Adds brute-force protection and automatic security updates.",
"profile": "Profile",
"recommendedForYou": "Recommended for you",
"sidebar": "Sidebar",
@@ -6765,25 +6675,6 @@
"volumeName": "Volume Name *",
"volumeRemovedSuccessfully": "Volume removed successfully"
},
- "vulnerabilityTab": {
- "failedToInstall": "Failed to install: {{message}}",
- "failedToStartScan": "Failed to start scan: {{message}}",
- "hardeningIndex": "Hardening index",
- "installLynisToPerformSecurityAudits": "Install Lynis to perform security audits and vulnerability scanning.",
- "loadingVulnerabilityScannerStatus": "Loading vulnerability scanner status…",
- "lynisInstalledSuccessfully": "Lynis installed successfully",
- "lynisNotInstalled": "Lynis Not Installed",
- "lynisVulnerabilityScanner": "Lynis Vulnerability Scanner",
- "scanInProgress": "Scan in Progress",
- "scanResults": "Scan Results",
- "scanStatus": "Scan status",
- "scanningSystemForVulnerabilities": "Scanning system for vulnerabilities…",
- "started": "Started:",
- "suggestions": "Suggestions (",
- "vulnerabilityScanStarted": "Vulnerability scan started",
- "warnings": "warnings ·",
- "warnings2": "Warnings ("
- },
"walkthroughs": {
"all": "All walkthroughs",
"checkStatus": "Check status",
diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json
index 33a47456..998300b0 100644
--- a/frontend/src/i18n/locales/es.json
+++ b/frontend/src/i18n/locales/es.json
@@ -320,22 +320,6 @@
"securityAudit": "Auditoría de seguridad",
"securityScore": "puntuación de seguridad"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Paquete de actualizaciones automáticas instalado",
- "automaticSecurityUpdates": "Actualizaciones de seguridad automáticas",
- "automaticSecurityUpdatesAreNotSupported": "Las actualizaciones de seguridad automáticas no están disponibles en este sistema.",
- "automaticUpdatesDisabled": "Actualizaciones automáticas desactivadas",
- "automaticUpdatesEnabled": "Actualizaciones automáticas activadas",
- "failedToDisable": "No se pudo desactivar: {{message}}",
- "failedToEnable": "No se pudo activar: {{message}}",
- "failedToInstall": "No se pudo instalar: {{message}}",
- "installed": "Instalado",
- "loadingAutoUpdatesStatus": "Cargando el estado de las actualizaciones automáticas...",
- "notSupported": "No compatible",
- "package": "Paquete",
- "whatAreAutomaticSecurityUpdates": "¿Qué son las actualizaciones de seguridad automáticas?",
- "whenEnabledYourServerWillAutomatically": "Cuando están activadas, tu servidor descarga e instala automáticamente las actualizaciones de seguridad, lo que ayuda a protegerlo de vulnerabilidades conocidas sin intervención manual."
- },
"backupCalendar": {
"nextMonth": "Mes siguiente",
"previousMonth": "Mes anterior",
@@ -2180,30 +2164,6 @@
"writePermission": "Permiso de escritura",
"yourServerIpOrDomain": "La IP o el dominio de tu servidor"
},
- "fail2banTab": {
- "activeJails": "Jails activos",
- "areYouSureYouWantTo": "¿Seguro que quieres desbloquear {{ip}} de {{jail}}?",
- "banIp": "Bloquear IP",
- "banIpAddress": "Bloquear dirección IP",
- "banned": "Bloqueadas",
- "fail2banInstalledSuccessfully": "Fail2ban se instaló correctamente",
- "fail2banNotInstalled": "Fail2ban no está instalado",
- "fail2banStatus": "Estado de Fail2ban",
- "failedToBanIp": "No se pudo bloquear la IP: {{message}}",
- "failedToInstall": "No se pudo instalar: {{message}}",
- "failedToUnban": "No se pudo desbloquear: {{message}}",
- "installFail2banToProtectAgainstBrute": "Instala Fail2ban para protegerte de ataques de fuerza bruta.",
- "ipBannedIn": "IP {{banIP}} bloqueada en {{banJail}}",
- "ipUnbanned": "IP {{ip}} desbloqueada",
- "jail": "Jail",
- "loadingFail2banStatus": "Cargando el estado de Fail2ban...",
- "noIpsAreCurrentlyBanned": "No hay ninguna IP bloqueada en este momento.",
- "none": "Ninguno",
- "totalBanned": "Total bloqueadas",
- "totalBannedIps": "Total de IPs bloqueadas",
- "unban": "Desbloquear",
- "unbanIp": "Desbloquear IP"
- },
"favoriteStar": {
"addToFavorites": "Añadir a favoritos",
"removeFromFavorites": "Quitar de favoritos"
@@ -3700,8 +3660,6 @@
"applicationInfo": "Información de la aplicación",
"areYouSureYouWantTo": "¿Seguro que quieres desvincular estas aplicaciones? Las credenciales de la base de datos no cambiarán.",
"bandwidth": "Ancho de banda",
- "clamavAntivirusInstalled": "Antivirus ClamAV instalado",
- "clamavServiceRunning": "Servicio ClamAV en ejecución",
"clickRunDiagnosticsToCheckRouting": "Haz clic en \"Ejecutar diagnóstico\" para comprobar la configuración de enrutamiento e identificar problemas.",
"computing": "Calculando…",
"cpuLoad": "Carga de CPU",
@@ -3712,7 +3670,6 @@
"environmentLinking": "Vinculación de entornos",
"fileIntegrityMonitoringEnabled": "Monitorización de integridad de archivos activada",
"initializeBaseline": "Inicializar línea base",
- "installClamav": "Instalar ClamAV",
"integrityBaselineInitialized": "Línea base de integridad inicializada",
"last90Days": "Últimos 90 días",
"linkThisAppToAnotherTo": "Vincula esta aplicación con otra para crear un par de producción/desarrollo. Las aplicaciones vinculadas pueden compartir credenciales de base de datos.",
@@ -3737,18 +3694,15 @@
"reviewChanges": "Revisar cambios",
"rootPath": "Ruta raíz",
"routingDiagnostics": "Diagnóstico de enrutamiento",
- "scan": "Escanear",
"securityAlertsConfigured": "Alertas de seguridad configuradas",
"securityPosture": "Postura de seguridad",
"serviceInfo": "Información del servicio",
- "startService": "Iniciar servicio",
"startTheContainerToSeeLive": "Inicia el contenedor para ver los recursos en vivo.",
"successful": "Exitosos",
"tags": "Etiquetas",
"thisMonth": "este mes",
"totalDeploys": "Despliegues totales",
"unlinkApps": "Desvincular aplicaciones",
- "virusDefinitions": "Definiciones de virus",
"workers": "Workers"
},
"packagesTab": {
@@ -4072,21 +4026,6 @@
"resolved": "Resuelto",
"statusPageUnavailable": "Página de estado no disponible"
},
- "quarantineTab": {
- "deleteFile": "Eliminar archivo",
- "deleteQuarantinedFile": "Eliminar el archivo en cuarentena",
- "filename": "Nombre del archivo",
- "infectedFilesWillAppearHereWhen": "Los archivos infectados aparecerán aquí cuando se detecten",
- "noFilesInQuarantine": "No hay archivos en cuarentena",
- "originalLocation": "Ubicación original",
- "originalLocationUnknown": "Ubicación original desconocida",
- "permanentlyDeleteThisCannotBeUndone": "¿Eliminar permanentemente {{filename}}? Esta acción no se puede deshacer.",
- "quarantined": "En cuarentena",
- "restoreFile": "Restaurar archivo",
- "restoreQuarantinedFile": "Restaurar el archivo en cuarentena",
- "restoreToOnlyDoThisFor": "¿Restaurar {{name}} a {{target}}? Haz esto solo con falsos positivos.",
- "restoreToOriginalLocation": "Restaurar a la ubicación original"
- },
"queueDetail": {
"allStatuses": "Todos los estados",
"attempts": "Intentos",
@@ -4506,41 +4445,6 @@
"ssoOnlyMode": "Modo solo SSO",
"viewer": "Observador"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "indicadores seleccionados de web shells se ejecutan en cada análisis (motor:",
- "customPath": "Ruta personalizada",
- "date": "Fecha",
- "deleteCustomRuleFile": "¿Eliminar el archivo de reglas personalizado {{name}}?",
- "deleteRule": "Eliminar regla",
- "deleteScannerRule": "Eliminar regla del analizador",
- "directory": "Directorio",
- "file": "Archivo",
- "filesScanned": "Archivos analizados:",
- "fullScan": "Análisis completo",
- "inactiveYaraNotInstalled": "inactivo: yara no está instalado",
- "job": "Trabajo:",
- "match": "Coincidencia",
- "noCustomRuleFilesUploadA": "No hay archivos de reglas personalizados. Sube un archivo .yar (máx. 64 KB) para ampliar el conjunto de reglas.",
- "noScansHaveBeenRunYet": "Todavía no se ha ejecutado ningún análisis.",
- "quickScan": "Análisis rápido",
- "rule": "Regla",
- "scan": "Analizar",
- "scanASpecificDirectory": "Analizar un directorio específico",
- "scanAnApp": "Analizar una app",
- "scanCommonWebDirectories": "Analizar los directorios web habituales",
- "scanEntireSystemSlow": "Analizar todo el sistema (lento)",
- "scanInProgress": "Análisis en curso",
- "scanning": "Analizando:",
- "selectAnApp": "Selecciona una app…",
- "startAScanAboveToCheck": "Inicia un análisis arriba para comprobar si hay amenazas.",
- "startScan": "Iniciar análisis",
- "started": "Iniciado:",
- "threats": "Amenazas",
- "uploadYar": "Subir .yar",
- "webShellDetectionRules": "Reglas de detección de web shells",
- "webShellMalwareScanOfA": "Análisis de web shells y malware de un docroot",
- "webShellRules": "Reglas de web shells"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Se hace una copia de seguridad completa cada N días; el resto son incrementales.",
"backupsRunQuietlyInTheBackground": "Las copias de seguridad se ejecutan silenciosamente en segundo plano.",
@@ -4671,16 +4575,11 @@
},
"securityTabs": {
"audit": "Auditoría",
- "autoUpdates": "Actualizaciones automáticas",
"events": "Eventos",
- "fail2ban": "Fail2ban",
"fileIntegrity": "Integridad de archivos",
"firewall": "Firewall",
"ipLists": "Listas de IP",
- "malwareScanner": "Analizador de malware",
- "quarantine": "Cuarentena",
- "sshKeys": "Claves SSH",
- "vulnerabilityScan": "Análisis de vulnerabilidades"
+ "sshKeys": "Claves SSH"
},
"serverDetail": {
"alerts": "Alertas",
@@ -6577,25 +6476,6 @@
"volumeName": "Nombre del volumen *",
"volumeRemovedSuccessfully": "Volumen quitado correctamente"
},
- "vulnerabilityTab": {
- "failedToInstall": "No se pudo instalar: {{message}}",
- "failedToStartScan": "No se pudo iniciar el análisis: {{message}}",
- "hardeningIndex": "Índice de hardening",
- "installLynisToPerformSecurityAudits": "Instala Lynis para realizar auditorías de seguridad y análisis de vulnerabilidades.",
- "loadingVulnerabilityScannerStatus": "Cargando el estado del analizador de vulnerabilidades…",
- "lynisInstalledSuccessfully": "Lynis se instaló correctamente",
- "lynisNotInstalled": "Lynis no está instalado",
- "lynisVulnerabilityScanner": "Analizador de vulnerabilidades Lynis",
- "scanInProgress": "Análisis en curso",
- "scanResults": "Resultados del análisis",
- "scanStatus": "Estado del análisis",
- "scanningSystemForVulnerabilities": "Analizando el sistema en busca de vulnerabilidades…",
- "started": "Iniciado:",
- "suggestions": "Sugerencias (",
- "vulnerabilityScanStarted": "Análisis de vulnerabilidades iniciado",
- "warnings": "advertencias ·",
- "warnings2": "Advertencias ("
- },
"walkthroughs": {
"doneCount": "{{count}} de {{total}} completados",
"doneNextStep": "Hecho · siguiente paso",
diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json
index 7649cbfb..5bdc4c20 100644
--- a/frontend/src/i18n/locales/fr.json
+++ b/frontend/src/i18n/locales/fr.json
@@ -320,22 +320,6 @@
"securityAudit": "Audit de sécurité",
"securityScore": "score de sécurité"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Package de mises à jour automatiques installé",
- "automaticSecurityUpdates": "Mises à jour de sécurité automatiques",
- "automaticSecurityUpdatesAreNotSupported": "Les mises à jour de sécurité automatiques ne sont pas prises en charge sur ce système.",
- "automaticUpdatesDisabled": "Mises à jour automatiques désactivées",
- "automaticUpdatesEnabled": "Mises à jour automatiques activées",
- "failedToDisable": "Échec de la désactivation : {{message}}",
- "failedToEnable": "Échec de l'activation : {{message}}",
- "failedToInstall": "Échec de l'installation : {{message}}",
- "installed": "Installé",
- "loadingAutoUpdatesStatus": "Chargement de l'état des mises à jour automatiques...",
- "notSupported": "Non pris en charge",
- "package": "Emballer",
- "whatAreAutomaticSecurityUpdates": "Que sont les mises à jour de sécurité automatiques ?",
- "whenEnabledYourServerWillAutomatically": "Lorsqu'il est activé, votre serveur téléchargera et installera automatiquement les mises à jour de sécurité, contribuant ainsi à vous protéger contre les vulnérabilités connues sans intervention manuelle."
- },
"backupCalendar": {
"nextMonth": "Mois prochain",
"previousMonth": "Mois précédent",
@@ -2180,30 +2164,6 @@
"writePermission": "Autorisation d'écriture",
"yourServerIpOrDomain": "L'adresse IP ou le domaine de votre serveur"
},
- "fail2banTab": {
- "activeJails": "Prisons actives",
- "areYouSureYouWantTo": "Êtes-vous sûr de vouloir annuler l'interdiction de {{ip}} de {{jail}} ?",
- "banIp": "Interdire la propriété intellectuelle",
- "banIpAddress": "Interdire l'adresse IP",
- "banned": "Interdit",
- "fail2banInstalledSuccessfully": "Fail2ban installé avec succès",
- "fail2banNotInstalled": "Fail2ban non installé",
- "fail2banStatus": "Statut Fail2ban",
- "failedToBanIp": "Échec de l'interdiction de l'adresse IP : {{message}}",
- "failedToInstall": "Échec de l'installation : {{message}}",
- "failedToUnban": "Échec de l'annulation du bannissement : {{message}}",
- "installFail2banToProtectAgainstBrute": "Installez Fail2ban pour vous protéger contre les attaques par force brute.",
- "ipBannedIn": "IP {{banIP}} interdite dans {{banJail}}",
- "ipUnbanned": "IP {{ip}} non bannie",
- "jail": "Prison",
- "loadingFail2banStatus": "Chargement du statut Fail2ban...",
- "noIpsAreCurrentlyBanned": "Aucune adresse IP n'est actuellement interdite.",
- "none": "Aucun",
- "totalBanned": "Totalement interdit",
- "totalBannedIps": "Nombre total d'adresses IP interdites",
- "unban": "Annuler le bannissement",
- "unbanIp": "Annuler l'interdiction IP"
- },
"favoriteStar": {
"addToFavorites": "Ajouter aux favoris",
"removeFromFavorites": "Supprimer des favoris"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Informations sur la candidature",
"areYouSureYouWantTo": "Êtes-vous sûr de vouloir dissocier ces applications ? Les informations d'identification de la base de données resteront inchangées.",
"bandwidth": "Bande passante",
- "clamavAntivirusInstalled": "Antivirus ClamAV installé",
- "clamavServiceRunning": "Service ClamAV en cours d'exécution",
"clickRunDiagnosticsToCheckRouting": "Cliquez sur \"Exécuter les diagnostics\" pour vérifier la configuration du routage et identifier les problèmes.",
"computing": "Informatique…",
"cpuLoad": "Charge du processeur",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Liaison avec l'environnement",
"fileIntegrityMonitoringEnabled": "Surveillance de l'intégrité des fichiers activée",
"initializeBaseline": "Initialiser la ligne de base",
- "installClamav": "Installer ClamAV",
"integrityBaselineInitialized": "Base de référence d'intégrité initialisée",
"last90Days": "90 derniers jours",
"linkThisAppToAnotherTo": "Liez cette application à une autre pour créer un couple production/développement. Les applications liées peuvent partager les informations d'identification de la base de données.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Examiner les modifications",
"rootPath": "Chemin racine",
"routingDiagnostics": "Diagnostic de routage",
- "scan": "Balayage",
"securityAlertsConfigured": "Alertes de sécurité configurées",
"securityPosture": "Posture de sécurité",
"serviceInfo": "Informations sur les services",
- "startService": "Démarrer le service",
"startTheContainerToSeeLive": "Démarrez le conteneur pour voir les ressources en direct.",
"successful": "Réussi",
"tags": "Balises",
"thisMonth": "ce mois-ci",
"totalDeploys": "Total des déploiements",
"unlinkApps": "Dissocier les applications",
- "virusDefinitions": "Définitions de virus",
"workers": "Ouvriers"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Résolu",
"statusPageUnavailable": "Page d'état indisponible"
},
- "quarantineTab": {
- "deleteFile": "Supprimer le fichier",
- "deleteQuarantinedFile": "Supprimer le fichier en quarantaine",
- "filename": "Nom de fichier",
- "infectedFilesWillAppearHereWhen": "Les fichiers infectés apparaîtront ici une fois détectés",
- "noFilesInQuarantine": "Aucun fichier en quarantaine",
- "originalLocation": "Emplacement d'origine",
- "originalLocationUnknown": "Emplacement d'origine inconnu",
- "permanentlyDeleteThisCannotBeUndone": "Supprimer définitivement {{filename}} ? Cela ne peut pas être annulé.",
- "quarantined": "Mis en quarantaine",
- "restoreFile": "Restaurer le fichier",
- "restoreQuarantinedFile": "Restaurer le fichier en quarantaine",
- "restoreToOnlyDoThisFor": "Restaurer {{name}} vers {{target}} ? Ne faites cela que pour les faux positifs.",
- "restoreToOriginalLocation": "Restaurer à l'emplacement d'origine"
- },
"queueDetail": {
"allStatuses": "Tous les statuts",
"attempts": "Tentatives",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Mode SSO uniquement",
"viewer": "Téléspectateur"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "Des indicateurs Web-Shell organisés s'exécutent à chaque analyse (moteur :",
- "customPath": "Chemin personnalisé",
- "date": "Date",
- "deleteCustomRuleFile": "Supprimer le fichier de règles personnalisées {{name}} ?",
- "deleteRule": "Supprimer la règle",
- "deleteScannerRule": "Supprimer la règle du scanner",
- "directory": "Annuaire",
- "file": "Déposer",
- "filesScanned": "Fichiers analysés :",
- "fullScan": "Analyse complète",
- "inactiveYaraNotInstalled": "inactif — Yara n'est pas installé",
- "job": "Emploi:",
- "match": "Correspondre",
- "noCustomRuleFilesUploadA": "Aucun fichier de règles personnalisé. Téléchargez un fichier .yar (64 Ko maximum) pour étendre l'ensemble de règles.",
- "noScansHaveBeenRunYet": "Aucune analyse n'a encore été exécutée.",
- "quickScan": "Analyse rapide",
- "rule": "Règle",
- "scan": "Balayage",
- "scanASpecificDirectory": "Scanner un répertoire spécifique",
- "scanAnApp": "Scanner une application",
- "scanCommonWebDirectories": "Analyser les répertoires Web courants",
- "scanEntireSystemSlow": "Analyser tout le système (lent)",
- "scanInProgress": "Analyse en cours",
- "scanning": "Balayage:",
- "selectAnApp": "Sélectionnez une application…",
- "startAScanAboveToCheck": "Démarrez une analyse ci-dessus pour rechercher les menaces.",
- "startScan": "Démarrer l'analyse",
- "started": "Commencé:",
- "threats": "Menaces",
- "uploadYar": "Téléchargez .yar",
- "webShellDetectionRules": "Règles de détection du shell Web",
- "webShellMalwareScanOfA": "Web-shell + analyse anti-malware d'un docroot",
- "webShellRules": "Règles du shell Web"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Une sauvegarde complète est effectuée tous les N jours ; le reste est progressif.",
"backupsRunQuietlyInTheBackground": "Les sauvegardes s'exécutent silencieusement en arrière-plan.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Audit",
- "autoUpdates": "Mises à jour automatiques",
"events": "Événements",
- "fail2ban": "Échec2ban",
"fileIntegrity": "Intégrité des fichiers",
"firewall": "Pare-feu",
"ipLists": "Listes IP",
- "malwareScanner": "Scanner de logiciels malveillants",
- "quarantine": "Quarantaine",
- "sshKeys": "Clés SSH",
- "vulnerabilityScan": "Analyse de vulnérabilité"
+ "sshKeys": "Clés SSH"
},
"serverDetail": {
"alerts": "Alertes",
@@ -6562,25 +6461,6 @@
"volumeName": "Nom du volume *",
"volumeRemovedSuccessfully": "Volume supprimé avec succès"
},
- "vulnerabilityTab": {
- "failedToInstall": "Échec de l'installation : {{message}}",
- "failedToStartScan": "Échec du démarrage de l'analyse : {{message}}",
- "hardeningIndex": "Indice de durcissement",
- "installLynisToPerformSecurityAudits": "Installez Lynis pour effectuer des audits de sécurité et une analyse des vulnérabilités.",
- "loadingVulnerabilityScannerStatus": "Chargement de l'état du scanner de vulnérabilités...",
- "lynisInstalledSuccessfully": "Lynis installé avec succès",
- "lynisNotInstalled": "Lynis non installé",
- "lynisVulnerabilityScanner": "Scanner de vulnérabilité Lynis",
- "scanInProgress": "Analyse en cours",
- "scanResults": "Résultats de l'analyse",
- "scanStatus": "État de l'analyse",
- "scanningSystemForVulnerabilities": "Système d'analyse des vulnérabilités...",
- "started": "Commencé:",
- "suggestions": "Suggestions (",
- "vulnerabilityScanStarted": "L'analyse des vulnérabilités a commencé",
- "warnings": "avertissements ·",
- "warnings2": "Avertissements ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Créer un abonnement Webhook",
"eGSlackNotificationsCiTrigger": "par ex. Notifications Slack, déclencheur CI",
diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.json
index f77cd811..0f831161 100644
--- a/frontend/src/i18n/locales/id.json
+++ b/frontend/src/i18n/locales/id.json
@@ -320,22 +320,6 @@
"securityAudit": "Audit Keamanan",
"securityScore": "skor keamanan"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Paket pembaruan otomatis diinstal",
- "automaticSecurityUpdates": "Pembaruan Keamanan Otomatis",
- "automaticSecurityUpdatesAreNotSupported": "Pembaruan keamanan otomatis tidak didukung pada sistem ini.",
- "automaticUpdatesDisabled": "Pembaruan otomatis dinonaktifkan",
- "automaticUpdatesEnabled": "Pembaruan otomatis diaktifkan",
- "failedToDisable": "Gagal menonaktifkan: {{message}}",
- "failedToEnable": "Gagal mengaktifkan: {{message}}",
- "failedToInstall": "Gagal menginstal: {{message}}",
- "installed": "Dipasang",
- "loadingAutoUpdatesStatus": "Memuat status pembaruan otomatis...",
- "notSupported": "Tidak Didukung",
- "package": "Kemasan",
- "whatAreAutomaticSecurityUpdates": "Apa itu pembaruan keamanan otomatis?",
- "whenEnabledYourServerWillAutomatically": "Saat diaktifkan, server Anda akan secara otomatis mengunduh dan menginstal pembaruan keamanan, membantu melindungi dari kerentanan yang diketahui tanpa intervensi manual."
- },
"backupCalendar": {
"nextMonth": "Bulan depan",
"previousMonth": "Bulan sebelumnya",
@@ -2180,30 +2164,6 @@
"writePermission": "Izin Menulis",
"yourServerIpOrDomain": "IP server atau domain Anda"
},
- "fail2banTab": {
- "activeJails": "Penjara aktif",
- "areYouSureYouWantTo": "Apakah Anda yakin ingin membatalkan pemblokiran {{ip}} dari {{jail}}?",
- "banIp": "Larangan IP",
- "banIpAddress": "Larang Alamat IP",
- "banned": "Dilarang",
- "fail2banInstalledSuccessfully": "Fail2ban berhasil diinstal",
- "fail2banNotInstalled": "Fail2ban Tidak Diinstal",
- "fail2banStatus": "Status Fail2ban",
- "failedToBanIp": "Gagal memblokir IP: {{message}}",
- "failedToInstall": "Gagal menginstal: {{message}}",
- "failedToUnban": "Gagal membatalkan pemblokiran: {{message}}",
- "installFail2banToProtectAgainstBrute": "Instal Fail2ban untuk melindungi dari serangan brute force.",
- "ipBannedIn": "IP {{banIP}} dilarang di {{banJail}}",
- "ipUnbanned": "IP {{ip}} tidak diblokir",
- "jail": "Penjara",
- "loadingFail2banStatus": "Memuat status Fail2ban...",
- "noIpsAreCurrentlyBanned": "Tidak ada IP yang saat ini dilarang.",
- "none": "Tidak ada",
- "totalBanned": "Dilarang total",
- "totalBannedIps": "Total IP yang dilarang",
- "unban": "Batalkan pelarangan",
- "unbanIp": "Batalkan pelarangan IP"
- },
"favoriteStar": {
"addToFavorites": "Tambahkan ke favorit",
"removeFromFavorites": "Hapus dari favorit"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Informasi Aplikasi",
"areYouSureYouWantTo": "Apakah Anda yakin ingin membatalkan tautan aplikasi ini? Kredensial basis data tidak akan berubah.",
"bandwidth": "Bandwidth",
- "clamavAntivirusInstalled": "Antivirus ClamAV sudah terpasang",
- "clamavServiceRunning": "Layanan ClamAV berjalan",
"clickRunDiagnosticsToCheckRouting": "Klik \"Jalankan Diagnostik\" untuk memeriksa konfigurasi perutean dan mengidentifikasi masalah.",
"computing": "Menghitung…",
"cpuLoad": "Beban CPU",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Tautan Lingkungan",
"fileIntegrityMonitoringEnabled": "Pemantauan integritas file diaktifkan",
"initializeBaseline": "Inisialisasi garis dasar",
- "installClamav": "Instal ClamAV",
"integrityBaselineInitialized": "Garis dasar integritas diinisialisasi",
"last90Days": "90 hari terakhir",
"linkThisAppToAnotherTo": "Tautkan aplikasi ini ke aplikasi lain untuk membuat pasangan produksi/pengembangan. Aplikasi tertaut dapat berbagi kredensial database.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Tinjau perubahan",
"rootPath": "Jalur Akar",
"routingDiagnostics": "Diagnostik Perutean",
- "scan": "Pindai",
"securityAlertsConfigured": "Peringatan keamanan dikonfigurasi",
"securityPosture": "Postur keamanan",
"serviceInfo": "Informasi Layanan",
- "startService": "Mulai layanan",
"startTheContainerToSeeLive": "Mulai penampung untuk melihat sumber daya langsung.",
"successful": "Berhasil",
"tags": "Tag",
"thisMonth": "bulan ini",
"totalDeploys": "Total Penerapan",
"unlinkApps": "Putuskan tautan Aplikasi",
- "virusDefinitions": "Definisi virus",
"workers": "Pekerja"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Terselesaikan",
"statusPageUnavailable": "Halaman status tidak tersedia"
},
- "quarantineTab": {
- "deleteFile": "Hapus berkas",
- "deleteQuarantinedFile": "Hapus file yang dikarantina",
- "filename": "Nama file",
- "infectedFilesWillAppearHereWhen": "File yang terinfeksi akan muncul di sini ketika terdeteksi",
- "noFilesInQuarantine": "Tidak ada file di karantina",
- "originalLocation": "Lokasi Asli",
- "originalLocationUnknown": "Lokasi aslinya tidak diketahui",
- "permanentlyDeleteThisCannotBeUndone": "Hapus {{filename}} secara permanen? Hal ini tidak dapat dibatalkan.",
- "quarantined": "Dikarantina",
- "restoreFile": "Pulihkan berkas",
- "restoreQuarantinedFile": "Pulihkan file yang dikarantina",
- "restoreToOnlyDoThisFor": "Pulihkan {{name}} ke {{target}}? Lakukan ini hanya untuk hasil positif palsu.",
- "restoreToOriginalLocation": "Kembalikan ke lokasi semula"
- },
"queueDetail": {
"allStatuses": "Semua status",
"attempts": "Upaya",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Mode khusus SSO",
"viewer": "Penonton"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "indikator shell web yang dikurasi berjalan pada setiap pemindaian (mesin:",
- "customPath": "Jalur Kustom",
- "date": "Tanggal",
- "deleteCustomRuleFile": "Hapus file aturan khusus {{name}}?",
- "deleteRule": "Hapus aturan",
- "deleteScannerRule": "Hapus aturan pemindai",
- "directory": "Direktori",
- "file": "Mengajukan",
- "filesScanned": "File dipindai:",
- "fullScan": "Pemindaian Penuh",
- "inactiveYaraNotInstalled": "tidak aktif — yara tidak diinstal",
- "job": "Pekerjaan:",
- "match": "Cocok",
- "noCustomRuleFilesUploadA": "Tidak ada file aturan khusus. Unggah file .yar (maks 64 KB) untuk memperluas kumpulan aturan.",
- "noScansHaveBeenRunYet": "Belum ada pemindaian yang dijalankan.",
- "quickScan": "Pemindaian Cepat",
- "rule": "Aturan",
- "scan": "Pindai",
- "scanASpecificDirectory": "Pindai direktori tertentu",
- "scanAnApp": "Pindai Aplikasi",
- "scanCommonWebDirectories": "Pindai direktori web umum",
- "scanEntireSystemSlow": "Pindai seluruh sistem (lambat)",
- "scanInProgress": "Pemindaian Sedang Berlangsung",
- "scanning": "Pemindaian:",
- "selectAnApp": "Pilih aplikasi…",
- "startAScanAboveToCheck": "Mulai pemindaian di atas untuk memeriksa ancaman.",
- "startScan": "Mulai Pindai",
- "started": "Dimulai:",
- "threats": "Ancaman",
- "uploadYar": "Unggah .yar",
- "webShellDetectionRules": "Aturan Deteksi Shell Web",
- "webShellMalwareScanOfA": "Pemindaian shell web + malware dari docroot",
- "webShellRules": "Aturan shell web"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Pencadangan penuh dilakukan setiap N hari; sisanya bersifat inkremental.",
"backupsRunQuietlyInTheBackground": "Pencadangan berjalan dengan tenang di latar belakang.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Audit",
- "autoUpdates": "Pembaruan Otomatis",
"events": "Acara",
- "fail2ban": "Gagal2larangan",
"fileIntegrity": "Integritas File",
"firewall": "tembok api",
"ipLists": "Daftar IP",
- "malwareScanner": "Pemindai Perangkat Lunak Jahat",
- "quarantine": "Karantina",
- "sshKeys": "Kunci SSH",
- "vulnerabilityScan": "Pemindaian Kerentanan"
+ "sshKeys": "Kunci SSH"
},
"serverDetail": {
"alerts": "Peringatan",
@@ -6562,25 +6461,6 @@
"volumeName": "Nama Jilid *",
"volumeRemovedSuccessfully": "Volume berhasil dihapus"
},
- "vulnerabilityTab": {
- "failedToInstall": "Gagal menginstal: {{message}}",
- "failedToStartScan": "Gagal memulai pemindaian: {{message}}",
- "hardeningIndex": "Indeks pengerasan",
- "installLynisToPerformSecurityAudits": "Instal Lynis untuk melakukan audit keamanan dan pemindaian kerentanan.",
- "loadingVulnerabilityScannerStatus": "Memuat status pemindai kerentanan...",
- "lynisInstalledSuccessfully": "Lynis berhasil diinstal",
- "lynisNotInstalled": "Lynis Tidak Terpasang",
- "lynisVulnerabilityScanner": "Pemindai Kerentanan Lynis",
- "scanInProgress": "Pemindaian Sedang Berlangsung",
- "scanResults": "Hasil Pemindaian",
- "scanStatus": "Status pemindaian",
- "scanningSystemForVulnerabilities": "Memindai sistem untuk mencari kerentanan...",
- "started": "Dimulai:",
- "suggestions": "Saran (",
- "vulnerabilityScanStarted": "Pemindaian kerentanan dimulai",
- "warnings": "peringatan ·",
- "warnings2": "Peringatan ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Buat Langganan Webhook",
"eGSlackNotificationsCiTrigger": "misalnya Notifikasi Slack, Pemicu CI",
diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json
index e884f8f0..087c0bb1 100644
--- a/frontend/src/i18n/locales/it.json
+++ b/frontend/src/i18n/locales/it.json
@@ -320,22 +320,6 @@
"securityAudit": "Controllo di sicurezza",
"securityScore": "punteggio di sicurezza"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Pacchetto di aggiornamenti automatici installato",
- "automaticSecurityUpdates": "Aggiornamenti automatici di sicurezza",
- "automaticSecurityUpdatesAreNotSupported": "Gli aggiornamenti automatici della sicurezza non sono supportati su questo sistema.",
- "automaticUpdatesDisabled": "Aggiornamenti automatici disabilitati",
- "automaticUpdatesEnabled": "Aggiornamenti automatici abilitati",
- "failedToDisable": "Impossibile disabilitare: {{message}}",
- "failedToEnable": "Impossibile abilitare: {{message}}",
- "failedToInstall": "Impossibile installare: {{message}}",
- "installed": "Installato",
- "loadingAutoUpdatesStatus": "Caricamento dello stato degli aggiornamenti automatici...",
- "notSupported": "Non supportato",
- "package": "Pacchetto",
- "whatAreAutomaticSecurityUpdates": "Cosa sono gli aggiornamenti automatici di sicurezza?",
- "whenEnabledYourServerWillAutomatically": "Se abilitato, il tuo server scaricherà e installerà automaticamente gli aggiornamenti di sicurezza, aiutandoti a proteggerti dalle vulnerabilità note senza intervento manuale."
- },
"backupCalendar": {
"nextMonth": "Il mese prossimo",
"previousMonth": "Mese precedente",
@@ -2180,30 +2164,6 @@
"writePermission": "Autorizzazione di scrittura",
"yourServerIpOrDomain": "IP o dominio del tuo server"
},
- "fail2banTab": {
- "activeJails": "Carceri attive",
- "areYouSureYouWantTo": "Sei sicuro di voler sbloccare {{ip}} da {{jail}}?",
- "banIp": "Divieto di IP",
- "banIpAddress": "Divieto di indirizzo IP",
- "banned": "Vietato",
- "fail2banInstalledSuccessfully": "Fail2ban installato correttamente",
- "fail2banNotInstalled": "Fail2ban non installato",
- "fail2banStatus": "Stato Fail2ban",
- "failedToBanIp": "Impossibile escludere l'IP: {{message}}",
- "failedToInstall": "Impossibile installare: {{message}}",
- "failedToUnban": "Impossibile sbloccare: {{message}}",
- "installFail2banToProtectAgainstBrute": "Installa Fail2ban per proteggerti dagli attacchi di forza bruta.",
- "ipBannedIn": "IP {{banIP}} vietato in {{banJail}}",
- "ipUnbanned": "IP {{ip}} non bannato",
- "jail": "Prigione",
- "loadingFail2banStatus": "Caricamento dello stato Fail2ban...",
- "noIpsAreCurrentlyBanned": "Nessun IP è attualmente bannato.",
- "none": "Nessuno",
- "totalBanned": "Bandito totale",
- "totalBannedIps": "IP totali vietati",
- "unban": "Sbancare",
- "unbanIp": "IP sbloccato"
- },
"favoriteStar": {
"addToFavorites": "Aggiungi ai preferiti",
"removeFromFavorites": "Rimuovi dai preferiti"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Informazioni sull'applicazione",
"areYouSureYouWantTo": "Sei sicuro di voler scollegare queste app? Le credenziali del database rimarranno invariate.",
"bandwidth": "Larghezza di banda",
- "clamavAntivirusInstalled": "Antivirus ClamAV installato",
- "clamavServiceRunning": "Servizio ClamAV in esecuzione",
"clickRunDiagnosticsToCheckRouting": "Fai clic su \"Esegui diagnostica\" per verificare la configurazione del routing e identificare i problemi.",
"computing": "Informatica…",
"cpuLoad": "Carico della CPU",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Collegamento all'ambiente",
"fileIntegrityMonitoringEnabled": "Monitoraggio dell'integrità dei file abilitato",
"initializeBaseline": "Inizializza la linea di base",
- "installClamav": "Installa ClamAV",
"integrityBaselineInitialized": "Base di integrità inizializzata",
"last90Days": "Ultimi 90 giorni",
"linkThisAppToAnotherTo": "Collega questa app a un'altra per creare una coppia produzione/sviluppo. Le app collegate possono condividere le credenziali del database.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Esaminare le modifiche",
"rootPath": "Percorso radice",
"routingDiagnostics": "Diagnostica del percorso",
- "scan": "Scansione",
"securityAlertsConfigured": "Avvisi di sicurezza configurati",
"securityPosture": "Atteggiamento di sicurezza",
"serviceInfo": "Informazioni sul servizio",
- "startService": "Avvia il servizio",
"startTheContainerToSeeLive": "Avvia il contenitore per vedere le risorse live.",
"successful": "Riuscito",
"tags": "Tag",
"thisMonth": "questo mese",
"totalDeploys": "Distribuzioni totali",
"unlinkApps": "Scollega app",
- "virusDefinitions": "Definizioni dei virus",
"workers": "Lavoratori"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Risolto",
"statusPageUnavailable": "Pagina di stato non disponibile"
},
- "quarantineTab": {
- "deleteFile": "Elimina file",
- "deleteQuarantinedFile": "Elimina il file in quarantena",
- "filename": "Nome file",
- "infectedFilesWillAppearHereWhen": "I file infetti verranno visualizzati qui una volta rilevati",
- "noFilesInQuarantine": "Nessun file in quarantena",
- "originalLocation": "Posizione originale",
- "originalLocationUnknown": "Posizione originale sconosciuta",
- "permanentlyDeleteThisCannotBeUndone": "Eliminare definitivamente {{filename}}? Questa operazione non può essere annullata.",
- "quarantined": "In quarantena",
- "restoreFile": "Ripristina file",
- "restoreQuarantinedFile": "Ripristina il file in quarantena",
- "restoreToOnlyDoThisFor": "Ripristinare {{name}} su {{target}}? Fatelo solo per i falsi positivi.",
- "restoreToOriginalLocation": "Ripristina nella posizione originale"
- },
"queueDetail": {
"allStatuses": "Tutti gli stati",
"attempts": "Tentativi",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Modalità solo SSO",
"viewer": "Spettatore"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "gli indicatori curati della web shell vengono eseguiti ad ogni scansione (motore:",
- "customPath": "Percorso personalizzato",
- "date": "Data",
- "deleteCustomRuleFile": "Eliminare il file delle regole personalizzate {{name}}?",
- "deleteRule": "Elimina regola",
- "deleteScannerRule": "Elimina la regola dello scanner",
- "directory": "Direttorio",
- "file": "File",
- "filesScanned": "File scansionati:",
- "fullScan": "Scansione completa",
- "inactiveYaraNotInstalled": "inattivo: Yara non installato",
- "job": "Lavoro:",
- "match": "Incontro",
- "noCustomRuleFilesUploadA": "Nessun file di regole personalizzate. Carica un file .yar (max 64 KB) per estendere il set di regole.",
- "noScansHaveBeenRunYet": "Nessuna scansione è stata ancora eseguita.",
- "quickScan": "Scansione rapida",
- "rule": "Regola",
- "scan": "Scansione",
- "scanASpecificDirectory": "Scansiona una directory specifica",
- "scanAnApp": "Scansione di un'app",
- "scanCommonWebDirectories": "Scansiona le directory web più comuni",
- "scanEntireSystemSlow": "Scansiona l'intero sistema (lento)",
- "scanInProgress": "Scansione in corso",
- "scanning": "Scansione:",
- "selectAnApp": "Seleziona un'app…",
- "startAScanAboveToCheck": "Avvia una scansione qui sopra per verificare la presenza di minacce.",
- "startScan": "Avvia scansione",
- "started": "Iniziato:",
- "threats": "Minacce",
- "uploadYar": "Carica .yar",
- "webShellDetectionRules": "Regole di rilevamento della shell Web",
- "webShellMalwareScanOfA": "Scansione Web-shell + malware di un docroot",
- "webShellRules": "Regole della shell Web"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Viene eseguito un backup completo ogni N giorni; il resto è incrementale.",
"backupsRunQuietlyInTheBackground": "I backup vengono eseguiti silenziosamente in background.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Controllo",
- "autoUpdates": "Aggiornamenti automatici",
"events": "Eventi",
- "fail2ban": "Fail2ban",
"fileIntegrity": "Integrità dei file",
"firewall": "Firewall",
"ipLists": "Elenchi IP",
- "malwareScanner": "Scanner anti-malware",
- "quarantine": "Quarantena",
- "sshKeys": "SSH Chiavi",
- "vulnerabilityScan": "Scansione delle vulnerabilità"
+ "sshKeys": "SSH Chiavi"
},
"serverDetail": {
"alerts": "Avvisi",
@@ -6562,25 +6461,6 @@
"volumeName": "Nome del volume *",
"volumeRemovedSuccessfully": "Volume rimosso correttamente"
},
- "vulnerabilityTab": {
- "failedToInstall": "Impossibile installare: {{message}}",
- "failedToStartScan": "Impossibile avviare la scansione: {{message}}",
- "hardeningIndex": "Indice di indurimento",
- "installLynisToPerformSecurityAudits": "Installa Lynis per eseguire controlli di sicurezza e scansioni delle vulnerabilità.",
- "loadingVulnerabilityScannerStatus": "Caricamento dello stato dello scanner delle vulnerabilità...",
- "lynisInstalledSuccessfully": "Lynis è stato installato correttamente",
- "lynisNotInstalled": "Lynis non installato",
- "lynisVulnerabilityScanner": "Scanner delle vulnerabilità di Lynis",
- "scanInProgress": "Scansione in corso",
- "scanResults": "Risultati della scansione",
- "scanStatus": "Stato della scansione",
- "scanningSystemForVulnerabilities": "Sistema di scansione delle vulnerabilità...",
- "started": "Iniziato:",
- "suggestions": "Suggerimenti (",
- "vulnerabilityScanStarted": "Avviata la scansione delle vulnerabilità",
- "warnings": "avvertenze ·",
- "warnings2": "Avvertenze ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Crea sottoscrizione webhook",
"eGSlackNotificationsCiTrigger": "per esempio. Notifiche lente, trigger CI",
diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.json
index 15c3b9d9..8010d5f1 100644
--- a/frontend/src/i18n/locales/ko.json
+++ b/frontend/src/i18n/locales/ko.json
@@ -320,22 +320,6 @@
"securityAudit": "보안 감사",
"securityScore": "보안 점수"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "자동 업데이트 패키지가 설치되었습니다.",
- "automaticSecurityUpdates": "자동 보안 업데이트",
- "automaticSecurityUpdatesAreNotSupported": "이 시스템에서는 자동 보안 업데이트가 지원되지 않습니다.",
- "automaticUpdatesDisabled": "자동 업데이트가 비활성화되었습니다.",
- "automaticUpdatesEnabled": "자동 업데이트 활성화됨",
- "failedToDisable": "비활성화 실패: {{message}}",
- "failedToEnable": "활성화 실패: {{message}}",
- "failedToInstall": "설치 실패: {{message}}",
- "installed": "설치됨",
- "loadingAutoUpdatesStatus": "자동 업데이트 상태 로드 중...",
- "notSupported": "지원되지 않음",
- "package": "패키지",
- "whatAreAutomaticSecurityUpdates": "자동 보안 업데이트란 무엇입니까?",
- "whenEnabledYourServerWillAutomatically": "활성화되면 서버가 자동으로 보안 업데이트를 다운로드하고 설치하므로 수동 개입 없이 알려진 취약점으로부터 보호할 수 있습니다."
- },
"backupCalendar": {
"nextMonth": "다음 달",
"previousMonth": "지난달",
@@ -2180,30 +2164,6 @@
"writePermission": "쓰기 권한",
"yourServerIpOrDomain": "귀하의 서버 IP 또는 도메인"
},
- "fail2banTab": {
- "activeJails": "활성 감옥",
- "areYouSureYouWantTo": "{{jail}}에서 {{ip}} 차단을 해제하시겠습니까?",
- "banIp": "IP 차단",
- "banIpAddress": "금지 IP 주소",
- "banned": "금지됨",
- "fail2banInstalledSuccessfully": "Fail2ban이 성공적으로 설치되었습니다",
- "fail2banNotInstalled": "Fail2ban이 설치되지 않았습니다",
- "fail2banStatus": "Fail2ban 상태",
- "failedToBanIp": "IP 차단 실패: {{message}}",
- "failedToInstall": "설치 실패: {{message}}",
- "failedToUnban": "차단 해제 실패: {{message}}",
- "installFail2banToProtectAgainstBrute": "무차별 공격으로부터 보호하려면 Fail2ban을 설치하십시오.",
- "ipBannedIn": "{{banJail}}에서 차단된 IP {{banIP}}",
- "ipUnbanned": "IP {{ip}} 차단 해제됨",
- "jail": "감옥",
- "loadingFail2banStatus": "Fail2ban 상태 로드 중...",
- "noIpsAreCurrentlyBanned": "현재 금지된 IP는 없습니다.",
- "none": "없음",
- "totalBanned": "총 금지",
- "totalBannedIps": "금지된 총 IP 수",
- "unban": "금지 해제",
- "unbanIp": "IP 금지 해제"
- },
"favoriteStar": {
"addToFavorites": "즐겨찾기에 추가",
"removeFromFavorites": "즐겨찾기에서 제거"
@@ -3699,8 +3659,6 @@
"applicationInfo": "신청정보",
"areYouSureYouWantTo": "이 앱의 연결을 해제하시겠습니까? 데이터베이스 자격 증명은 변경되지 않습니다.",
"bandwidth": "대역폭",
- "clamavAntivirusInstalled": "ClamAV 바이러스 백신 설치",
- "clamavServiceRunning": "ClamAV 서비스 실행 중",
"clickRunDiagnosticsToCheckRouting": "라우팅 구성을 확인하고 문제를 식별하려면 \"진단 실행\"을 클릭하십시오.",
"computing": "컴퓨팅 중…",
"cpuLoad": "CPU 부하",
@@ -3711,7 +3669,6 @@
"environmentLinking": "환경 연결",
"fileIntegrityMonitoringEnabled": "파일 무결성 모니터링 활성화됨",
"initializeBaseline": "기준선 초기화",
- "installClamav": "ClamAV 설치",
"integrityBaselineInitialized": "무결성 기준이 초기화되었습니다.",
"last90Days": "지난 90일",
"linkThisAppToAnotherTo": "이 앱을 다른 앱에 연결하여 프로덕션/개발 쌍을 만드세요. 연결된 앱은 데이터베이스 자격 증명을 공유할 수 있습니다.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "변경사항 검토",
"rootPath": "루트 경로",
"routingDiagnostics": "라우팅 진단",
- "scan": "스캔",
"securityAlertsConfigured": "보안 경고가 구성되었습니다.",
"securityPosture": "보안 태세",
"serviceInfo": "서비스 정보",
- "startService": "서비스 시작",
"startTheContainerToSeeLive": "라이브 리소스를 보려면 컨테이너를 시작하세요.",
"successful": "성공",
"tags": "태그",
"thisMonth": "이번 달",
"totalDeploys": "총 배포",
"unlinkApps": "앱 연결 해제",
- "virusDefinitions": "바이러스 정의",
"workers": "노동자"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "해결됨",
"statusPageUnavailable": "상태 페이지를 사용할 수 없습니다."
},
- "quarantineTab": {
- "deleteFile": "파일 삭제",
- "deleteQuarantinedFile": "격리된 파일 삭제",
- "filename": "파일 이름",
- "infectedFilesWillAppearHereWhen": "감염된 파일이 감지되면 여기에 표시됩니다.",
- "noFilesInQuarantine": "격리된 파일이 없습니다.",
- "originalLocation": "원래 위치",
- "originalLocationUnknown": "원래 위치를 알 수 없음",
- "permanentlyDeleteThisCannotBeUndone": "{{filename}}을(를) 영구적으로 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",
- "quarantined": "격리됨",
- "restoreFile": "파일 복원",
- "restoreQuarantinedFile": "격리된 파일 복원",
- "restoreToOnlyDoThisFor": "{{name}}을(를) {{target}}(으)로 복원하시겠습니까? 거짓 긍정에 대해서만 이 작업을 수행하십시오.",
- "restoreToOriginalLocation": "원래 위치로 복원"
- },
"queueDetail": {
"allStatuses": "모든 상태",
"attempts": "시도",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "SSO 전용 모드",
"viewer": "뷰어"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "선별된 웹 셸 표시기가 모든 스캔에서 실행됩니다(엔진:",
- "customPath": "사용자 정의 경로",
- "date": "날짜",
- "deleteCustomRuleFile": "맞춤 규칙 파일 {{name}}을(를) 삭제하시겠습니까?",
- "deleteRule": "규칙 삭제",
- "deleteScannerRule": "스캐너 규칙 삭제",
- "directory": "디렉토리",
- "file": "파일",
- "filesScanned": "검사된 파일:",
- "fullScan": "전체 스캔",
- "inactiveYaraNotInstalled": "비활성 — yara가 설치되지 않았습니다",
- "job": "직업:",
- "match": "경기",
- "noCustomRuleFilesUploadA": "맞춤 규칙 파일이 없습니다. 규칙 세트를 확장하려면 .yar 파일(최대 64KB)을 업로드하세요.",
- "noScansHaveBeenRunYet": "아직 검사가 실행되지 않았습니다.",
- "quickScan": "빠른 스캔",
- "rule": "규칙",
- "scan": "스캔",
- "scanASpecificDirectory": "특정 디렉터리 스캔",
- "scanAnApp": "앱 스캔",
- "scanCommonWebDirectories": "일반적인 웹 디렉토리 스캔",
- "scanEntireSystemSlow": "전체 시스템 스캔(느림)",
- "scanInProgress": "스캔 진행 중",
- "scanning": "스캐닝:",
- "selectAnApp": "앱을 선택하세요…",
- "startAScanAboveToCheck": "위협을 확인하려면 위에서 검사를 시작하세요.",
- "startScan": "스캔 시작",
- "started": "시작됨:",
- "threats": "위협",
- "uploadYar": ".yar 업로드",
- "webShellDetectionRules": "웹셸 탐지 규칙",
- "webShellMalwareScanOfA": "문서루트의 웹셸 + 악성코드 검사",
- "webShellRules": "웹셸 규칙"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "N일마다 전체 백업이 수행됩니다. 나머지는 증분됩니다.",
"backupsRunQuietlyInTheBackground": "백업은 백그라운드에서 조용히 실행됩니다.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "감사",
- "autoUpdates": "자동 업데이트",
"events": "이벤트",
- "fail2ban": "Fail2ban",
"fileIntegrity": "파일 무결성",
"firewall": "방화벽",
"ipLists": "IP 목록",
- "malwareScanner": "악성 코드 스캐너",
- "quarantine": "격리",
- "sshKeys": "SSH 키",
- "vulnerabilityScan": "취약점 스캔"
+ "sshKeys": "SSH 키"
},
"serverDetail": {
"alerts": "경고",
@@ -6562,25 +6461,6 @@
"volumeName": "볼륨 이름 *",
"volumeRemovedSuccessfully": "볼륨이 성공적으로 제거되었습니다."
},
- "vulnerabilityTab": {
- "failedToInstall": "설치 실패: {{message}}",
- "failedToStartScan": "검사 시작 실패: {{message}}",
- "hardeningIndex": "경화 지수",
- "installLynisToPerformSecurityAudits": "보안 감사 및 취약점 검색을 수행하려면 Lynis를 설치하세요.",
- "loadingVulnerabilityScannerStatus": "취약점 스캐너 상태 로드 중...",
- "lynisInstalledSuccessfully": "Lynis가 성공적으로 설치되었습니다.",
- "lynisNotInstalled": "Lynis가 설치되지 않았습니다",
- "lynisVulnerabilityScanner": "Lynis 취약점 스캐너",
- "scanInProgress": "스캔 진행 중",
- "scanResults": "스캔 결과",
- "scanStatus": "스캔 상태",
- "scanningSystemForVulnerabilities": "취약점 스캔 시스템...",
- "started": "시작됨:",
- "suggestions": "제안사항(",
- "vulnerabilityScanStarted": "취약점 스캔이 시작되었습니다.",
- "warnings": "경고 ·",
- "warnings2": "경고("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "웹훅 구독 생성",
"eGSlackNotificationsCiTrigger": "예를 들어 Slack 알림, CI 트리거",
diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.json
index 43dd7d6d..36bcbc53 100644
--- a/frontend/src/i18n/locales/pl.json
+++ b/frontend/src/i18n/locales/pl.json
@@ -320,22 +320,6 @@
"securityAudit": "Audyt bezpieczeństwa",
"securityScore": "wynik bezpieczeństwa"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Zainstalowany pakiet automatycznych aktualizacji",
- "automaticSecurityUpdates": "Automatyczne aktualizacje zabezpieczeń",
- "automaticSecurityUpdatesAreNotSupported": "Automatyczne aktualizacje zabezpieczeń nie są obsługiwane w tym systemie.",
- "automaticUpdatesDisabled": "Automatyczne aktualizacje wyłączone",
- "automaticUpdatesEnabled": "Włączono automatyczne aktualizacje",
- "failedToDisable": "Nie udało się wyłączyć: {{message}}",
- "failedToEnable": "Nie udało się włączyć: {{message}}",
- "failedToInstall": "Nie udało się zainstalować: {{message}}",
- "installed": "Zainstalowany",
- "loadingAutoUpdatesStatus": "Ładowanie stanu automatycznych aktualizacji...",
- "notSupported": "Nieobsługiwane",
- "package": "Pakiet",
- "whatAreAutomaticSecurityUpdates": "Co to są automatyczne aktualizacje zabezpieczeń?",
- "whenEnabledYourServerWillAutomatically": "Po włączeniu Twój serwer automatycznie pobierze i zainstaluje aktualizacje zabezpieczeń, pomagając chronić przed znanymi lukami w zabezpieczeniach bez ręcznej interwencji."
- },
"backupCalendar": {
"nextMonth": "Przyszły miesiąc",
"previousMonth": "Poprzedni miesiąc",
@@ -2180,30 +2164,6 @@
"writePermission": "Napisz pozwolenie",
"yourServerIpOrDomain": "Adres IP lub domena Twojego serwera"
},
- "fail2banTab": {
- "activeJails": "Aktywne więzienia",
- "areYouSureYouWantTo": "Czy na pewno chcesz odblokować {{ip}} z {{jail}}?",
- "banIp": "Zablokuj adres IP",
- "banIpAddress": "Zablokuj adres IP",
- "banned": "Zakazany",
- "fail2banInstalledSuccessfully": "Fail2ban został pomyślnie zainstalowany",
- "fail2banNotInstalled": "Fail2ban nie jest zainstalowany",
- "fail2banStatus": "Stan Fail2ban",
- "failedToBanIp": "Nie udało się zablokować adresu IP: {{message}}",
- "failedToInstall": "Nie udało się zainstalować: {{message}}",
- "failedToUnban": "Nie udało się odblokować: {{message}}",
- "installFail2banToProtectAgainstBrute": "Zainstaluj Fail2ban, aby chronić się przed atakami typu brute-force.",
- "ipBannedIn": "IP {{banIP}} zakazane w {{banJail}}",
- "ipUnbanned": "IP {{ip}} odblokowany",
- "jail": "Więzienie",
- "loadingFail2banStatus": "Ładowanie statusu Fail2ban...",
- "noIpsAreCurrentlyBanned": "Żaden adres IP nie jest obecnie zablokowany.",
- "none": "Nic",
- "totalBanned": "Całkowity zakaz",
- "totalBannedIps": "Całkowita liczba zakazanych adresów IP",
- "unban": "Odblokuj",
- "unbanIp": "Odblokuj adres IP"
- },
"favoriteStar": {
"addToFavorites": "Dodaj do ulubionych",
"removeFromFavorites": "Usuń z ulubionych"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Informacje o aplikacji",
"areYouSureYouWantTo": "Czy na pewno chcesz odłączyć te aplikacje? Poświadczenia bazy danych pozostaną niezmienione.",
"bandwidth": "Przepustowość łącza",
- "clamavAntivirusInstalled": "Zainstalowany program antywirusowy ClamAV",
- "clamavServiceRunning": "Usługa ClamAV działa",
"clickRunDiagnosticsToCheckRouting": "Kliknij „Uruchom diagnostykę”, aby sprawdzić konfigurację routingu i zidentyfikować problemy.",
"computing": "Obliczanie…",
"cpuLoad": "Obciążenie procesora",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Łączenie środowiska",
"fileIntegrityMonitoringEnabled": "Włączono monitorowanie integralności plików",
"initializeBaseline": "Zainicjuj linię bazową",
- "installClamav": "Zainstaluj ClamAV",
"integrityBaselineInitialized": "Zainicjowano linię bazową integralności",
"last90Days": "Ostatnie 90 dni",
"linkThisAppToAnotherTo": "Połącz tę aplikację z inną, aby utworzyć parę produkcja/rozwój. Połączone aplikacje mogą udostępniać dane uwierzytelniające bazy danych.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Przejrzyj zmiany",
"rootPath": "Ścieżka korzenia",
"routingDiagnostics": "Diagnostyka routingu",
- "scan": "Skandować",
"securityAlertsConfigured": "Skonfigurowano alerty zabezpieczeń",
"securityPosture": "Postawa bezpieczeństwa",
"serviceInfo": "Informacje serwisowe",
- "startService": "Uruchom usługę",
"startTheContainerToSeeLive": "Uruchom kontener, aby zobaczyć aktywne zasoby.",
"successful": "Udany",
"tags": "Tagi",
"thisMonth": "w tym miesiącu",
"totalDeploys": "Łączna liczba wdrożeń",
"unlinkApps": "Odłącz aplikacje",
- "virusDefinitions": "Definicje wirusów",
"workers": "Pracownicy"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Rozwiązany",
"statusPageUnavailable": "Strona stanu niedostępna"
},
- "quarantineTab": {
- "deleteFile": "Usuń plik",
- "deleteQuarantinedFile": "Usuń plik poddany kwarantannie",
- "filename": "Nazwa pliku",
- "infectedFilesWillAppearHereWhen": "Zainfekowane pliki pojawią się tutaj po wykryciu",
- "noFilesInQuarantine": "Brak plików w kwarantannie",
- "originalLocation": "Oryginalna lokalizacja",
- "originalLocationUnknown": "Oryginalna lokalizacja nieznana",
- "permanentlyDeleteThisCannotBeUndone": "Trwale usunąć {{filename}}? Tego nie można cofnąć.",
- "quarantined": "Poddano kwarantannie",
- "restoreFile": "Przywróć plik",
- "restoreQuarantinedFile": "Przywróć plik poddany kwarantannie",
- "restoreToOnlyDoThisFor": "Przywrócić {{name}} do {{target}}? Zrób to tylko w przypadku fałszywych alarmów.",
- "restoreToOriginalLocation": "Przywróć do pierwotnej lokalizacji"
- },
"queueDetail": {
"allStatuses": "Wszystkie statusy",
"attempts": "Próbowanie",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Tylko tryb SSO",
"viewer": "Dozorca"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "wybrane wskaźniki powłoki internetowej działają przy każdym skanowaniu (silnik:",
- "customPath": "Niestandardowa ścieżka",
- "date": "Data",
- "deleteCustomRuleFile": "Usunąć plik reguł niestandardowych {{name}}?",
- "deleteRule": "Usuń regułę",
- "deleteScannerRule": "Usuń regułę skanera",
- "directory": "Informator",
- "file": "Plik",
- "filesScanned": "Przeskanowane pliki:",
- "fullScan": "Pełne skanowanie",
- "inactiveYaraNotInstalled": "nieaktywny — Yara nie jest zainstalowana",
- "job": "Stanowisko:",
- "match": "Mecz",
- "noCustomRuleFilesUploadA": "Brak plików reguł niestandardowych. Prześlij plik .yar (maks. 64 KB), aby rozszerzyć zestaw reguł.",
- "noScansHaveBeenRunYet": "Nie przeprowadzono jeszcze żadnych skanów.",
- "quickScan": "Szybkie skanowanie",
- "rule": "Reguła",
- "scan": "Skandować",
- "scanASpecificDirectory": "Przeskanuj określony katalog",
- "scanAnApp": "Zeskanuj aplikację",
- "scanCommonWebDirectories": "Skanuj popularne katalogi internetowe",
- "scanEntireSystemSlow": "Skanuj cały system (wolno)",
- "scanInProgress": "Skanowanie w toku",
- "scanning": "Łów:",
- "selectAnApp": "Wybierz aplikację…",
- "startAScanAboveToCheck": "Rozpocznij skanowanie powyżej, aby sprawdzić zagrożenia.",
- "startScan": "Rozpocznij skanowanie",
- "started": "Rozpoczęto:",
- "threats": "Zagrożenia",
- "uploadYar": "Prześlij .yar",
- "webShellDetectionRules": "Reguły wykrywania powłoki internetowej",
- "webShellMalwareScanOfA": "Powłoka internetowa + skanowanie docroot w poszukiwaniu złośliwego oprogramowania",
- "webShellRules": "Reguły powłoki internetowej"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Pełna kopia zapasowa jest wykonywana co N dni; reszta ma charakter przyrostowy.",
"backupsRunQuietlyInTheBackground": "Kopie zapasowe działają cicho w tle.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Rewizja",
- "autoUpdates": "Automatyczne aktualizacje",
"events": "Wydarzenia",
- "fail2ban": "Fail2ban",
"fileIntegrity": "Integralność plików",
"firewall": "Zapora sieciowa",
"ipLists": "Listy adresów IP",
- "malwareScanner": "Skaner złośliwego oprogramowania",
- "quarantine": "Kwarantanna",
- "sshKeys": "Klucze SSH",
- "vulnerabilityScan": "Skanowanie pod kątem luk w zabezpieczeniach"
+ "sshKeys": "Klucze SSH"
},
"serverDetail": {
"alerts": "Alerty",
@@ -6562,25 +6461,6 @@
"volumeName": "Nazwa woluminu *",
"volumeRemovedSuccessfully": "Wolumin został pomyślnie usunięty"
},
- "vulnerabilityTab": {
- "failedToInstall": "Nie udało się zainstalować: {{message}}",
- "failedToStartScan": "Nie udało się rozpocząć skanowania: {{message}}",
- "hardeningIndex": "Indeks hartowania",
- "installLynisToPerformSecurityAudits": "Zainstaluj Lynis, aby przeprowadzić audyty bezpieczeństwa i skanowanie pod kątem luk w zabezpieczeniach.",
- "loadingVulnerabilityScannerStatus": "Ładowanie stanu skanera luk w zabezpieczeniach...",
- "lynisInstalledSuccessfully": "Lynis został pomyślnie zainstalowany",
- "lynisNotInstalled": "Lynis nie jest zainstalowany",
- "lynisVulnerabilityScanner": "Skaner podatności Lynis",
- "scanInProgress": "Skanowanie w toku",
- "scanResults": "Wyniki skanowania",
- "scanStatus": "Stan skanowania",
- "scanningSystemForVulnerabilities": "Skanowanie systemu pod kątem luk w zabezpieczeniach...",
- "started": "Rozpoczęto:",
- "suggestions": "Sugestie (",
- "vulnerabilityScanStarted": "Rozpoczęło się skanowanie w poszukiwaniu luk",
- "warnings": "ostrzeżenia ·",
- "warnings2": "Ostrzeżenia ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Utwórz subskrypcję webhooka",
"eGSlackNotificationsCiTrigger": "np. Powiadomienia Slack, wyzwalacz CI",
diff --git a/frontend/src/i18n/locales/pt.json b/frontend/src/i18n/locales/pt.json
index 5473836b..93082cd1 100644
--- a/frontend/src/i18n/locales/pt.json
+++ b/frontend/src/i18n/locales/pt.json
@@ -320,22 +320,6 @@
"securityAudit": "Auditoria de segurança",
"securityScore": "pontuação de segurança"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Pacote de atualizações automáticas instalado",
- "automaticSecurityUpdates": "Atualizações automáticas de segurança",
- "automaticSecurityUpdatesAreNotSupported": "Atualizações automáticas de segurança não são suportadas neste sistema.",
- "automaticUpdatesDisabled": "Atualizações automáticas desativadas",
- "automaticUpdatesEnabled": "Atualizações automáticas ativadas",
- "failedToDisable": "Falha ao desativar: {{message}}",
- "failedToEnable": "Falha ao ativar: {{message}}",
- "failedToInstall": "Falha ao instalar: {{message}}",
- "installed": "Instalado",
- "loadingAutoUpdatesStatus": "Carregando o status das atualizações automáticas...",
- "notSupported": "Não compatível",
- "package": "Pacote",
- "whatAreAutomaticSecurityUpdates": "O que são atualizações automáticas de segurança?",
- "whenEnabledYourServerWillAutomatically": "Quando ativado, seu servidor baixará e instalará automaticamente atualizações de segurança, ajudando a proteger contra vulnerabilidades conhecidas sem intervenção manual."
- },
"backupCalendar": {
"nextMonth": "No próximo mês",
"previousMonth": "Mês anterior",
@@ -2180,30 +2164,6 @@
"writePermission": "Permissão de gravação",
"yourServerIpOrDomain": "IP ou domínio do seu servidor"
},
- "fail2banTab": {
- "activeJails": "Prisões ativas",
- "areYouSureYouWantTo": "Tem certeza de que deseja cancelar o banimento de {{ip}} de {{jail}}?",
- "banIp": "Banir IP",
- "banIpAddress": "Banir endereço IP",
- "banned": "Banido",
- "fail2banInstalledSuccessfully": "Fail2ban instalado com sucesso",
- "fail2banNotInstalled": "Fail2ban não instalado",
- "fail2banStatus": "Status de Fail2ban",
- "failedToBanIp": "Falha ao banir IP: {{message}}",
- "failedToInstall": "Falha ao instalar: {{message}}",
- "failedToUnban": "Falha ao cancelar o banimento: {{message}}",
- "installFail2banToProtectAgainstBrute": "Instale o Fail2ban para se proteger contra ataques de força bruta.",
- "ipBannedIn": "IP {{banIP}} banido em {{banJail}}",
- "ipUnbanned": "IP {{ip}} não banido",
- "jail": "Prisão",
- "loadingFail2banStatus": "Carregando o status do Fail2ban...",
- "noIpsAreCurrentlyBanned": "Nenhum IP está banido atualmente.",
- "none": "Nenhum",
- "totalBanned": "Totalmente banido",
- "totalBannedIps": "Total de IPs banidos",
- "unban": "Desbanir",
- "unbanIp": "Cancelar banimento de IP"
- },
"favoriteStar": {
"addToFavorites": "Adicionar aos favoritos",
"removeFromFavorites": "Remover dos favoritos"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Informações do aplicativo",
"areYouSureYouWantTo": "Tem certeza de que deseja desvincular esses aplicativos? As credenciais do banco de dados permanecerão inalteradas.",
"bandwidth": "Largura de banda",
- "clamavAntivirusInstalled": "Antivírus ClamAV instalado",
- "clamavServiceRunning": "Serviço ClamAV em execução",
"clickRunDiagnosticsToCheckRouting": "Clique em “Executar diagnóstico” para verificar a configuração de roteamento e identificar problemas.",
"computing": "Computação…",
"cpuLoad": "Carga da CPU",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Vinculação de ambiente",
"fileIntegrityMonitoringEnabled": "Monitoramento de integridade de arquivos ativado",
"initializeBaseline": "Inicializar linha de base",
- "installClamav": "Instale o ClamAV",
"integrityBaselineInitialized": "Linha de base de integridade inicializada",
"last90Days": "Últimos 90 dias",
"linkThisAppToAnotherTo": "Vincule este aplicativo a outro para criar um par produção/desenvolvimento. Os aplicativos vinculados podem compartilhar credenciais de banco de dados.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Revise as alterações",
"rootPath": "Caminho raiz",
"routingDiagnostics": "Diagnóstico de roteamento",
- "scan": "Digitalizar",
"securityAlertsConfigured": "Alertas de segurança configurados",
"securityPosture": "Postura de segurança",
"serviceInfo": "Informações de serviço",
- "startService": "Iniciar serviço",
"startTheContainerToSeeLive": "Inicie o contêiner para ver os recursos ativos.",
"successful": "Bem sucedido",
"tags": "Etiquetas",
"thisMonth": "este mês",
"totalDeploys": "Total de implantações",
"unlinkApps": "Desvincular aplicativos",
- "virusDefinitions": "Definições de vírus",
"workers": "Trabalhadores"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Resolvido",
"statusPageUnavailable": "Página de status indisponível"
},
- "quarantineTab": {
- "deleteFile": "Excluir arquivo",
- "deleteQuarantinedFile": "Excluir arquivo em quarentena",
- "filename": "Nome do arquivo",
- "infectedFilesWillAppearHereWhen": "Os arquivos infectados aparecerão aqui quando detectados",
- "noFilesInQuarantine": "Nenhum arquivo em quarentena",
- "originalLocation": "Localização Original",
- "originalLocationUnknown": "Localização original desconhecida",
- "permanentlyDeleteThisCannotBeUndone": "Excluir {{filename}} permanentemente? Isto não pode ser desfeito.",
- "quarantined": "Em quarentena",
- "restoreFile": "Restaurar arquivo",
- "restoreQuarantinedFile": "Restaurar arquivo em quarentena",
- "restoreToOnlyDoThisFor": "Restaurar {{name}} para {{target}}? Faça isso apenas para falsos positivos.",
- "restoreToOriginalLocation": "Restaurar para o local original"
- },
"queueDetail": {
"allStatuses": "Todos os status",
"attempts": "Tentativas",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Modo somente SSO",
"viewer": "Visualizador"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "indicadores de web-shell selecionados são executados em cada varredura (mecanismo:",
- "customPath": "Caminho personalizado",
- "date": "Data",
- "deleteCustomRuleFile": "Excluir arquivo de regras personalizadas {{name}}?",
- "deleteRule": "Excluir regra",
- "deleteScannerRule": "Excluir regra do scanner",
- "directory": "Diretório",
- "file": "Arquivo",
- "filesScanned": "Arquivos verificados:",
- "fullScan": "Verificação completa",
- "inactiveYaraNotInstalled": "inativo – yara não instalado",
- "job": "Trabalho:",
- "match": "Partida",
- "noCustomRuleFilesUploadA": "Nenhum arquivo de regras personalizado. Carregue um arquivo .yar (máximo de 64 KB) para estender o conjunto de regras.",
- "noScansHaveBeenRunYet": "Nenhuma verificação foi executada ainda.",
- "quickScan": "Verificação rápida",
- "rule": "Regra",
- "scan": "Digitalizar",
- "scanASpecificDirectory": "Digitalize um diretório específico",
- "scanAnApp": "Digitalizar um aplicativo",
- "scanCommonWebDirectories": "Digitalize diretórios comuns da web",
- "scanEntireSystemSlow": "Digitalizar todo o sistema (lento)",
- "scanInProgress": "Verificação em andamento",
- "scanning": "Digitalização:",
- "selectAnApp": "Selecione um aplicativo…",
- "startAScanAboveToCheck": "Inicie uma verificação acima para verificar se há ameaças.",
- "startScan": "Iniciar verificação",
- "started": "Iniciado:",
- "threats": "Ameaças",
- "uploadYar": "Carregar .yar",
- "webShellDetectionRules": "Regras de detecção de web-shell",
- "webShellMalwareScanOfA": "Web-shell + verificação de malware de um docroot",
- "webShellRules": "Regras do Webshell"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Um backup completo é feito a cada N dias; o resto é incremental.",
"backupsRunQuietlyInTheBackground": "Os backups são executados silenciosamente em segundo plano.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Auditoria",
- "autoUpdates": "Atualizações automáticas",
"events": "Eventos",
- "fail2ban": "Fail2ban",
"fileIntegrity": "Integridade de arquivos",
"firewall": "Firewall",
"ipLists": "Listas de IP",
- "malwareScanner": "Verificador de malware",
- "quarantine": "Quarentena",
- "sshKeys": "Chaves SSH",
- "vulnerabilityScan": "Verificação de vulnerabilidade"
+ "sshKeys": "Chaves SSH"
},
"serverDetail": {
"alerts": "Alertas",
@@ -6562,25 +6461,6 @@
"volumeName": "Nome do volume *",
"volumeRemovedSuccessfully": "Volume removido com sucesso"
},
- "vulnerabilityTab": {
- "failedToInstall": "Falha ao instalar: {{message}}",
- "failedToStartScan": "Falha ao iniciar a verificação: {{message}}",
- "hardeningIndex": "Índice de endurecimento",
- "installLynisToPerformSecurityAudits": "Instale o Lynis para realizar auditorias de segurança e verificação de vulnerabilidades.",
- "loadingVulnerabilityScannerStatus": "Carregando o status do scanner de vulnerabilidade...",
- "lynisInstalledSuccessfully": "Lynis instalado com sucesso",
- "lynisNotInstalled": "Lynis não instalado",
- "lynisVulnerabilityScanner": "Verificador de vulnerabilidade Lynis",
- "scanInProgress": "Verificação em andamento",
- "scanResults": "Resultados da verificação",
- "scanStatus": "Status da verificação",
- "scanningSystemForVulnerabilities": "Verificando o sistema em busca de vulnerabilidades...",
- "started": "Iniciado:",
- "suggestions": "Sugestões (",
- "vulnerabilityScanStarted": "Verificação de vulnerabilidade iniciada",
- "warnings": "avisos ·",
- "warnings2": "Avisos ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Criar assinatura de webhook",
"eGSlackNotificationsCiTrigger": "por exemplo Notificações do Slack, gatilho de CI",
diff --git a/frontend/src/i18n/locales/ru.json b/frontend/src/i18n/locales/ru.json
index 4a6cb94e..fafcd83f 100644
--- a/frontend/src/i18n/locales/ru.json
+++ b/frontend/src/i18n/locales/ru.json
@@ -320,22 +320,6 @@
"securityAudit": "Аудит безопасности",
"securityScore": "оценка безопасности"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Установлен пакет автообновлений",
- "automaticSecurityUpdates": "Автоматические обновления безопасности",
- "automaticSecurityUpdatesAreNotSupported": "Автоматические обновления безопасности не поддерживаются в этой системе.",
- "automaticUpdatesDisabled": "Автоматические обновления отключены",
- "automaticUpdatesEnabled": "Автоматические обновления включены",
- "failedToDisable": "Не удалось отключить: {{message}}",
- "failedToEnable": "Не удалось включить: {{message}}",
- "failedToInstall": "Не удалось установить: {{message}}",
- "installed": "Установлено",
- "loadingAutoUpdatesStatus": "Загрузка статуса автообновлений...",
- "notSupported": "Не поддерживается",
- "package": "Упаковка",
- "whatAreAutomaticSecurityUpdates": "Что такое автоматические обновления безопасности?",
- "whenEnabledYourServerWillAutomatically": "Если эта функция включена, ваш сервер будет автоматически загружать и устанавливать обновления безопасности, помогая защититься от известных уязвимостей без ручного вмешательства."
- },
"backupCalendar": {
"nextMonth": "В следующем месяце",
"previousMonth": "Предыдущий месяц",
@@ -2180,30 +2164,6 @@
"writePermission": "Разрешение на запись",
"yourServerIpOrDomain": "IP вашего сервера или домен"
},
- "fail2banTab": {
- "activeJails": "Действующие тюрьмы",
- "areYouSureYouWantTo": "Вы уверены, что хотите разблокировать {{ip}} в {{jail}}?",
- "banIp": "Запретить IP",
- "banIpAddress": "Запретить IP-адрес",
- "banned": "Запрещено",
- "fail2banInstalledSuccessfully": "Fail2ban успешно установлен",
- "fail2banNotInstalled": "Fail2ban не установлен",
- "fail2banStatus": "Статус Fail2ban",
- "failedToBanIp": "Не удалось заблокировать IP: {{message}}.",
- "failedToInstall": "Не удалось установить: {{message}}",
- "failedToUnban": "Не удалось разблокировать: {{message}}",
- "installFail2banToProtectAgainstBrute": "Установите Fail2ban для защиты от атак грубой силы.",
- "ipBannedIn": "IP {{banIP}} забанен в {{banJail}}",
- "ipUnbanned": "IP {{ip}} разбанен",
- "jail": "Тюрьма",
- "loadingFail2banStatus": "Загрузка статуса Fail2ban...",
- "noIpsAreCurrentlyBanned": "В настоящее время ни один IP-адрес не запрещен.",
- "none": "Нет",
- "totalBanned": "Всего забанено",
- "totalBannedIps": "Всего запрещенных IP-адресов",
- "unban": "Разбанить",
- "unbanIp": "Разбанить IP"
- },
"favoriteStar": {
"addToFavorites": "Добавить в избранное",
"removeFromFavorites": "Удалить из избранного"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Информация о приложении",
"areYouSureYouWantTo": "Вы уверены, что хотите отменить связь этих приложений? Учетные данные базы данных останутся неизменными.",
"bandwidth": "Пропускная способность",
- "clamavAntivirusInstalled": "Установлен антивирус ClamAV.",
- "clamavServiceRunning": "Служба ClamAV работает",
"clickRunDiagnosticsToCheckRouting": "Нажмите «Запустить диагностику», чтобы проверить конфигурацию маршрутизации и выявить проблемы.",
"computing": "Вычисление…",
"cpuLoad": "Загрузка процессора",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Связь с окружающей средой",
"fileIntegrityMonitoringEnabled": "Мониторинг целостности файлов включен",
"initializeBaseline": "Инициализировать базовый уровень",
- "installClamav": "Установить ClamAV",
"integrityBaselineInitialized": "Базовый уровень целостности инициализирован",
"last90Days": "Последние 90 дней",
"linkThisAppToAnotherTo": "Свяжите это приложение с другим, чтобы создать пару «производство/разработка». Связанные приложения могут совместно использовать учетные данные базы данных.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Просмотрите изменения",
"rootPath": "Корневой путь",
"routingDiagnostics": "Диагностика маршрутизации",
- "scan": "Сканировать",
"securityAlertsConfigured": "Оповещения безопасности настроены",
"securityPosture": "Положение безопасности",
"serviceInfo": "Информация об услуге",
- "startService": "Запустить службу",
"startTheContainerToSeeLive": "Запустите контейнер, чтобы увидеть живые ресурсы.",
"successful": "Успешный",
"tags": "Теги",
"thisMonth": "в этом месяце",
"totalDeploys": "Всего развертываний",
"unlinkApps": "Отключить приложения",
- "virusDefinitions": "Определения вирусов",
"workers": "Рабочие процессы"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Решено",
"statusPageUnavailable": "Страница статуса недоступна"
},
- "quarantineTab": {
- "deleteFile": "Удалить файл",
- "deleteQuarantinedFile": "Удалить файл из карантина",
- "filename": "Имя файла",
- "infectedFilesWillAppearHereWhen": "Зараженные файлы появятся здесь при обнаружении.",
- "noFilesInQuarantine": "Нет файлов в карантине",
- "originalLocation": "Исходное местоположение",
- "originalLocationUnknown": "Исходное местоположение неизвестно",
- "permanentlyDeleteThisCannotBeUndone": "Удалить {{filename}} навсегда? Это невозможно отменить.",
- "quarantined": "На карантине",
- "restoreFile": "Восстановить файл",
- "restoreQuarantinedFile": "Восстановить файл из карантина",
- "restoreToOnlyDoThisFor": "Восстановить {{name}} в {{target}}? Делайте это только в случае ложных срабатываний.",
- "restoreToOriginalLocation": "Восстановить в исходное местоположение"
- },
"queueDetail": {
"allStatuses": "Все статусы",
"attempts": "Попытки",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Режим только единого входа",
"viewer": "Наблюдатель"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "тщательно подобранные индикаторы веб-оболочки запускаются при каждом сканировании (движок:",
- "customPath": "Пользовательский путь",
- "date": "Дата",
- "deleteCustomRuleFile": "Удалить файл специальных правил {{name}}?",
- "deleteRule": "Удалить правило",
- "deleteScannerRule": "Удалить правило сканера",
- "directory": "Каталог",
- "file": "Файл",
- "filesScanned": "Отсканированные файлы:",
- "fullScan": "Полное сканирование",
- "inactiveYaraNotInstalled": "неактивно — Yara не установлена",
- "job": "Работа:",
- "match": "Соответствовать",
- "noCustomRuleFilesUploadA": "Никаких файлов пользовательских правил. Загрузите файл .yar (максимум 64 КБ), чтобы расширить набор правил.",
- "noScansHaveBeenRunYet": "Сканирования еще не проводились.",
- "quickScan": "Быстрое сканирование",
- "rule": "Правило",
- "scan": "Сканировать",
- "scanASpecificDirectory": "Сканировать определенный каталог",
- "scanAnApp": "Сканировать приложение",
- "scanCommonWebDirectories": "Сканировать общие веб-каталоги",
- "scanEntireSystemSlow": "Сканировать всю систему (медленно)",
- "scanInProgress": "Выполняется сканирование",
- "scanning": "Сканирование:",
- "selectAnApp": "Выберите приложение…",
- "startAScanAboveToCheck": "Запустите сканирование выше, чтобы проверить наличие угроз.",
- "startScan": "Начать сканирование",
- "started": "Начато:",
- "threats": "Угрозы",
- "uploadYar": "Загрузить .yar",
- "webShellDetectionRules": "Правила обнаружения веб-шелла",
- "webShellMalwareScanOfA": "Веб-шелл + сканирование документа на наличие вредоносных программ",
- "webShellRules": "Правила веб-шелла"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Полная резервная копия создается каждые N дней; остальные являются постепенными.",
"backupsRunQuietlyInTheBackground": "Резервное копирование выполняется незаметно в фоновом режиме.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Аудит",
- "autoUpdates": "Автоматические обновления",
"events": "События",
- "fail2ban": "Фэйл2бан",
"fileIntegrity": "Целостность файла",
"firewall": "Брандмауэр",
"ipLists": "Списки IP-адресов",
- "malwareScanner": "Сканер вредоносных программ",
- "quarantine": "Карантин",
- "sshKeys": "SSH Keys",
- "vulnerabilityScan": "Сканирование уязвимостей"
+ "sshKeys": "SSH Keys"
},
"serverDetail": {
"alerts": "Оповещения",
@@ -6562,25 +6461,6 @@
"volumeName": "Имя тома *",
"volumeRemovedSuccessfully": "Том успешно удален"
},
- "vulnerabilityTab": {
- "failedToInstall": "Не удалось установить: {{message}}",
- "failedToStartScan": "Не удалось начать сканирование: {{message}}",
- "hardeningIndex": "Индекс закалки",
- "installLynisToPerformSecurityAudits": "Установите Lynis для проведения аудита безопасности и сканирования уязвимостей.",
- "loadingVulnerabilityScannerStatus": "Загрузка статуса сканера уязвимостей...",
- "lynisInstalledSuccessfully": "Линис успешно установлен",
- "lynisNotInstalled": "Линис не установлен",
- "lynisVulnerabilityScanner": "Сканер уязвимостей Lynis",
- "scanInProgress": "Выполняется сканирование",
- "scanResults": "Результаты сканирования",
- "scanStatus": "Статус сканирования",
- "scanningSystemForVulnerabilities": "Сканирование системы на уязвимости...",
- "started": "Начато:",
- "suggestions": "Предложения (",
- "vulnerabilityScanStarted": "Начато сканирование уязвимостей",
- "warnings": "предупреждения ·",
- "warnings2": "Предупреждения ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Создать подписку на вебхук",
"eGSlackNotificationsCiTrigger": "например Slack-уведомления, триггер CI",
diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.json
index d755c519..88903749 100644
--- a/frontend/src/i18n/locales/th.json
+++ b/frontend/src/i18n/locales/th.json
@@ -320,22 +320,6 @@
"securityAudit": "การตรวจสอบความปลอดภัย",
"securityScore": "คะแนนความปลอดภัย"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "ติดตั้งแพ็คเกจอัพเดตอัตโนมัติแล้ว",
- "automaticSecurityUpdates": "การอัปเดตความปลอดภัยอัตโนมัติ",
- "automaticSecurityUpdatesAreNotSupported": "ไม่รองรับการอัปเดตความปลอดภัยอัตโนมัติบนระบบนี้",
- "automaticUpdatesDisabled": "ปิดใช้งานการอัปเดตอัตโนมัติแล้ว",
- "automaticUpdatesEnabled": "เปิดใช้งานการอัปเดตอัตโนมัติแล้ว",
- "failedToDisable": "ไม่สามารถปิดการใช้งาน: {{message}}",
- "failedToEnable": "ไม่สามารถเปิดใช้งาน: {{message}}",
- "failedToInstall": "ติดตั้งไม่สำเร็จ: {{message}}",
- "installed": "ติดตั้งแล้ว",
- "loadingAutoUpdatesStatus": "กำลังโหลดสถานะการอัปเดตอัตโนมัติ...",
- "notSupported": "ไม่รองรับ",
- "package": "บรรจุุภัณฑ์",
- "whatAreAutomaticSecurityUpdates": "การอัปเดตความปลอดภัยอัตโนมัติคืออะไร",
- "whenEnabledYourServerWillAutomatically": "เมื่อเปิดใช้งาน เซิร์ฟเวอร์ของคุณจะดาวน์โหลดและติดตั้งการอัปเดตความปลอดภัยโดยอัตโนมัติ ซึ่งช่วยป้องกันช่องโหว่ที่ทราบโดยไม่ต้องมีการแทรกแซงด้วยตนเอง"
- },
"backupCalendar": {
"nextMonth": "เดือนหน้า",
"previousMonth": "เดือนที่แล้ว",
@@ -2180,30 +2164,6 @@
"writePermission": "สิทธิ์ในการเขียน",
"yourServerIpOrDomain": "IP เซิร์ฟเวอร์หรือโดเมนของคุณ"
},
- "fail2banTab": {
- "activeJails": "คุกที่ใช้งานอยู่",
- "areYouSureYouWantTo": "คุณแน่ใจหรือไม่ว่าต้องการยกเลิกการแบน {{ip}} จาก {{jail}}",
- "banIp": "บ้านไอพี",
- "banIpAddress": "บ้านที่อยู่ IP",
- "banned": "ห้าม",
- "fail2banInstalledSuccessfully": "ติดตั้ง Fail2ban สำเร็จแล้ว",
- "fail2banNotInstalled": "ไม่ได้ติดตั้ง Fail2ban",
- "fail2banStatus": "สถานะ Fail2ban",
- "failedToBanIp": "ไม่สามารถแบน IP: {{message}}",
- "failedToInstall": "ติดตั้งไม่สำเร็จ: {{message}}",
- "failedToUnban": "ยกเลิกการแบนไม่สำเร็จ: {{message}}",
- "installFail2banToProtectAgainstBrute": "ติดตั้ง Fail2ban เพื่อป้องกันการโจมตีแบบเดรัจฉาน",
- "ipBannedIn": "IP {{banIP}} ถูกแบนใน {{banJail}}",
- "ipUnbanned": "IP {{ip}} ไม่ถูกแบน",
- "jail": "คุก",
- "loadingFail2banStatus": "กำลังโหลดสถานะ Fail2ban...",
- "noIpsAreCurrentlyBanned": "ไม่มีการแบน IP ในปัจจุบัน",
- "none": "ไม่มี",
- "totalBanned": "ห้ามทั้งหมด",
- "totalBannedIps": "IP ที่ถูกแบนทั้งหมด",
- "unban": "เลิกแบน",
- "unbanIp": "ยกเลิกการแบน IP"
- },
"favoriteStar": {
"addToFavorites": "เพิ่มในรายการโปรด",
"removeFromFavorites": "ลบออกจากรายการโปรด"
@@ -3699,8 +3659,6 @@
"applicationInfo": "ข้อมูลการสมัคร",
"areYouSureYouWantTo": "คุณแน่ใจหรือไม่ว่าต้องการยกเลิกการเชื่อมโยงแอปเหล่านี้ ข้อมูลรับรองฐานข้อมูลจะยังคงไม่เปลี่ยนแปลง",
"bandwidth": "แบนด์วิธ",
- "clamavAntivirusInstalled": "ติดตั้งโปรแกรมป้องกันไวรัส ClamAV แล้ว",
- "clamavServiceRunning": "บริการ ClamAV ทำงานอยู่",
"clickRunDiagnosticsToCheckRouting": "คลิก \"เรียกใช้การวินิจฉัย\" เพื่อตรวจสอบการกำหนดค่าเส้นทางและระบุปัญหา",
"computing": "คอมพิวเตอร์...",
"cpuLoad": "โหลดซีพียู",
@@ -3711,7 +3669,6 @@
"environmentLinking": "การเชื่อมโยงสิ่งแวดล้อม",
"fileIntegrityMonitoringEnabled": "เปิดใช้งานการตรวจสอบความสมบูรณ์ของไฟล์แล้ว",
"initializeBaseline": "เริ่มต้นพื้นฐาน",
- "installClamav": "ติดตั้ง ClamAV",
"integrityBaselineInitialized": "เริ่มต้นข้อมูลพื้นฐานด้านความสมบูรณ์แล้ว",
"last90Days": "90 วันที่ผ่านมา",
"linkThisAppToAnotherTo": "เชื่อมโยงแอปนี้กับแอปอื่นเพื่อสร้างคู่การผลิต/การพัฒนา แอพที่เชื่อมโยงสามารถแชร์ข้อมูลรับรองฐานข้อมูลได้",
@@ -3736,18 +3693,15 @@
"reviewChanges": "ตรวจสอบการเปลี่ยนแปลง",
"rootPath": "เส้นทางราก",
"routingDiagnostics": "การวินิจฉัยเส้นทาง",
- "scan": "สแกน",
"securityAlertsConfigured": "กำหนดค่าการแจ้งเตือนความปลอดภัยแล้ว",
"securityPosture": "ท่าทางการรักษาความปลอดภัย",
"serviceInfo": "ข้อมูลการบริการ",
- "startService": "เริ่มให้บริการ",
"startTheContainerToSeeLive": "เริ่มคอนเทนเนอร์เพื่อดูทรัพยากรที่ใช้งานอยู่",
"successful": "ประสบความสำเร็จ",
"tags": "แท็ก",
"thisMonth": "เดือนนี้",
"totalDeploys": "การปรับใช้ทั้งหมด",
"unlinkApps": "ยกเลิกการเชื่อมโยงแอป",
- "virusDefinitions": "คำจำกัดความของไวรัส",
"workers": "คนงาน"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "แก้ไขแล้ว",
"statusPageUnavailable": "หน้าสถานะไม่พร้อมใช้งาน"
},
- "quarantineTab": {
- "deleteFile": "ลบไฟล์",
- "deleteQuarantinedFile": "ลบไฟล์ที่ถูกกักกัน",
- "filename": "ชื่อไฟล์",
- "infectedFilesWillAppearHereWhen": "ไฟล์ที่ติดไวรัสจะปรากฏที่นี่เมื่อตรวจพบ",
- "noFilesInQuarantine": "ไม่มีไฟล์ในการกักกัน",
- "originalLocation": "ตำแหน่งเดิม",
- "originalLocationUnknown": "ไม่ทราบตำแหน่งเดิม",
- "permanentlyDeleteThisCannotBeUndone": "ลบ {{filename}} อย่างถาวรหรือไม่ สิ่งนี้ไม่สามารถยกเลิกได้",
- "quarantined": "ถูกกักกัน",
- "restoreFile": "กู้คืนไฟล์",
- "restoreQuarantinedFile": "กู้คืนไฟล์ที่ถูกกักกัน",
- "restoreToOnlyDoThisFor": "กู้คืน {{name}} เป็น {{target}} หรือไม่ ทำเช่นนี้เฉพาะกับผลบวกลวงเท่านั้น",
- "restoreToOriginalLocation": "กลับคืนสู่ตำแหน่งเดิม"
- },
"queueDetail": {
"allStatuses": "สถานะทั้งหมด",
"attempts": "ความพยายาม",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "โหมด SSO เท่านั้น",
"viewer": "ผู้ดู"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "ตัวบ่งชี้ web-shell ที่รวบรวมไว้จะทำงานทุกครั้งที่สแกน (เครื่องยนต์:",
- "customPath": "เส้นทางที่กำหนดเอง",
- "date": "วันที่",
- "deleteCustomRuleFile": "ลบไฟล์กฎที่กำหนดเอง {{name}} หรือไม่",
- "deleteRule": "ลบกฎ",
- "deleteScannerRule": "ลบกฎเครื่องสแกน",
- "directory": "ไดเรกทอรี",
- "file": "ไฟล์",
- "filesScanned": "ไฟล์ที่สแกน:",
- "fullScan": "การสแกนแบบเต็ม",
- "inactiveYaraNotInstalled": "ไม่ได้ใช้งาน — ไม่ได้ติดตั้ง yara",
- "job": "งาน:",
- "match": "จับคู่",
- "noCustomRuleFilesUploadA": "ไม่มีไฟล์กฎที่กำหนดเอง อัปโหลดไฟล์ .yar (สูงสุด 64 KB) เพื่อขยายชุดกฎ",
- "noScansHaveBeenRunYet": "ยังไม่มีการดำเนินการสแกน",
- "quickScan": "สแกนด่วน",
- "rule": "กฎ",
- "scan": "สแกน",
- "scanASpecificDirectory": "สแกนไดเร็กทอรีเฉพาะ",
- "scanAnApp": "สแกนแอป",
- "scanCommonWebDirectories": "สแกนไดเรกทอรีเว็บทั่วไป",
- "scanEntireSystemSlow": "สแกนทั้งระบบ (ช้า)",
- "scanInProgress": "อยู่ระหว่างการสแกน",
- "scanning": "การสแกน:",
- "selectAnApp": "เลือกแอป...",
- "startAScanAboveToCheck": "เริ่มการสแกนด้านบนเพื่อตรวจสอบภัยคุกคาม",
- "startScan": "เริ่มการสแกน",
- "started": "เริ่ม:",
- "threats": "ภัยคุกคาม",
- "uploadYar": "อัพโหลด .yar",
- "webShellDetectionRules": "กฎการตรวจจับ Web-shell",
- "webShellMalwareScanOfA": "การสแกน Web-shell + มัลแวร์ของ docroot",
- "webShellRules": "กฎของเว็บเชลล์"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "การสำรองข้อมูลทั้งหมดจะดำเนินการทุกๆ N วัน ส่วนที่เหลือจะเพิ่มขึ้น",
"backupsRunQuietlyInTheBackground": "การสำรองข้อมูลจะทำงานอย่างเงียบๆ ในเบื้องหลัง",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "การตรวจสอบ",
- "autoUpdates": "อัปเดตอัตโนมัติ",
"events": "กิจกรรม",
- "fail2ban": "Fail2ban",
"fileIntegrity": "ความสมบูรณ์ของไฟล์",
"firewall": "ไฟร์วอลล์",
"ipLists": "รายการไอพี",
- "malwareScanner": "เครื่องสแกนมัลแวร์",
- "quarantine": "การกักกัน",
- "sshKeys": "คีย์ SSH",
- "vulnerabilityScan": "การสแกนช่องโหว่"
+ "sshKeys": "คีย์ SSH"
},
"serverDetail": {
"alerts": "การแจ้งเตือน",
@@ -6562,25 +6461,6 @@
"volumeName": "ชื่อวอลุ่ม *",
"volumeRemovedSuccessfully": "ลบโวลุ่มเรียบร้อยแล้ว"
},
- "vulnerabilityTab": {
- "failedToInstall": "ติดตั้งไม่สำเร็จ: {{message}}",
- "failedToStartScan": "ไม่สามารถเริ่มการสแกน: {{message}}",
- "hardeningIndex": "ดัชนีการแข็งตัว",
- "installLynisToPerformSecurityAudits": "ติดตั้ง Lynis เพื่อทำการตรวจสอบความปลอดภัยและการสแกนช่องโหว่",
- "loadingVulnerabilityScannerStatus": "กำลังโหลดสถานะเครื่องสแกนช่องโหว่...",
- "lynisInstalledSuccessfully": "ติดตั้ง Lynis สำเร็จแล้ว",
- "lynisNotInstalled": "ไม่ได้ติดตั้ง Lynis",
- "lynisVulnerabilityScanner": "เครื่องสแกนช่องโหว่ของ Lynis",
- "scanInProgress": "อยู่ระหว่างการสแกน",
- "scanResults": "ผลลัพธ์การสแกน",
- "scanStatus": "สถานะการสแกน",
- "scanningSystemForVulnerabilities": "ระบบสแกนหาช่องโหว่...",
- "started": "เริ่ม:",
- "suggestions": "คำแนะนำ (",
- "vulnerabilityScanStarted": "การสแกนช่องโหว่เริ่มต้นขึ้น",
- "warnings": "คำเตือน ·",
- "warnings2": "คำเตือน ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "สร้างการสมัครสมาชิก Webhook",
"eGSlackNotificationsCiTrigger": "เช่น การแจ้งเตือนหย่อน, ทริกเกอร์ CI",
diff --git a/frontend/src/i18n/locales/tr.json b/frontend/src/i18n/locales/tr.json
index 5da2e3c9..88455015 100644
--- a/frontend/src/i18n/locales/tr.json
+++ b/frontend/src/i18n/locales/tr.json
@@ -320,22 +320,6 @@
"securityAudit": "Güvenlik Denetimi",
"securityScore": "güvenlik puanı"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Otomatik güncelleme paketi yüklendi",
- "automaticSecurityUpdates": "Otomatik Güvenlik Güncellemeleri",
- "automaticSecurityUpdatesAreNotSupported": "Otomatik güvenlik güncellemeleri bu sistemde desteklenmemektedir.",
- "automaticUpdatesDisabled": "Otomatik güncellemeler devre dışı bırakıldı",
- "automaticUpdatesEnabled": "Otomatik güncellemeler etkinleştirildi",
- "failedToDisable": "Devre dışı bırakılamadı: {{message}}",
- "failedToEnable": "Etkinleştirilemedi: {{message}}",
- "failedToInstall": "Yükleme başarısız oldu: {{message}}",
- "installed": "Yüklendi",
- "loadingAutoUpdatesStatus": "Otomatik güncelleme durumu yükleniyor...",
- "notSupported": "Desteklenmiyor",
- "package": "Paket",
- "whatAreAutomaticSecurityUpdates": "Otomatik güvenlik güncellemeleri nedir?",
- "whenEnabledYourServerWillAutomatically": "Etkinleştirildiğinde, sunucunuz güvenlik güncellemelerini otomatik olarak indirip yükleyerek manuel müdahaleye gerek kalmadan bilinen güvenlik açıklarına karşı korunmaya yardımcı olur."
- },
"backupCalendar": {
"nextMonth": "Gelecek ay",
"previousMonth": "Önceki ay",
@@ -2180,30 +2164,6 @@
"writePermission": "Yazma İzni",
"yourServerIpOrDomain": "Sunucu IP'niz veya etki alanınız"
},
- "fail2banTab": {
- "activeJails": "Aktif hapishaneler",
- "areYouSureYouWantTo": "{{ip}}'nin {{jail}} üzerindeki yasağını kaldırmak istediğinizden emin misiniz?",
- "banIp": "IP'yi yasakla",
- "banIpAddress": "IP Adresini Yasakla",
- "banned": "Yasaklandı",
- "fail2banInstalledSuccessfully": "Fail2ban başarıyla kuruldu",
- "fail2banNotInstalled": "Fail2ban Kurulu Değil",
- "fail2banStatus": "Fail2ban Durumu",
- "failedToBanIp": "IP yasaklanamadı: {{message}}",
- "failedToInstall": "Yükleme başarısız oldu: {{message}}",
- "failedToUnban": "Yasak kaldırılamadı: {{message}}",
- "installFail2banToProtectAgainstBrute": "Kaba kuvvet saldırılarına karşı korunmak için Fail2ban'ı yükleyin.",
- "ipBannedIn": "IP {{banIP}}, {{banJail}}'de yasaklandı",
- "ipUnbanned": "IP {{ip}} yasağı kaldırıldı",
- "jail": "Hapishane",
- "loadingFail2banStatus": "Fail2ban durumu yükleniyor...",
- "noIpsAreCurrentlyBanned": "Şu anda hiçbir IP yasaklanmamıştır.",
- "none": "Hiçbiri",
- "totalBanned": "Toplam yasaklı",
- "totalBannedIps": "Toplam yasaklı IP'ler",
- "unban": "Yasağı kaldır",
- "unbanIp": "IP yasağını kaldır"
- },
"favoriteStar": {
"addToFavorites": "Favorilere ekle",
"removeFromFavorites": "Favorilerden kaldır"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Başvuru Bilgileri",
"areYouSureYouWantTo": "Bu uygulamaların bağlantısını kaldırmak istediğinizden emin misiniz? Veritabanı kimlik bilgileri değişmeden kalacaktır.",
"bandwidth": "Bant genişliği",
- "clamavAntivirusInstalled": "ClamAV antivirüs yüklü",
- "clamavServiceRunning": "ClamAV hizmeti çalışıyor",
"clickRunDiagnosticsToCheckRouting": "Yönlendirme yapılandırmasını kontrol etmek ve sorunları tanımlamak için \"Tanılamayı Çalıştır\"ı tıklayın.",
"computing": "Bilgisayar…",
"cpuLoad": "CPU Yükü",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Çevre Bağlantısı",
"fileIntegrityMonitoringEnabled": "Dosya bütünlüğü izleme etkin",
"initializeBaseline": "Taban çizgisini başlat",
- "installClamav": "ClamAV'ı yükleyin",
"integrityBaselineInitialized": "Bütünlük temel çizgisi başlatıldı",
"last90Days": "Son 90 gün",
"linkThisAppToAnotherTo": "Bir üretim/geliştirme çifti oluşturmak için bu uygulamayı diğerine bağlayın. Bağlantılı uygulamalar veritabanı kimlik bilgilerini paylaşabilir.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Değişiklikleri inceleyin",
"rootPath": "Kök Yolu",
"routingDiagnostics": "Yönlendirme Teşhisi",
- "scan": "Tara",
"securityAlertsConfigured": "Güvenlik uyarıları yapılandırıldı",
"securityPosture": "Güvenlik duruşu",
"serviceInfo": "Servis Bilgisi",
- "startService": "Hizmeti başlat",
"startTheContainerToSeeLive": "Canlı kaynakları görmek için kapsayıcıyı başlatın.",
"successful": "Başarılı",
"tags": "Etiketler",
"thisMonth": "bu ay",
"totalDeploys": "Toplam Dağıtımlar",
"unlinkApps": "Uygulamaların Bağlantısını Kaldır",
- "virusDefinitions": "Virüs tanımları",
"workers": "İşçiler"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Çözüldü",
"statusPageUnavailable": "Durum sayfası kullanılamıyor"
},
- "quarantineTab": {
- "deleteFile": "Dosyayı sil",
- "deleteQuarantinedFile": "Karantinaya alınan dosyayı sil",
- "filename": "Dosya adı",
- "infectedFilesWillAppearHereWhen": "Etkilenen dosyalar tespit edildiğinde burada görünecek",
- "noFilesInQuarantine": "Karantinada dosya yok",
- "originalLocation": "Orijinal Konum",
- "originalLocationUnknown": "Orijinal konumu bilinmiyor",
- "permanentlyDeleteThisCannotBeUndone": "{{filename}} kalıcı olarak silinsin mi? Bu geri alınamaz.",
- "quarantined": "Karantinaya alındı",
- "restoreFile": "Dosyayı geri yükle",
- "restoreQuarantinedFile": "Karantinaya alınan dosyayı geri yükle",
- "restoreToOnlyDoThisFor": "{{name}}, {{target}}'ye geri yüklensin mi? Bunu yalnızca yanlış pozitifler için yapın.",
- "restoreToOriginalLocation": "Orijinal konuma geri yükle"
- },
"queueDetail": {
"allStatuses": "Tüm durumlar",
"attempts": "denemeler",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Yalnızca SSO modu",
"viewer": "Görüntüleyici"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "seçilmiş web kabuğu göstergeleri her taramada çalışır (motor:",
- "customPath": "Özel Yol",
- "date": "Tarih",
- "deleteCustomRuleFile": "Özel kural dosyası {{name}} silinsin mi?",
- "deleteRule": "Kuralı sil",
- "deleteScannerRule": "Tarayıcı kuralını sil",
- "directory": "Rehber",
- "file": "Dosya",
- "filesScanned": "Taranan dosyalar:",
- "fullScan": "Tam Tarama",
- "inactiveYaraNotInstalled": "etkin değil — yara yüklü değil",
- "job": "İş:",
- "match": "Kibrit",
- "noCustomRuleFilesUploadA": "Özel kural dosyası yok. Kural kümesini genişletmek için bir .yar dosyası (maks. 64 KB) yükleyin.",
- "noScansHaveBeenRunYet": "Henüz hiçbir tarama yapılmadı.",
- "quickScan": "Hızlı Tarama",
- "rule": "Kural",
- "scan": "Tara",
- "scanASpecificDirectory": "Belirli bir dizini tarayın",
- "scanAnApp": "Bir Uygulamayı Tara",
- "scanCommonWebDirectories": "Ortak web dizinlerini tarayın",
- "scanEntireSystemSlow": "Tüm sistemi tarayın (yavaş)",
- "scanInProgress": "Tarama Devam Ediyor",
- "scanning": "Tarama:",
- "selectAnApp": "Bir uygulama seçin…",
- "startAScanAboveToCheck": "Tehditleri kontrol etmek için yukarıdan bir tarama başlatın.",
- "startScan": "Taramayı Başlat",
- "started": "Başlatıldı:",
- "threats": "Tehditler",
- "uploadYar": ".yar dosyasını yükle",
- "webShellDetectionRules": "Web Kabuğu Algılama Kuralları",
- "webShellMalwareScanOfA": "Bir docroot'un web kabuğu + kötü amaçlı yazılım taraması",
- "webShellRules": "Web Kabuğu Kuralları"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Her N günde bir tam yedekleme alınır; geri kalanı artımlıdır.",
"backupsRunQuietlyInTheBackground": "Yedeklemeler arka planda sessizce çalışır.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Denetim",
- "autoUpdates": "Otomatik Güncellemeler",
"events": "Olaylar",
- "fail2ban": "Başarısız2ban",
"fileIntegrity": "Dosya Bütünlüğü",
"firewall": "Güvenlik duvarı",
"ipLists": "IP Listeleri",
- "malwareScanner": "Kötü Amaçlı Yazılım Tarayıcı",
- "quarantine": "Karantina",
- "sshKeys": "SSH Anahtarlar",
- "vulnerabilityScan": "Güvenlik Açığı Taraması"
+ "sshKeys": "SSH Anahtarlar"
},
"serverDetail": {
"alerts": "Uyarılar",
@@ -6562,25 +6461,6 @@
"volumeName": "Cilt Adı *",
"volumeRemovedSuccessfully": "Birim başarıyla kaldırıldı"
},
- "vulnerabilityTab": {
- "failedToInstall": "Yükleme başarısız oldu: {{message}}",
- "failedToStartScan": "Tarama başlatılamadı: {{message}}",
- "hardeningIndex": "Sertleşme indeksi",
- "installLynisToPerformSecurityAudits": "Güvenlik denetimleri ve güvenlik açığı taraması gerçekleştirmek için Lynis'i yükleyin.",
- "loadingVulnerabilityScannerStatus": "Güvenlik açığı tarayıcı durumu yükleniyor...",
- "lynisInstalledSuccessfully": "Lynis başarıyla yüklendi",
- "lynisNotInstalled": "Lynis Yüklü Değil",
- "lynisVulnerabilityScanner": "Lynis Güvenlik Açığı Tarayıcısı",
- "scanInProgress": "Tarama Devam Ediyor",
- "scanResults": "Tarama Sonuçları",
- "scanStatus": "Tarama durumu",
- "scanningSystemForVulnerabilities": "Güvenlik açıkları için tarama sistemi...",
- "started": "Başlatıldı:",
- "suggestions": "Öneriler (",
- "vulnerabilityScanStarted": "Güvenlik açığı taraması başlatıldı",
- "warnings": "uyarılar ·",
- "warnings2": "Uyarılar ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Webhook Aboneliği Oluşturun",
"eGSlackNotificationsCiTrigger": "örneğin Gevşek Bildirimler, CI Tetikleyici",
diff --git a/frontend/src/i18n/locales/vi.json b/frontend/src/i18n/locales/vi.json
index 278ea924..8e0445df 100644
--- a/frontend/src/i18n/locales/vi.json
+++ b/frontend/src/i18n/locales/vi.json
@@ -320,22 +320,6 @@
"securityAudit": "Kiểm tra an ninh",
"securityScore": "điểm an ninh"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "Đã cài đặt gói cập nhật tự động",
- "automaticSecurityUpdates": "Cập nhật bảo mật tự động",
- "automaticSecurityUpdatesAreNotSupported": "Cập nhật bảo mật tự động không được hỗ trợ trên hệ thống này.",
- "automaticUpdatesDisabled": "Cập nhật tự động bị vô hiệu hóa",
- "automaticUpdatesEnabled": "Đã bật cập nhật tự động",
- "failedToDisable": "Không tắt được: {{message}}",
- "failedToEnable": "Không bật được: {{message}}",
- "failedToInstall": "Không cài đặt được: {{message}}",
- "installed": "Đã cài đặt",
- "loadingAutoUpdatesStatus": "Đang tải trạng thái cập nhật tự động...",
- "notSupported": "Không được hỗ trợ",
- "package": "Bưu kiện",
- "whatAreAutomaticSecurityUpdates": "Cập nhật bảo mật tự động là gì?",
- "whenEnabledYourServerWillAutomatically": "Khi được bật, máy chủ của bạn sẽ tự động tải xuống và cài đặt các bản cập nhật bảo mật, giúp bảo vệ khỏi các lỗ hổng đã biết mà không cần can thiệp thủ công."
- },
"backupCalendar": {
"nextMonth": "Tháng tiếp theo",
"previousMonth": "Tháng trước",
@@ -2180,30 +2164,6 @@
"writePermission": "Quyền viết",
"yourServerIpOrDomain": "IP máy chủ hoặc tên miền của bạn"
},
- "fail2banTab": {
- "activeJails": "Nhà tù đang hoạt động",
- "areYouSureYouWantTo": "Bạn có chắc chắn muốn bỏ cấm {{ip}} khỏi {{jail}} không?",
- "banIp": "Cấm IP",
- "banIpAddress": "Cấm địa chỉ IP",
- "banned": "Bị cấm",
- "fail2banInstalledSuccessfully": "Fail2ban đã cài đặt thành công",
- "fail2banNotInstalled": "Fail2ban Chưa được cài đặt",
- "fail2banStatus": "Trạng thái Fail2ban",
- "failedToBanIp": "Không cấm được IP: {{message}}",
- "failedToInstall": "Không cài đặt được: {{message}}",
- "failedToUnban": "Không thể bỏ cấm: {{message}}",
- "installFail2banToProtectAgainstBrute": "Cài đặt Fail2ban để bảo vệ khỏi các cuộc tấn công vũ phu.",
- "ipBannedIn": "IP {{banIP}} bị cấm trong {{banJail}}",
- "ipUnbanned": "IP {{ip}} đã được bỏ cấm",
- "jail": "Nhà tù",
- "loadingFail2banStatus": "Đang tải trạng thái Fail2ban...",
- "noIpsAreCurrentlyBanned": "Hiện tại không có IP nào bị cấm.",
- "none": "Không có",
- "totalBanned": "Tổng số bị cấm",
- "totalBannedIps": "Tổng số IP bị cấm",
- "unban": "Bỏ cấm",
- "unbanIp": "Bỏ cấm IP"
- },
"favoriteStar": {
"addToFavorites": "Thêm vào mục yêu thích",
"removeFromFavorites": "Xóa khỏi mục yêu thích"
@@ -3699,8 +3659,6 @@
"applicationInfo": "Thông tin ứng dụng",
"areYouSureYouWantTo": "Bạn có chắc chắn muốn hủy liên kết các ứng dụng này không? Thông tin xác thực cơ sở dữ liệu sẽ không thay đổi.",
"bandwidth": "Băng thông",
- "clamavAntivirusInstalled": "Đã cài đặt phần mềm diệt virus ClamAV",
- "clamavServiceRunning": "Dịch vụ ClamAV đang chạy",
"clickRunDiagnosticsToCheckRouting": "Nhấp vào \"Chạy chẩn đoán\" để kiểm tra cấu hình định tuyến và xác định sự cố.",
"computing": "Máy tính…",
"cpuLoad": "Tải CPU",
@@ -3711,7 +3669,6 @@
"environmentLinking": "Liên kết môi trường",
"fileIntegrityMonitoringEnabled": "Đã bật tính năng giám sát tính toàn vẹn của tệp",
"initializeBaseline": "Khởi tạo đường cơ sở",
- "installClamav": "Cài đặt ClamAV",
"integrityBaselineInitialized": "Đã khởi tạo đường cơ sở về tính toàn vẹn",
"last90Days": "90 ngày qua",
"linkThisAppToAnotherTo": "Liên kết ứng dụng này với ứng dụng khác để tạo cặp sản xuất/phát triển. Các ứng dụng được liên kết có thể chia sẻ thông tin xác thực cơ sở dữ liệu.",
@@ -3736,18 +3693,15 @@
"reviewChanges": "Xem lại các thay đổi",
"rootPath": "Đường dẫn gốc",
"routingDiagnostics": "Chẩn đoán định tuyến",
- "scan": "Quét",
"securityAlertsConfigured": "Cảnh báo bảo mật được định cấu hình",
"securityPosture": "Tư thế an ninh",
"serviceInfo": "Thông tin dịch vụ",
- "startService": "Bắt đầu dịch vụ",
"startTheContainerToSeeLive": "Khởi động vùng chứa để xem tài nguyên trực tiếp.",
"successful": "Thành công",
"tags": "Thẻ",
"thisMonth": "tháng này",
"totalDeploys": "Tổng số lần triển khai",
"unlinkApps": "Hủy liên kết ứng dụng",
- "virusDefinitions": "Định nghĩa vi-rút",
"workers": "Công nhân"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "Đã giải quyết",
"statusPageUnavailable": "Trang trạng thái không có sẵn"
},
- "quarantineTab": {
- "deleteFile": "Xóa tập tin",
- "deleteQuarantinedFile": "Xóa tập tin bị cách ly",
- "filename": "Tên tệp",
- "infectedFilesWillAppearHereWhen": "Các tập tin bị nhiễm sẽ xuất hiện ở đây khi được phát hiện",
- "noFilesInQuarantine": "Không có tập tin nào trong vùng cách ly",
- "originalLocation": "Vị trí ban đầu",
- "originalLocationUnknown": "Vị trí ban đầu không xác định",
- "permanentlyDeleteThisCannotBeUndone": "Xóa vĩnh viễn {{filename}}? Điều này không thể hoàn tác được.",
- "quarantined": "Cách ly",
- "restoreFile": "Khôi phục tập tin",
- "restoreQuarantinedFile": "Khôi phục tập tin bị cách ly",
- "restoreToOnlyDoThisFor": "Khôi phục {{name}} thành {{target}}? Chỉ làm điều này cho các kết quả dương tính giả.",
- "restoreToOriginalLocation": "Khôi phục về vị trí ban đầu"
- },
"queueDetail": {
"allStatuses": "Tất cả trạng thái",
"attempts": "Nỗ lực",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "Chế độ chỉ SSO",
"viewer": "Người xem"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "các chỉ báo web-shell được quản lý chạy trên mỗi lần quét (công cụ:",
- "customPath": "Đường dẫn tùy chỉnh",
- "date": "Ngày",
- "deleteCustomRuleFile": "Xóa tệp quy tắc tùy chỉnh {{name}}?",
- "deleteRule": "Xóa quy tắc",
- "deleteScannerRule": "Xóa quy tắc máy quét",
- "directory": "Thư mục",
- "file": "Tài liệu",
- "filesScanned": "Các tập tin được quét:",
- "fullScan": "Quét toàn bộ",
- "inactiveYaraNotInstalled": "không hoạt động — yara chưa được cài đặt",
- "job": "Công việc:",
- "match": "Cuộc thi đấu",
- "noCustomRuleFilesUploadA": "Không có tập tin quy tắc tùy chỉnh. Tải tệp .yar lên (tối đa 64 KB) để mở rộng bộ quy tắc.",
- "noScansHaveBeenRunYet": "Chưa có bản quét nào được chạy.",
- "quickScan": "Quét nhanh",
- "rule": "Luật lệ",
- "scan": "Quét",
- "scanASpecificDirectory": "Quét một thư mục cụ thể",
- "scanAnApp": "Quét ứng dụng",
- "scanCommonWebDirectories": "Quét các thư mục web phổ biến",
- "scanEntireSystemSlow": "Quét toàn bộ hệ thống (chậm)",
- "scanInProgress": "Đang quét",
- "scanning": "Quét:",
- "selectAnApp": "Chọn một ứng dụng…",
- "startAScanAboveToCheck": "Bắt đầu quét ở trên để kiểm tra các mối đe dọa.",
- "startScan": "Bắt đầu quét",
- "started": "Bắt đầu:",
- "threats": "Mối đe dọa",
- "uploadYar": "Tải lên .yar",
- "webShellDetectionRules": "Quy tắc phát hiện Web-shell",
- "webShellMalwareScanOfA": "Web-shell + quét phần mềm độc hại của docroot",
- "webShellRules": "Quy tắc Web-shell"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "Một bản sao lưu đầy đủ được thực hiện N ngày một lần; phần còn lại là tăng dần.",
"backupsRunQuietlyInTheBackground": "Các bản sao lưu chạy lặng lẽ ở chế độ nền.",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "Kiểm toán",
- "autoUpdates": "Tự động cập nhật",
"events": "Sự kiện",
- "fail2ban": "Fail2ban",
"fileIntegrity": "Tính toàn vẹn của tệp",
"firewall": "Tường lửa",
"ipLists": "Danh sách IP",
- "malwareScanner": "Máy quét phần mềm độc hại",
- "quarantine": "Cách ly",
- "sshKeys": "Phím SSH",
- "vulnerabilityScan": "Quét lỗ hổng"
+ "sshKeys": "Phím SSH"
},
"serverDetail": {
"alerts": "Cảnh báo",
@@ -6562,25 +6461,6 @@
"volumeName": "Tên tập *",
"volumeRemovedSuccessfully": "Đã xóa tập thành công"
},
- "vulnerabilityTab": {
- "failedToInstall": "Không cài đặt được: {{message}}",
- "failedToStartScan": "Không bắt đầu quét được: {{message}}",
- "hardeningIndex": "Chỉ số cứng",
- "installLynisToPerformSecurityAudits": "Cài đặt Lynis để thực hiện kiểm tra bảo mật và quét lỗ hổng.",
- "loadingVulnerabilityScannerStatus": "Đang tải trạng thái quét lỗ hổng...",
- "lynisInstalledSuccessfully": "Lynis đã cài đặt thành công",
- "lynisNotInstalled": "Lynis chưa được cài đặt",
- "lynisVulnerabilityScanner": "Máy quét lỗ hổng Lynis",
- "scanInProgress": "Đang quét",
- "scanResults": "Kết quả quét",
- "scanStatus": "Trạng thái quét",
- "scanningSystemForVulnerabilities": "Hệ thống quét tìm lỗ hổng...",
- "started": "Bắt đầu:",
- "suggestions": "Gợi ý (",
- "vulnerabilityScanStarted": "Đã bắt đầu quét lỗ hổng",
- "warnings": "cảnh báo ·",
- "warnings2": "Cảnh báo ("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "Tạo đăng ký Webhook",
"eGSlackNotificationsCiTrigger": "ví dụ. Thông báo Slack, Trình kích hoạt CI",
diff --git a/frontend/src/i18n/locales/zh-Hans.json b/frontend/src/i18n/locales/zh-Hans.json
index eebd5b37..36144867 100644
--- a/frontend/src/i18n/locales/zh-Hans.json
+++ b/frontend/src/i18n/locales/zh-Hans.json
@@ -320,22 +320,6 @@
"securityAudit": "安全审计",
"securityScore": "安全分数"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "已安装自动更新包",
- "automaticSecurityUpdates": "自动安全更新",
- "automaticSecurityUpdatesAreNotSupported": "此系统不支持自动安全更新。",
- "automaticUpdatesDisabled": "自动更新已禁用",
- "automaticUpdatesEnabled": "启用自动更新",
- "failedToDisable": "禁用失败:{{message}}",
- "failedToEnable": "启用失败:{{message}}",
- "failedToInstall": "安装失败:{{message}}",
- "installed": "已安装",
- "loadingAutoUpdatesStatus": "正在加载自动更新状态...",
- "notSupported": "不支持",
- "package": "包裹",
- "whatAreAutomaticSecurityUpdates": "什么是自动安全更新?",
- "whenEnabledYourServerWillAutomatically": "启用后,您的服务器将自动下载并安装安全更新,帮助防范已知漏洞,无需手动干预。"
- },
"backupCalendar": {
"nextMonth": "下个月",
"previousMonth": "上个月",
@@ -2180,30 +2164,6 @@
"writePermission": "写权限",
"yourServerIpOrDomain": "您的服务器IP或域名"
},
- "fail2banTab": {
- "activeJails": "活跃的监狱",
- "areYouSureYouWantTo": "您确定要从 {{ip}} 中取消对 {{jail}} 的禁止吗?",
- "banIp": "禁止IP",
- "banIpAddress": "禁止IP地址",
- "banned": "禁止",
- "fail2banInstalledSuccessfully": "Fail2ban安装成功",
- "fail2banNotInstalled": "Fail2ban 未安装",
- "fail2banStatus": "Fail2ban 状态",
- "failedToBanIp": "禁止 IP 失败:{{message}}",
- "failedToInstall": "安装失败:{{message}}",
- "failedToUnban": "解禁失败:{{message}}",
- "installFail2banToProtectAgainstBrute": "安装 Fail2ban 以防止暴力攻击。",
- "ipBannedIn": "IP {{banIP}} 在 {{banJail}} 中被禁止",
- "ipUnbanned": "IP {{ip}} 解封",
- "jail": "监狱",
- "loadingFail2banStatus": "正在加载 Fail2ban 状态...",
- "noIpsAreCurrentlyBanned": "目前没有 IP 被禁止。",
- "none": "无",
- "totalBanned": "总计封禁",
- "totalBannedIps": "被禁IP总数",
- "unban": "解禁",
- "unbanIp": "解封IP"
- },
"favoriteStar": {
"addToFavorites": "添加到收藏夹",
"removeFromFavorites": "从收藏夹中删除"
@@ -3699,8 +3659,6 @@
"applicationInfo": "应用信息",
"areYouSureYouWantTo": "您确定要取消这些应用程序的链接吗?数据库凭据将保持不变。",
"bandwidth": "带宽",
- "clamavAntivirusInstalled": "安装了 ClamAV 防病毒软件",
- "clamavServiceRunning": "ClamAV 服务正在运行",
"clickRunDiagnosticsToCheckRouting": "单击“运行诊断”以检查路由配置并识别问题。",
"computing": "计算...",
"cpuLoad": "CPU负载",
@@ -3711,7 +3669,6 @@
"environmentLinking": "环境链接",
"fileIntegrityMonitoringEnabled": "启用文件完整性监控",
"initializeBaseline": "初始化基线",
- "installClamav": "安装 ClamAV",
"integrityBaselineInitialized": "完整性基线已初始化",
"last90Days": "过去 90 天",
"linkThisAppToAnotherTo": "将此应用程序链接到另一个应用程序以创建生产/开发对。链接的应用程序可以共享数据库凭据。",
@@ -3736,18 +3693,15 @@
"reviewChanges": "审查变更",
"rootPath": "根路径",
"routingDiagnostics": "路由诊断",
- "scan": "扫描",
"securityAlertsConfigured": "已配置安全警报",
"securityPosture": "安全态势",
"serviceInfo": "服务信息",
- "startService": "启动服务",
"startTheContainerToSeeLive": "启动容器以查看实时资源。",
"successful": "成功的",
"tags": "标签",
"thisMonth": "本月",
"totalDeploys": "部署总数",
"unlinkApps": "取消链接应用程序",
- "virusDefinitions": "病毒定义",
"workers": "工作进程"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "已解决",
"statusPageUnavailable": "状态页面不可用"
},
- "quarantineTab": {
- "deleteFile": "删除文件",
- "deleteQuarantinedFile": "删除隔离文件",
- "filename": "文件名",
- "infectedFilesWillAppearHereWhen": "检测到受感染的文件将出现在此处",
- "noFilesInQuarantine": "隔离区中没有文件",
- "originalLocation": "原地点",
- "originalLocationUnknown": "原址不明",
- "permanentlyDeleteThisCannotBeUndone": "永久删除{{filename}}?此操作无法撤消。",
- "quarantined": "已隔离",
- "restoreFile": "恢复文件",
- "restoreQuarantinedFile": "恢复隔离的文件",
- "restoreToOnlyDoThisFor": "将 {{name}} 恢复到 {{target}}?仅针对误报执行此操作。",
- "restoreToOriginalLocation": "恢复到原来的位置"
- },
"queueDetail": {
"allStatuses": "所有状态",
"attempts": "尝试",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "仅 SSO 模式",
"viewer": "观众"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "每次扫描都会运行精心策划的 Web-shell 指标(引擎:",
- "customPath": "自定义路径",
- "date": "日期",
- "deleteCustomRuleFile": "删除自定义规则文件{{name}}?",
- "deleteRule": "删除规则",
- "deleteScannerRule": "删除扫描仪规则",
- "directory": "目录",
- "file": "文件",
- "filesScanned": "扫描的文件:",
- "fullScan": "全盘扫描",
- "inactiveYaraNotInstalled": "非活动 — yara 未安装",
- "job": "工作:",
- "match": "匹配",
- "noCustomRuleFilesUploadA": "没有自定义规则文件。上传 .yar 文件(最大 64 KB)以扩展规则集。",
- "noScansHaveBeenRunYet": "尚未运行任何扫描。",
- "quickScan": "快速扫描",
- "rule": "规则",
- "scan": "扫描",
- "scanASpecificDirectory": "扫描特定目录",
- "scanAnApp": "扫描应用程序",
- "scanCommonWebDirectories": "扫描常见的 Web 目录",
- "scanEntireSystemSlow": "扫描整个系统(慢)",
- "scanInProgress": "扫描正在进行中",
- "scanning": "扫描:",
- "selectAnApp": "选择一个应用程序...",
- "startAScanAboveToCheck": "开始上面的扫描以检查是否存在威胁。",
- "startScan": "开始扫描",
- "started": "开始:",
- "threats": "威胁",
- "uploadYar": "上传.yar",
- "webShellDetectionRules": "Web-shell检测规则",
- "webShellMalwareScanOfA": "Web-shell + 文档根目录的恶意软件扫描",
- "webShellRules": "Web-shell 规则"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "每N天进行一次完整备份;其余的都是增量的。",
"backupsRunQuietlyInTheBackground": "备份在后台安静地运行。",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "审计",
- "autoUpdates": "自动更新",
"events": "事件",
- "fail2ban": "失败2禁止",
"fileIntegrity": "文件完整性",
"firewall": "防火墙",
"ipLists": "IP列表",
- "malwareScanner": "恶意软件扫描仪",
- "quarantine": "隔离",
- "sshKeys": "SSH 密钥",
- "vulnerabilityScan": "漏洞扫描"
+ "sshKeys": "SSH 密钥"
},
"serverDetail": {
"alerts": "警报",
@@ -6562,25 +6461,6 @@
"volumeName": "卷名称 *",
"volumeRemovedSuccessfully": "卷删除成功"
},
- "vulnerabilityTab": {
- "failedToInstall": "安装失败:{{message}}",
- "failedToStartScan": "无法开始扫描:{{message}}",
- "hardeningIndex": "硬化指数",
- "installLynisToPerformSecurityAudits": "安装Lynis以执行安全审核和漏洞扫描。",
- "loadingVulnerabilityScannerStatus": "正在加载漏洞扫描器状态...",
- "lynisInstalledSuccessfully": "莱尼斯安装成功",
- "lynisNotInstalled": "莱尼斯未安装",
- "lynisVulnerabilityScanner": "Lynis 漏洞扫描器",
- "scanInProgress": "扫描正在进行中",
- "scanResults": "扫描结果",
- "scanStatus": "扫描状态",
- "scanningSystemForVulnerabilities": "扫描系统漏洞...",
- "started": "开始:",
- "suggestions": "建议(",
- "vulnerabilityScanStarted": "漏洞扫描开始",
- "warnings": "警告·",
- "warnings2": "警告("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "创建 Webhook 订阅",
"eGSlackNotificationsCiTrigger": "例如Slack 通知、CI 触发器",
diff --git a/frontend/src/i18n/locales/zh-Hant.json b/frontend/src/i18n/locales/zh-Hant.json
index d68d952d..98a00923 100644
--- a/frontend/src/i18n/locales/zh-Hant.json
+++ b/frontend/src/i18n/locales/zh-Hant.json
@@ -320,22 +320,6 @@
"securityAudit": "安全審計",
"securityScore": "安全分數"
},
- "autoUpdatesTab": {
- "autoUpdatesPackageInstalled": "已安裝自動更新包",
- "automaticSecurityUpdates": "自動安全性更新",
- "automaticSecurityUpdatesAreNotSupported": "此系統不支援自動安全性更新。",
- "automaticUpdatesDisabled": "自動更新已停用",
- "automaticUpdatesEnabled": "啟用自動更新",
- "failedToDisable": "停用失敗:{{message}}",
- "failedToEnable": "啟用失敗:{{message}}",
- "failedToInstall": "安裝失敗:{{message}}",
- "installed": "已安裝",
- "loadingAutoUpdatesStatus": "正在載入自動更新狀態...",
- "notSupported": "不支援",
- "package": "包裹",
- "whatAreAutomaticSecurityUpdates": "什麼是自動安全性更新?",
- "whenEnabledYourServerWillAutomatically": "啟用後,您的伺服器將自動下載並安裝安全性更新,幫助防範已知漏洞,無需手動幹預。"
- },
"backupCalendar": {
"nextMonth": "下個月",
"previousMonth": "上個月",
@@ -2180,30 +2164,6 @@
"writePermission": "寫入權限",
"yourServerIpOrDomain": "您的伺服器IP或域名"
},
- "fail2banTab": {
- "activeJails": "活躍的監獄",
- "areYouSureYouWantTo": "您確定要從 {{jail}} 取消禁止 {{ip}} 嗎?",
- "banIp": "禁止IP",
- "banIpAddress": "禁止IP位址",
- "banned": "禁止",
- "fail2banInstalledSuccessfully": "Fail2ban安裝成功",
- "fail2banNotInstalled": "Fail2ban 未安裝",
- "fail2banStatus": "Fail2ban 狀態",
- "failedToBanIp": "封鎖IP失敗:{{message}}",
- "failedToInstall": "安裝失敗:{{message}}",
- "failedToUnban": "解禁失敗:{{message}}",
- "installFail2banToProtectAgainstBrute": "安裝 Fail2ban 以防止暴力攻擊。",
- "ipBannedIn": "IP {{banIP}} 在 {{banJail}} 中被禁止",
- "ipUnbanned": "IP {{ip}} 解禁",
- "jail": "監獄",
- "loadingFail2banStatus": "正在載入 Fail2ban 狀態...",
- "noIpsAreCurrentlyBanned": "目前沒有 IP 被禁止。",
- "none": "沒有任何",
- "totalBanned": "總計封鎖",
- "totalBannedIps": "被禁IP總數",
- "unban": "解禁",
- "unbanIp": "解封IP"
- },
"favoriteStar": {
"addToFavorites": "加入收藏夾",
"removeFromFavorites": "從收藏夾中刪除"
@@ -3699,8 +3659,6 @@
"applicationInfo": "應用程式資訊",
"areYouSureYouWantTo": "您確定要取消這些應用程式的連結嗎?資料庫憑證將保持不變。",
"bandwidth": "頻寬",
- "clamavAntivirusInstalled": "安裝了 ClamAV 防毒軟體",
- "clamavServiceRunning": "ClamAV 服務正在運行",
"clickRunDiagnosticsToCheckRouting": "按一下“運行診斷”以檢查路由配置並識別問題。",
"computing": "計算...",
"cpuLoad": "CPU負載",
@@ -3711,7 +3669,6 @@
"environmentLinking": "環境連結",
"fileIntegrityMonitoringEnabled": "啟用檔案完整性監控",
"initializeBaseline": "初始化基線",
- "installClamav": "安裝 ClamAV",
"integrityBaselineInitialized": "完整性基線已初始化",
"last90Days": "過去 90 天",
"linkThisAppToAnotherTo": "將此應用程式連結到另一個應用程式以建立生產/開發對。連結的應用程式可以共享資料庫憑證。",
@@ -3736,18 +3693,15 @@
"reviewChanges": "審查變更",
"rootPath": "根路徑",
"routingDiagnostics": "路由診斷",
- "scan": "掃描",
"securityAlertsConfigured": "已配置安全警報",
"securityPosture": "安全態勢",
"serviceInfo": "服務資訊",
- "startService": "啟動服務",
"startTheContainerToSeeLive": "啟動容器以查看即時資源。",
"successful": "成功的",
"tags": "標籤",
"thisMonth": "本月",
"totalDeploys": "部署總數",
"unlinkApps": "取消連結應用程式",
- "virusDefinitions": "病毒定義",
"workers": "勞工"
},
"packagesTab": {
@@ -4071,21 +4025,6 @@
"resolved": "已解決",
"statusPageUnavailable": "狀態頁面不可用"
},
- "quarantineTab": {
- "deleteFile": "刪除文件",
- "deleteQuarantinedFile": "刪除隔離文件",
- "filename": "檔案名稱",
- "infectedFilesWillAppearHereWhen": "檢測到受感染的文件將出現在此處",
- "noFilesInQuarantine": "隔離區中沒有文件",
- "originalLocation": "原地點",
- "originalLocationUnknown": "原址不明",
- "permanentlyDeleteThisCannotBeUndone": "永久刪除{{filename}}?此操作無法撤銷。",
- "quarantined": "已隔離",
- "restoreFile": "恢復文件",
- "restoreQuarantinedFile": "恢復隔離的文件",
- "restoreToOnlyDoThisFor": "將{{name}}恢復為{{target}}?僅針對誤報執行此操作。",
- "restoreToOriginalLocation": "恢復到原來的位置"
- },
"queueDetail": {
"allStatuses": "所有狀態",
"attempts": "嘗試",
@@ -4499,41 +4438,6 @@
"ssoOnlyMode": "SSO-僅模式",
"viewer": "觀眾"
},
- "scannerTab": {
- "curatedWebShellIndicatorsRunOn": "每次掃描都會執行精心策劃的 Web-shell 指標(引擎:",
- "customPath": "自訂路徑",
- "date": "日期",
- "deleteCustomRuleFile": "刪除自訂規則檔{{name}}?",
- "deleteRule": "刪除規則",
- "deleteScannerRule": "刪除掃描器規則",
- "directory": "目錄",
- "file": "文件",
- "filesScanned": "掃描的文件:",
- "fullScan": "全碟掃描",
- "inactiveYaraNotInstalled": "非活動 — yara 未安裝",
- "job": "工作:",
- "match": "匹配",
- "noCustomRuleFilesUploadA": "沒有自訂規則檔。上傳 .yar 檔案(最大 64 KB)以擴充規則集。",
- "noScansHaveBeenRunYet": "尚未執行任何掃描。",
- "quickScan": "快速掃描",
- "rule": "規則",
- "scan": "掃描",
- "scanASpecificDirectory": "掃描特定目錄",
- "scanAnApp": "掃描應用程式",
- "scanCommonWebDirectories": "掃描常見的 Web 目錄",
- "scanEntireSystemSlow": "掃描整個系統(慢)",
- "scanInProgress": "掃描正在進行中",
- "scanning": "掃描:",
- "selectAnApp": "選擇一個應用程式...",
- "startAScanAboveToCheck": "開始上面的掃描以檢查是否有威脅。",
- "startScan": "開始掃描",
- "started": "開始:",
- "threats": "威脅",
- "uploadYar": "上傳.yar",
- "webShellDetectionRules": "Web-shell偵測規則",
- "webShellMalwareScanOfA": "Web-shell + 文件根目錄的惡意軟體掃描",
- "webShellRules": "Web-shell 規則"
- },
"scheduleCard": {
"aFullBackupIsTakenEvery": "每N天進行一次完整備份;其餘的都是增量的。",
"backupsRunQuietlyInTheBackground": "備份在後台安靜地運行。",
@@ -4664,16 +4568,11 @@
},
"securityTabs": {
"audit": "審計",
- "autoUpdates": "自動更新",
"events": "活動",
- "fail2ban": "失敗2禁止",
"fileIntegrity": "文件完整性",
"firewall": "防火牆",
"ipLists": "IP列表",
- "malwareScanner": "惡意軟體掃描儀",
- "quarantine": "檢疫",
- "sshKeys": "SSH 按鍵",
- "vulnerabilityScan": "漏洞掃描"
+ "sshKeys": "SSH 按鍵"
},
"serverDetail": {
"alerts": "警報",
@@ -6562,25 +6461,6 @@
"volumeName": "卷名稱 *",
"volumeRemovedSuccessfully": "卷刪除成功"
},
- "vulnerabilityTab": {
- "failedToInstall": "安裝失敗:{{message}}",
- "failedToStartScan": "啟動掃描失敗:{{message}}",
- "hardeningIndex": "硬化指數",
- "installLynisToPerformSecurityAudits": "安裝Lynis以執行安全審核和漏洞掃描。",
- "loadingVulnerabilityScannerStatus": "正在載入漏洞掃描器狀態...",
- "lynisInstalledSuccessfully": "萊尼斯安裝成功",
- "lynisNotInstalled": "萊尼斯未安裝",
- "lynisVulnerabilityScanner": "Lynis 漏洞掃描器",
- "scanInProgress": "掃描正在進行中",
- "scanResults": "掃描結果",
- "scanStatus": "掃描狀態",
- "scanningSystemForVulnerabilities": "掃描系統漏洞...",
- "started": "開始:",
- "suggestions": "建議(",
- "vulnerabilityScanStarted": "漏洞掃描開始",
- "warnings": "警告·",
- "warnings2": "警告("
- },
"webhookSubscriptionModal": {
"createWebhookSubscription": "建立 Webhook 訂閱",
"eGSlackNotificationsCiTrigger": "例如Slack 通知、CI 觸發器",
diff --git a/frontend/src/pages/Security.jsx b/frontend/src/pages/Security.jsx
index dd80feb2..2c77ff39 100644
--- a/frontend/src/pages/Security.jsx
+++ b/frontend/src/pages/Security.jsx
@@ -5,35 +5,31 @@ import api from '../services/api';
import {
OverviewTab,
FirewallTab,
- Fail2banTab,
SSHKeysTab,
IPListsTab,
- ScannerTab,
- QuarantineTab,
IntegrityTab,
AuditTab,
- VulnerabilityTab,
- AutoUpdatesTab,
EventsTab,
SecurityConfigTab,
} from '../components/security';
import EmptyState from '../components/EmptyState';
import { useTranslation } from 'react-i18next';
-const VALID_TABS = ['overview', 'firewall', 'fail2ban', 'ssh-keys', 'ip-lists', 'scanner', 'quarantine', 'integrity', 'audit', 'vulnerability', 'updates', 'events', 'settings'];
+// Core tabs only. The install-gated tools (fail2ban, malware scanner,
+// quarantine, vulnerability scan, auto-updates) are security extensions now:
+// they contribute their own tabs + group routes, which mount beside these and
+// win over the /security/:tab fallback when installed.
+const VALID_TABS = ['overview', 'firewall', 'ssh-keys', 'ip-lists', 'integrity', 'audit', 'events', 'settings'];
const Security = () => {
const { t } = useTranslation();
const { isAdmin } = useAuth();
const [activeTab, setActiveTab] = useTabParam('/security', VALID_TABS);
const [status, setStatus] = useState(null);
- const [clamav, setClamav] = useState(null);
- const [clamavLoading, setClamavLoading] = useState(true);
const [loading, setLoading] = useState(true);
useEffect(() => {
loadStatus();
- loadClamav();
}, []);
async function loadStatus() {
@@ -47,21 +43,10 @@ const Security = () => {
}
}
- async function loadClamav() {
- try {
- const data = await api.getClamAVStatus();
- setClamav(data);
- } catch (err) {
- console.error('Failed to load ClamAV status:', err);
- } finally {
- setClamavLoading(false);
- }
- }
-
- // Re-pull both status feeds — passed to the Overview so a one-click fix
- // (install ClamAV, enable integrity, …) reflects in the posture immediately.
+ // Re-pull the status feed — passed to the Overview so a one-click fix
+ // (enable integrity, …) reflects in the posture immediately.
async function reload() {
- await Promise.all([loadStatus(), loadClamav()]);
+ await loadStatus();
}
if (loading) {
@@ -75,17 +60,12 @@ const Security = () => {
return (
<div className="sk-tabgroup__inner security-page">
<div className="tab-content">
- {activeTab === 'overview' && <OverviewTab status={status} clamavStatus={clamav} clamavLoading={clamavLoading} onRefresh={reload} onNavigateTab={setActiveTab} />}
+ {activeTab === 'overview' && <OverviewTab status={status} onRefresh={reload} onNavigateTab={setActiveTab} />}
{activeTab === 'firewall' && <FirewallTab />}
- {activeTab === 'fail2ban' && <Fail2banTab />}
{activeTab === 'ssh-keys' && <SSHKeysTab />}
{activeTab === 'ip-lists' && <IPListsTab />}
- {activeTab === 'scanner' && <ScannerTab />}
- {activeTab === 'quarantine' && <QuarantineTab />}
{activeTab === 'integrity' && <IntegrityTab />}
{activeTab === 'audit' && <AuditTab />}
- {activeTab === 'vulnerability' && <VulnerabilityTab />}
- {activeTab === 'updates' && <AutoUpdatesTab />}
{activeTab === 'events' && <EventsTab />}
{activeTab === 'settings' && <SecurityConfigTab />}
</div>
diff --git a/frontend/src/pages/Setup.jsx b/frontend/src/pages/Setup.jsx
index b5edc8cc..8a041120 100644
--- a/frontend/src/pages/Setup.jsx
+++ b/frontend/src/pages/Setup.jsx
@@ -57,8 +57,8 @@ const Setup = () => {
setCurrentStep(5);
}
- async function handleFinish(installedExtensions = [], sidebarPreset = null) {
- await completeOnboarding(useCases, installedExtensions, sidebarPreset);
+ async function handleFinish(installedExtensions = [], sidebarPreset = null, securityPosture = 'minimal') {
+ await completeOnboarding(useCases, installedExtensions, sidebarPreset, securityPosture);
navigate('/');
}
diff --git a/frontend/src/services/api/auth.js b/frontend/src/services/api/auth.js
index dfda95fe..c3796aa1 100644
--- a/frontend/src/services/api/auth.js
+++ b/frontend/src/services/api/auth.js
@@ -25,10 +25,14 @@ export async function register(email, username, password, inviteToken) {
return data;
}
-export async function completeOnboarding(useCases, installedExtensions = []) {
+export async function completeOnboarding(useCases, installedExtensions = [], securityPosture = 'minimal') {
return this.request('/auth/complete-onboarding', {
method: 'POST',
- body: { use_cases: useCases, installed_extensions: installedExtensions },
+ body: {
+ use_cases: useCases,
+ installed_extensions: installedExtensions,
+ security_posture: securityPosture,
+ },
});
}
diff --git a/frontend/src/services/api/security.js b/frontend/src/services/api/security.js
index e0d8f0b0..72090518 100644
--- a/frontend/src/services/api/security.js
+++ b/frontend/src/services/api/security.js
@@ -1,5 +1,7 @@
-// Firewall, fail2ban, SSL certificates, ClamAV, file integrity,
-// SSH keys, IP lists, security audit, Lynis, auto-updates
+// Firewall, SSL certificates, file integrity, SSH keys, IP lists and the
+// security audit — the core security surfaces. The install-gated tool
+// clients (ClamAV/YARA/quarantine, fail2ban, Lynis, auto-updates) moved into
+// their security extensions with their tabs (plan 47 Ph3b-4).
// Firewall endpoints
export async function getFirewallStatus() {
@@ -179,109 +181,6 @@ export async function updateSecurityConfig(config) {
});
}
-export async function getClamAVStatus() {
- return this.request('/security/clamav/status');
-}
-
-export async function installClamAV() {
- return this.request('/security/clamav/install', { method: 'POST' });
-}
-
-export async function updateVirusDefinitions() {
- return this.request('/security/clamav/update', { method: 'POST' });
-}
-
-export async function startClamAV() {
- return this.request('/security/clamav/start', { method: 'POST' });
-}
-
-export async function scanFile(path) {
- return this.request('/security/scan/file', {
- method: 'POST',
- body: { path }
- });
-}
-
-export async function scanDirectory(path, recursive = true) {
- return this.request('/security/scan/directory', {
- method: 'POST',
- body: { path, recursive }
- });
-}
-
-export async function getScanStatus() {
- return this.request('/security/scan/status');
-}
-
-export async function cancelScan() {
- return this.request('/security/scan/cancel', { method: 'POST' });
-}
-
-export async function getScanHistory(limit = 50) {
- return this.request(`/security/scan/history?limit=${limit}`);
-}
-
-export async function runQuickScan() {
- return this.request('/security/scan/quick', { method: 'POST' });
-}
-
-export async function runFullScan() {
- return this.request('/security/scan/full', { method: 'POST' });
-}
-
-export async function scanApp(appId) {
- // Job-backed malware scan (YARA + ClamAV) of an app's docroot → { job_id }
- return this.request(`/security/scan/app/${appId}`, { method: 'POST' });
-}
-
-export async function scanPathJob(path) {
- return this.request('/security/scan/job', {
- method: 'POST',
- body: { path }
- });
-}
-
-// YARA web-shell rules
-export async function getYaraRules() {
- return this.request('/security/yara/rules');
-}
-
-export async function uploadYaraRule(filename, content) {
- return this.request('/security/yara/rules', {
- method: 'POST',
- body: { filename, content }
- });
-}
-
-export async function deleteYaraRule(filename) {
- return this.request(`/security/yara/rules/${encodeURIComponent(filename)}`, {
- method: 'DELETE'
- });
-}
-
-export async function getQuarantinedFiles() {
- return this.request('/security/quarantine');
-}
-
-export async function quarantineFile(path) {
- return this.request('/security/quarantine', {
- method: 'POST',
- body: { path }
- });
-}
-
-export async function deleteQuarantinedFile(filename) {
- return this.request(`/security/quarantine/${encodeURIComponent(filename)}`, {
- method: 'DELETE'
- });
-}
-
-export async function restoreQuarantinedFile(filename) {
- return this.request(`/security/quarantine/${encodeURIComponent(filename)}/restore`, {
- method: 'POST'
- });
-}
-
export async function initializeIntegrityDatabase(paths = null) {
return this.request('/security/integrity/initialize', {
method: 'POST',
@@ -300,38 +199,6 @@ export async function getFailedLogins(hours = 24) {
export async function getSecurityEvents(limit = 100) {
return this.request(`/security/events?limit=${limit}`);
}
-
-// Fail2ban endpoints
-export async function getFail2banStatus() {
- return this.request('/security/fail2ban/status');
-}
-
-export async function installFail2ban() {
- return this.request('/security/fail2ban/install', { method: 'POST' });
-}
-
-export async function getFail2banJailStatus(jail) {
- return this.request(`/security/fail2ban/jails/${jail}`);
-}
-
-export async function getAllFail2banBans() {
- return this.request('/security/fail2ban/bans');
-}
-
-export async function fail2banUnban(ip, jail = null) {
- return this.request('/security/fail2ban/unban', {
- method: 'POST',
- body: { ip, jail }
- });
-}
-
-export async function fail2banBan(ip, jail = 'sshd') {
- return this.request('/security/fail2ban/ban', {
- method: 'POST',
- body: { ip, jail }
- });
-}
-
// SSH Key endpoints
export async function getSSHKeys(user = 'root') {
return this.request(`/security/ssh-keys?user=${user}`);
@@ -372,37 +239,3 @@ export async function removeFromIPList(ip, listType) {
export async function generateSecurityAudit() {
return this.request('/security/audit');
}
-
-// Lynis (Vulnerability Scanning) endpoints
-export async function getLynisStatus() {
- return this.request('/security/lynis/status');
-}
-
-export async function installLynis() {
- return this.request('/security/lynis/install', { method: 'POST' });
-}
-
-export async function runLynisScan() {
- return this.request('/security/lynis/scan', { method: 'POST' });
-}
-
-export async function getLynisScanStatus() {
- return this.request('/security/lynis/scan/status');
-}
-
-// Auto Updates endpoints
-export async function getAutoUpdatesStatus() {
- return this.request('/security/auto-updates/status');
-}
-
-export async function installAutoUpdates() {
- return this.request('/security/auto-updates/install', { method: 'POST' });
-}
-
-export async function enableAutoUpdates() {
- return this.request('/security/auto-updates/enable', { method: 'POST' });
-}
-
-export async function disableAutoUpdates() {
- return this.request('/security/auto-updates/disable', { method: 'POST' });
-}