feat(waf): CRS-Regel-Beschreibungen als Tooltip — v1.2.81

~250 CRS-Regeln (Setup, Scanner, Protocol, IP-Reputation, LFI, RFI, RCE,
PHP/Node.js/Java Injection, XSS, SQLi, Session-Fixation, Data-Leakage).
Rule-ID-Tag in Alerts-Tabelle + Ausnahmen-Liste zeigt Tooltip bei Hover.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-06-03 11:43:07 +02:00
parent 4f31e18d66
commit f0120b64f3
3 changed files with 361 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ import apiClient, { isEnvelope } from '../../api/client'
import PageHeader from '../../components/PageHeader'
import DataTable from '../../components/DataTable'
import { useAuthStore } from '../../stores/auth'
import { getRuleDescription } from './crsRules'
const { Text } = Typography
@@ -201,7 +202,9 @@ function ConfigDrawer({ domainName, domainId, onClose }: ConfigDrawerProps) {
padding: '6px 10px', background: '#F8FAFC',
border: '1px solid #E2E8F0', borderRadius: 6,
}}>
<Tag style={{ fontFamily: 'monospace', flexShrink: 0 }}>{ruleId}</Tag>
<Tooltip title={getRuleDescription(Number(ruleId))} placement="topLeft">
<Tag style={{ fontFamily: 'monospace', flexShrink: 0, cursor: 'help' }}>{ruleId}</Tag>
</Tooltip>
<Text style={{ fontSize: 12, color: '#475569', flex: 1 }}>
{cfg?.exclusion_notes?.[ruleId] || <em style={{ color: '#94A3B8' }}>{t('waf.config.noNote')}</em>}
</Text>
@@ -371,7 +374,11 @@ function AlertsTab({ domainId }: { domainId?: number }) {
{ title: t('waf.alerts.col.uri'), dataIndex: 'uri', key: 'uri', ellipsis: true,
render: (v: string) => <Text style={{ fontSize: 11, fontFamily: 'monospace' }}>{v}</Text> },
{ title: t('waf.alerts.col.ruleId'), dataIndex: 'rule_id', key: 'rule_id', width: 90,
render: (v: number) => <Tag style={{ fontFamily: 'monospace' }}>{v}</Tag> },
render: (v: number) => (
<Tooltip title={getRuleDescription(v)} placement="topLeft">
<Tag style={{ fontFamily: 'monospace', cursor: 'help' }}>{v}</Tag>
</Tooltip>
) },
{ title: t('waf.alerts.col.severity'), dataIndex: 'severity', key: 'severity', width: 90,
render: (v: string) => <Tag color={severityColor(v)}>{v || '—'}</Tag> },
{ title: t('waf.alerts.col.msg'), dataIndex: 'rule_msg', key: 'rule_msg', ellipsis: true,