@extends('layouts.app') @section('title', 'CVE 資安通報') @push('head') @endpush @section('content') @php $allCves = collect($cveData)->flatten(1)->unique('id') ->sortByDesc(fn($c) => !empty($c['published']) ? \Carbon\Carbon::parse($c['published'])->timestamp : 0) ->values()->toArray(); $categories = ['all' => $allCves] + $cveData; $tabMeta = [ 'all' => ['label' => '全部', 'icon' => 'bi-grid-fill', 'bg' => 'secondary'], 'Linux OS' => ['label' => 'Linux', 'icon' => 'bi-ubuntu', 'bg' => 'warning'], 'Apache' => ['label' => 'Apache', 'icon' => 'bi-server', 'bg' => 'danger'], 'MySQL' => ['label' => 'MySQL', 'icon' => 'bi-database', 'bg' => 'primary'], 'PHP' => ['label' => 'PHP', 'icon' => 'bi-filetype-php', 'bg' => 'info'], 'MSSQL' => ['label' => 'MSSQL', 'icon' => 'bi-database-gear', 'bg' => 'info'], 'Oracle' => ['label' => 'Oracle', 'icon' => 'bi-database-fill', 'bg' => 'warning'], 'Chrome' => ['label' => 'Chrome', 'icon' => 'bi-browser-chrome', 'bg' => 'success'], ]; $tagClass = [ 'Linux OS' => 'ptag-linux', 'Apache' => 'ptag-apache', 'MySQL' => 'ptag-mysql', 'PHP' => 'ptag-php', 'MSSQL' => 'ptag-mssql', 'Oracle' => 'ptag-oracle', 'Chrome' => 'ptag-chrome', ]; $sevLabels = ['CRITICAL' => '嚴重', 'HIGH' => '高', 'MEDIUM' => '中', 'LOW' => '低']; $sevClass = ['CRITICAL' => 'sev-critical', 'HIGH' => 'sev-high', 'MEDIUM' => 'sev-medium', 'LOW' => 'sev-low']; @endphp

CVE 資安通報

每天 08:00 自動更新 ・ 近 120 天
@csrf
@if (session('info')) @endif @if (empty($allCves))

尚無 CVE 資料,請執行 php artisan cve:fetch

@else {{-- 搜尋列 --}}
@foreach ($tabMeta as $key => $meta) @php $items = collect($categories[$key] ?? []) ->sortByDesc(fn($c) => !empty($c['published']) ? \Carbon\Carbon::parse($c['published'])->timestamp : 0) ->values()->all(); $slug = Str::slug($key); @endphp @if ($key === 'all' || count($items) > 0)
@foreach ($items as $idx => $cve) = 10 ? 'style="display:none"' : '' !!}> @endforeach
CVE 編號 嚴重性 分數 產品 描述 (點擊查看詳情) 發布日期
{{ $cve['id'] }} {{ $sevLabels[$cve['severity'] ?? ''] ?? 'N/A' }} @if ($cve['score']) {{ $cve['score'] }} @else - @endif @foreach ($cve['tags'] ?? [] as $tag) {{ $tag }} @endforeach {{ Str::limit($cve['description'], 80) }} @if (!empty($cve['description_zh'])) {{ Str::limit($cve['description_zh'], 60) }} @endif {{ $cve['published'] ? \Carbon\Carbon::parse($cve['published'])->format('Y-m-d') : '-' }}
@php $totalPages = (int) ceil(count($items) / 10); @endphp
共 {{ count($items) }} 筆 @if ($totalPages > 1) @endif
@endif @endforeach
@endif
{{-- ===== CVE 詳細 Modal ===== --}} {{-- CVE 資料存入 JS(放在 content 區塊內確保變數作用域正確) --}} @endsection @push('scripts') @endpush