secubox-openwrt/package/secubox/luci-app-hexojs/htdocs/luci-static/resources/view/hexojs/preview.js
CyberMind-FR e58f479cd4 feat(waf): Update WAF scenarios with 2024-2025 CVEs and OWASP threats
Add detection patterns for latest actively exploited vulnerabilities:
- CVE-2025-55182 (React2Shell, CVSS 10.0)
- CVE-2025-8110 (Gogs RCE), CVE-2025-53770 (SharePoint)
- CVE-2025-52691 (SmarterMail), CVE-2025-40551 (SolarWinds)
- CVE-2024-47575 (FortiManager), CVE-2024-21887 (Ivanti)
- CVE-2024-3400, CVE-2024-0012, CVE-2024-9474 (PAN-OS)

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

CrowdSec scenarios split into 11 separate files for reliability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 05:02:57 +01:00

60 lines
1.5 KiB
JavaScript

'use strict';
'require view';
'require ui';
'require hexojs/api as api';
'require secubox/kiss-theme';
return view.extend({
title: _('Preview'),
load: function() {
return api.previewStatus();
},
render: function(data) {
var running = data.running;
var url = data.url;
var port = data.port || 4000;
var view = E('div', { 'class': 'hexo-dashboard' }, [
E('link', { 'rel': 'stylesheet', 'href': L.resource('hexojs/dashboard.css') }),
// Header
E('div', { 'class': 'hexo-header' }, [
E('div', { 'class': 'hexo-card-title' }, [
E('span', { 'class': 'hexo-card-title-icon' }, '\uD83D\uDC41'),
_('Site Preview')
]),
running ? E('a', {
'class': 'hexo-btn hexo-btn-primary',
'href': url,
'target': '_blank'
}, ['\uD83D\uDD17 ', _('Open in New Tab')]) : ''
]),
// Preview
E('div', { 'class': 'hexo-card' }, [
running ? E('div', {}, [
E('p', { 'style': 'margin-bottom: 16px; color: var(--hexo-text-muted);' },
_('Preview server running at: ') + url),
E('iframe', {
'class': 'hexo-preview-frame',
'src': url
})
]) : E('div', { 'class': 'hexo-empty' }, [
E('div', { 'class': 'hexo-empty-icon' }, '\uD83D\uDC41'),
E('p', {}, _('Preview server not running.')),
E('p', { 'style': 'font-size: 14px; color: var(--hexo-text-muted);' },
_('Start the Hexo service to enable preview.'))
])
])
]);
return KissTheme.wrap([view], 'admin/services/hexojs/preview');
},
handleSaveApply: null,
handleSave: null,
handleReset: null
});