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>
137 lines
4.5 KiB
JavaScript
137 lines
4.5 KiB
JavaScript
'use strict';
|
|
'require view';
|
|
'require ui';
|
|
'require hexojs/api as api';
|
|
'require secubox/kiss-theme';
|
|
|
|
return view.extend({
|
|
title: _('Apps'),
|
|
|
|
load: function() {
|
|
return api.listApps();
|
|
},
|
|
|
|
handleCreateApp: function() {
|
|
var self = this;
|
|
|
|
ui.showModal(_('Create App'), [
|
|
E('div', { 'class': 'hexo-form-group' }, [
|
|
E('label', { 'class': 'hexo-form-label' }, _('Name')),
|
|
E('input', { 'type': 'text', 'id': 'app-title', 'class': 'hexo-input', 'placeholder': _('App name') })
|
|
]),
|
|
E('div', { 'class': 'hexo-form-group' }, [
|
|
E('label', { 'class': 'hexo-form-label' }, _('Icon (emoji)')),
|
|
E('input', { 'type': 'text', 'id': 'app-icon', 'class': 'hexo-input', 'placeholder': '\uD83D\uDE80' })
|
|
]),
|
|
E('div', { 'class': 'hexo-form-group' }, [
|
|
E('label', { 'class': 'hexo-form-label' }, _('Description')),
|
|
E('input', { 'type': 'text', 'id': 'app-desc', 'class': 'hexo-input', 'placeholder': _('Short description') })
|
|
]),
|
|
E('div', { 'class': 'hexo-form-group' }, [
|
|
E('label', { 'class': 'hexo-form-label' }, _('URL')),
|
|
E('input', { 'type': 'text', 'id': 'app-url', 'class': 'hexo-input', 'placeholder': 'https://...' })
|
|
]),
|
|
E('div', { 'class': 'hexo-form-group' }, [
|
|
E('label', { 'class': 'hexo-form-label' }, _('Category')),
|
|
E('select', { 'id': 'app-category', 'class': 'hexo-select' }, [
|
|
E('option', { 'value': 'tools' }, _('Tools')),
|
|
E('option', { 'value': 'services' }, _('Services')),
|
|
E('option', { 'value': 'projects' }, _('Projects')),
|
|
E('option', { 'value': 'security' }, _('Security'))
|
|
])
|
|
]),
|
|
E('div', { 'class': 'right', 'style': 'margin-top: 16px;' }, [
|
|
E('button', { 'class': 'btn', 'click': ui.hideModal }, _('Cancel')),
|
|
E('button', {
|
|
'class': 'btn cbi-button-positive',
|
|
'style': 'margin-left: 8px;',
|
|
'click': function() {
|
|
var title = document.querySelector('#app-title').value;
|
|
var icon = document.querySelector('#app-icon').value;
|
|
var desc = document.querySelector('#app-desc').value;
|
|
var url = document.querySelector('#app-url').value;
|
|
var category = document.querySelector('#app-category').value;
|
|
|
|
if (!title) {
|
|
ui.addNotification(null, E('p', _('Name is required')), 'error');
|
|
return;
|
|
}
|
|
|
|
api.createApp(title, icon, desc, url, category, '').then(function(result) {
|
|
ui.hideModal();
|
|
if (result.success) {
|
|
ui.addNotification(null, E('p', _('App created')), 'info');
|
|
location.reload();
|
|
} else {
|
|
ui.addNotification(null, E('p', result.error || _('Failed')), 'error');
|
|
}
|
|
});
|
|
}
|
|
}, _('Create'))
|
|
])
|
|
]);
|
|
},
|
|
|
|
render: function(data) {
|
|
var self = this;
|
|
var apps = data.apps || [];
|
|
|
|
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\uDCF1'),
|
|
_('Apps Portfolio')
|
|
]),
|
|
E('button', {
|
|
'class': 'hexo-btn hexo-btn-primary',
|
|
'click': function() { self.handleCreateApp(); }
|
|
}, ['\u2795 ', _('New App')])
|
|
]),
|
|
|
|
// Info
|
|
E('div', { 'class': 'hexo-card' }, [
|
|
E('p', { 'style': 'color: var(--hexo-text-muted);' },
|
|
_('Apps are displayed in the portfolio section of your CyberMind theme.'))
|
|
]),
|
|
|
|
// Apps Grid
|
|
E('div', { 'class': 'hexo-card' }, [
|
|
apps.length > 0 ?
|
|
E('div', { 'style': 'display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px;' },
|
|
apps.map(function(app) {
|
|
return E('div', {
|
|
'class': 'hexo-preset',
|
|
'style': 'cursor: default;'
|
|
}, [
|
|
E('div', { 'class': 'hexo-preset-icon' }, app.icon || '\uD83D\uDCF1'),
|
|
E('div', { 'class': 'hexo-preset-name' }, app.title),
|
|
E('div', { 'class': 'hexo-preset-desc' }, app.description || ''),
|
|
app.url ? E('a', {
|
|
'href': app.url,
|
|
'target': '_blank',
|
|
'style': 'font-size: 12px; color: var(--hexo-primary);'
|
|
}, app.url) : '',
|
|
E('div', { 'style': 'margin-top: 8px;' }, [
|
|
E('span', { 'class': 'hexo-tag' }, app.category || 'tools')
|
|
])
|
|
]);
|
|
})
|
|
)
|
|
: E('div', { 'class': 'hexo-empty' }, [
|
|
E('div', { 'class': 'hexo-empty-icon' }, '\uD83D\uDCF1'),
|
|
E('p', {}, _('No apps yet'))
|
|
])
|
|
])
|
|
]);
|
|
|
|
return KissTheme.wrap([view], 'admin/services/hexojs/apps');
|
|
},
|
|
|
|
handleSaveApply: null,
|
|
handleSave: null,
|
|
handleReset: null
|
|
});
|