feat(sve): 注册 sve.gvsds.org 子域托管 TempLate/SVE,重构 SveID 编解码并兼容存量 CVSS 数据
- core/views.py 注册 sve 子域 -> SVE 目录 - sve/views.py:SveID 按 0x0YYYYNNNNN(5 字节 hex)编解码,兼容补零/文本存量形态;SveCvss 兼容小写键 score/severity/vector - 删除 TempLate/Org 原生 SVE 页面 - .gitignore 排除 /SVE/ 与 /TempLate/SVE/
This commit is contained in:
1 parent
e970a610fc
commit
bc614d8370
9 files changed
+98
-2892
No files matched your search
+6
-1
@@ -34,4 +34,9 @@ __pycache__/
|
||||
# CCGO 做题站前端工程(独立 git 仓库)
|
||||
/CCGO/
|
||||
# CCGO 的编译文件
|
||||
/TempLate/CCGO/
|
||||
/TempLate/CCGO/
|
||||
|
||||
# SVE 前端工程(独立 git 仓库)
|
||||
/SVE/
|
||||
# SVE 的编译文件
|
||||
/TempLate/SVE/
|
||||
@@ -1,242 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title id="pageTitle">404 Not Found - SVE Database</title>
|
||||
<script src="https://tailwind.gvsds.com"></script>
|
||||
<link href="https://cdn.gvsds.com/font-awesome/css/all.min.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Tailwind配置(与原页面完全一致) -->
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#0F3460',
|
||||
secondary: '#1A73E8',
|
||||
danger: '#D93025',
|
||||
warning: '#F4B400',
|
||||
success: '#1E8E3E',
|
||||
neutral: '#5F6368',
|
||||
light: '#F8F9FA',
|
||||
dark: '#202124'
|
||||
},
|
||||
fontFamily: {
|
||||
inter: ['Inter', 'sans-serif'],
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/tailwindcss">
|
||||
@layer utilities {
|
||||
.content-auto {
|
||||
content-visibility: auto;
|
||||
}
|
||||
.shadow-soft {
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
/* 语言切换按钮样式(与原页面一致) */
|
||||
.lang-switch-btn {
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.lang-switch-btn.active {
|
||||
background-color: #1A73E8;
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
}
|
||||
.lang-switch-btn.inactive {
|
||||
background-color: #F8F9FA;
|
||||
color: #5F6368;
|
||||
}
|
||||
.lang-switch-btn.inactive:hover {
|
||||
background-color: #E8F0FE;
|
||||
color: #1A73E8;
|
||||
}
|
||||
/* 404 专用样式 */
|
||||
.error-number {
|
||||
font-size: clamp(6rem, 20vw, 12rem);
|
||||
line-height: 1;
|
||||
font-weight: 700;
|
||||
background: linear-gradient(135deg, #0F3460 0%, #1A73E8 100%);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="font-inter bg-gray-50 text-dark">
|
||||
<!-- 顶部导航栏(与原页面完全一致) -->
|
||||
<header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<div class="flex items-center space-x-2">
|
||||
<i class="fa fa-shield text-primary text-2xl"></i>
|
||||
<span class="text-xl font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
|
||||
<!-- 桌面端语言切换按钮组 -->
|
||||
<div class="hidden md:flex items-center space-x-2 mr-4">
|
||||
<button id="lang-en" class="lang-switch-btn active">English</button>
|
||||
<button id="lang-zh" class="lang-switch-btn inactive">中文</button>
|
||||
</div>
|
||||
|
||||
<nav class="hidden md:flex items-center space-x-8">
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
|
||||
<div class="flex items-center space-x-4">
|
||||
<!-- 移动端语言切换(默认隐藏,汉堡菜单展开时显示) -->
|
||||
<div class="hidden sm:flex items-center space-x-2 mr-2" id="mobile-lang-switch">
|
||||
<button id="mobile-lang-en" class="lang-switch-btn active text-xs">EN</button>
|
||||
<button id="mobile-lang-zh" class="lang-switch-btn inactive text-xs">中文</button>
|
||||
</div>
|
||||
|
||||
<div class="relative hidden md:block">
|
||||
<input type="text" placeholder="Search SVE..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary w-64 transition-all" data-i18n-placeholder="search_sve_placeholder">
|
||||
<i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
||||
</div>
|
||||
<button class="md:hidden text-neutral hover:text-primary">
|
||||
<i class="fa fa-search text-xl"></i>
|
||||
</button>
|
||||
<button class="md:hidden text-neutral hover:text-primary" id="mobile-menu-btn">
|
||||
<i class="fa fa-bars text-xl"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 移动端导航菜单(默认隐藏) -->
|
||||
<div class="md:hidden hidden bg-white border-t border-gray-100 py-3" id="mobile-menu">
|
||||
<nav class="flex flex-col space-y-3 px-2">
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 404 主内容区(新增核心区域,匹配原页面风格) -->
|
||||
<main class="container mx-auto px-4 sm:px-6 lg:px-8 py-12 md:py-20">
|
||||
<div class="max-w-4xl mx-auto text-center space-y-8">
|
||||
<!-- 404 数字图标 -->
|
||||
<div class="error-number">404</div>
|
||||
|
||||
<!-- 404 标题与描述 -->
|
||||
<div class="space-y-4">
|
||||
<h1 class="text-3xl md:text-4xl font-bold text-primary" data-i18n="error_404_title">Page Not Found</h1>
|
||||
<p class="text-lg text-neutral max-w-2xl mx-auto" data-i18n="error_404_desc">
|
||||
The page you're looking for doesn't exist or has been moved. Please check the URL or return to the homepage.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮组 -->
|
||||
<div class="flex flex-col sm:flex-row justify-center gap-4 mt-6">
|
||||
<a href="/" class="bg-secondary hover:bg-secondary/90 text-white font-medium py-3 px-8 rounded-lg transition-colors flex items-center justify-center gap-2" data-i18n="error_back_home">
|
||||
<i class="fa fa-home"></i> Back to Homepage
|
||||
</a>
|
||||
<a href="javascript:location.reload()" class="bg-white border border-gray-300 hover:border-secondary text-dark font-medium py-3 px-8 rounded-lg transition-colors flex items-center justify-center gap-2" data-i18n="error_search_again">
|
||||
<i class="fa fa-search"></i> Refresh Again
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- 辅助搜索框(可选,增强用户体验) --
|
||||
<div class="max-w-md mx-auto mt-8">
|
||||
<p class="text-sm text-neutral mb-3" data-i18n="error_search_sve">Search for SVE entries:</p>
|
||||
<div class="relative">
|
||||
<input type="text" placeholder="Enter SVE ID or keyword..." class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary transition-all" data-i18n-placeholder="error_search_placeholder">
|
||||
<i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 text-lg"></i>
|
||||
</div>
|
||||
</div-->
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 页脚(与原页面完全一致) -->
|
||||
<footer class="bg-white py-12 mt-12">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2 mb-4">
|
||||
<i class="fa fa-shield text-primary text-xl"></i>
|
||||
<span class="text-lg font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-4" data-i18n="footer_desc">A comprehensive database of security vulnerabilities and exposures, maintained by the Security Research Team.</p>
|
||||
<div class="flex space-x-4">
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-twitter"></i>
|
||||
</a>
|
||||
<a href="https://www.gvsds.com/GVSDS/" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-github"></i>
|
||||
</a>
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-linkedin"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_resources">Resources</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="api">API</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="bulk_data">Bulk Data</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="statistics">Statistics</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_information">Information</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about_sve">About SVE</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="cve_compatibility">CVE Compatibility</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="vuln_metrics">Vulnerability Metrics</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="faq">FAQ</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_contact">Contact</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-envelope text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.com" class="text-neutral hover:text-secondary transition-colors">sve@gvsds.com</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-file-text text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.org?subject=[WARNING]%20Report%20A%20Vulnerability%20!" class="text-neutral hover:text-secondary transition-colors" data-i18n="report_vuln">Report a Vulnerability</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-info-circle text-secondary mt-1 mr-2"></i>
|
||||
<a href="https://doc.gvsds.com/6e845a45fc493c66a23a9361bce1464d" class="text-neutral hover:text-secondary transition-colors" data-i18n="security_policy" target="_blank">Security Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-gray-200 mt-8 pt-6 flex flex-col md:flex-row justify-between items-center">
|
||||
<p class="text-sm text-neutral" data-i18n="copyright">© 2025 SVE Database. All rights reserved.</p>
|
||||
<div class="flex space-x-6 mt-4 md:mt-0 text-sm">
|
||||
<a href="https://doc.gvsds.com/fc084ab20a283208adb19033ca4de173" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="privacy_policy">Privacy Policy</a>
|
||||
<a href="https://doc.gvsds.com/1f07d3b8cec43a2ab9892a15b150bdd6" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="terms_service">Terms of Service</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/assets/js/i18n.js"></script>
|
||||
<script src="/assets/js/i18n.lib.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,571 +0,0 @@
|
||||
// 合并后的完整多语言资源
|
||||
const i18nResources = {
|
||||
en: {
|
||||
// 基础导航与通用
|
||||
sve_database: "SVE Database",
|
||||
home: "Home",
|
||||
browse: "Browse",
|
||||
search: "Search",
|
||||
about: "About",
|
||||
create_sve: "Create SVE",
|
||||
documentation: "Documentation",
|
||||
search_sve_placeholder: "Search SVE...",
|
||||
|
||||
// 首页Hero区域
|
||||
hero_title: "GVSDS-Owned Projects Security / SMANAGE Vulnerability Exposure Database",
|
||||
hero_desc: "A comprehensive repository of security vulnerabilities, providing detailed information for researchers, developers, and security professionals.",
|
||||
hero_search_placeholder: "Search by SVE ID, CWE, keyword, or affected product...",
|
||||
search_btn: "Search",
|
||||
hero_example: "Example: <a target=\"_blank\" href=\"https://www.gvsds.org/SVE/SVE-2025-00012\" class=\"underline hover:opacity-100\">SVE-2025-00012</a> or <a target=\"_blank\" href=\"/query.html?title=xss\" class=\"underline hover:opacity-100\">Cross-Site Scripting</a>",
|
||||
|
||||
// 统计数据
|
||||
stat_total_vuln: "Total Vulnerabilities",
|
||||
stat_total_trend: "12% from last year",
|
||||
stat_critical_vuln: "Critical Vulnerabilities",
|
||||
stat_critical_trend: "8% from last year",
|
||||
stat_this_month: "This Month",
|
||||
stat_month_trend: "3% from last month",
|
||||
stat_cwe_categories: "CWE Categories",
|
||||
stat_cwe_trend: "5 new categories",
|
||||
|
||||
// 图表相关
|
||||
chart_vuln_trends: "Vulnerability Trends",
|
||||
severity_critical: "Critical",
|
||||
severity_medium: "Medium",
|
||||
severity_low: "Low",
|
||||
chart_severity_dist: "Severity Distribution",
|
||||
chart_top_cwe: "Top CWE Categories",
|
||||
|
||||
// 最新SVE条目
|
||||
latest_sve: "Latest SVE Entries",
|
||||
view_all: "View All",
|
||||
table_sve_id: "SVE ID",
|
||||
table_title: "Title",
|
||||
table_severity: "Severity",
|
||||
table_published: "Published",
|
||||
table_cwe: "CWE",
|
||||
|
||||
// 示例漏洞标题
|
||||
vuln_title_1: "Remote Code Execution in CloudPlatform v4.2.1",
|
||||
vuln_title_2: "Privilege Escalation in AuthService v2.5.0",
|
||||
vuln_title_3: "Information Disclosure in DataManager",
|
||||
vuln_title_4: "Cross-Site Scripting in WebFramework v2.3.0",
|
||||
vuln_title_5: "Weak Password Policy in UserManager",
|
||||
|
||||
// 资源板块
|
||||
resource_doc: "Documentation",
|
||||
resource_doc_desc: "Learn how to use the SVE database, understand vulnerability metrics, and interpret security ratings.",
|
||||
read_doc: "Read Documentation",
|
||||
resource_api: "API Access",
|
||||
resource_api_desc: "Integrate SVE data into your applications with our comprehensive REST API and developer tools.",
|
||||
explore_api: "Explore API",
|
||||
resource_report: "Report Vulnerability",
|
||||
resource_report_desc: "Submit a new security vulnerability for inclusion in the SVE database after verification.",
|
||||
submit_report: "Submit Report",
|
||||
|
||||
// 订阅板块
|
||||
subscribe_title: "Stay Updated on Security Vulnerabilities",
|
||||
subscribe_desc: "Subscribe to our newsletter to receive weekly updates on new vulnerabilities, patches, and security trends.",
|
||||
email_placeholder: "Your email address",
|
||||
subscribe_btn: "Subscribe Now",
|
||||
privacy_note: "We respect your privacy. Unsubscribe at any time.",
|
||||
|
||||
// 创建SVE相关
|
||||
create_sve_title: "Create New SVE Entry",
|
||||
create_sve_desc: "Fill in the following fields to create a new SVE entry. All required fields are marked with an asterisk (*).",
|
||||
json_import_export_note: "You can import SVE data from JSON or export the current form as JSON",
|
||||
import_json: "Import JSON",
|
||||
export_json: "Export JSON",
|
||||
sve_basic_info: "1. SVE Basic Information",
|
||||
sve_id: "SVE ID *",
|
||||
sve_year_placeholder: "YYYY",
|
||||
sve_number_placeholder: "XXXXXX",
|
||||
sve_id_format_note: "Format: SVE-YYYY-XXXXXX (e.g., SVE-2024-123456)",
|
||||
publish_date: "Publish Date *",
|
||||
vuln_title: "Vulnerability Title *",
|
||||
vuln_title_placeholder: "e.g., Cross-Site Scripting Vulnerability in WebFramework v2.3.0",
|
||||
vuln_status: "Vulnerability Status *",
|
||||
vuln_status_draft: "Draft (Not Published)",
|
||||
vuln_status_public: "Publicly Disclosed",
|
||||
vuln_status_reserved: "Reserved (Pending Disclosure)",
|
||||
vuln_description: "2. Vulnerability Description *",
|
||||
vuln_description_note: "Describe the vulnerability in detail, including technical details, attack scenarios, and potential impacts. Support Markdown formatting.",
|
||||
editor_edit_tab: "Edit",
|
||||
editor_preview_tab: "Preview",
|
||||
vuln_description_editor_placeholder: "# Vulnerability Description\n\n## Technical Details\nDescribe the technical details of the vulnerability here...\n\n## Attack Scenario\nExplain how an attacker could exploit this vulnerability...\n\n## Potential Impact\nList the potential impacts of this vulnerability...",
|
||||
affected_products: "3. Affected Products *",
|
||||
add_product: "Add Product",
|
||||
affected_products_note: "List all products affected by this vulnerability. Include product name, version, and whether it's fixed in later versions.",
|
||||
product_name: "Product Name *",
|
||||
product_name_placeholder: "e.g., WebFramework",
|
||||
product_version: "Affected Version(s) *",
|
||||
product_version_placeholder: "e.g., v2.3.0, v2.2.x",
|
||||
fixed_version: "Fixed Version (if any)",
|
||||
fixed_version_placeholder: "e.g., v2.3.1, None",
|
||||
remove_product: "Remove",
|
||||
cvss_rating: "4. CVSS v3.1 Rating *",
|
||||
cvss_rating_note: "Select the CVSS v3.1 metrics to calculate the base score. Refer to the SVE documentation for guidance on selecting appropriate metrics.",
|
||||
attack_vector: "Attack Vector (AV) *",
|
||||
av_network: "Network (N) - Exploitable remotely",
|
||||
av_adjacent: "Adjacent (A) - Exploitable via adjacent network",
|
||||
av_local: "Local (L) - Exploitable only locally",
|
||||
av_physical: "Physical (P) - Requires physical access",
|
||||
attack_complexity: "Attack Complexity (AC) *",
|
||||
ac_low: "Low (L) - Minimal conditions",
|
||||
ac_high: "High (H) - Specialized conditions",
|
||||
privileges_required: "Privileges Required (PR) *",
|
||||
pr_none: "None (N) - No privileges needed",
|
||||
pr_low: "Low (L) - Basic privileges needed",
|
||||
pr_high: "High (H) - Admin privileges needed",
|
||||
user_interaction: "User Interaction (UI) *",
|
||||
ui_none: "None (N) - No user interaction needed",
|
||||
ui_required: "Required (R) - User action needed",
|
||||
scope: "Scope (S) *",
|
||||
s_unchanged: "Unchanged (U) - Impact limited to vulnerable component",
|
||||
s_changed: "Changed (C) - Impact extends beyond vulnerable component",
|
||||
confidentiality_impact: "Confidentiality (C) *",
|
||||
c_none: "None (N) - No confidentiality impact",
|
||||
c_low: "Low (L) - Limited confidentiality loss",
|
||||
c_high: "High (H) - Complete confidentiality loss",
|
||||
integrity_impact: "Integrity (I) *",
|
||||
i_none: "None (N) - No integrity impact",
|
||||
i_low: "Low (L) - Limited integrity loss",
|
||||
i_high: "High (H) - Complete integrity loss",
|
||||
availability_impact: "Availability (A) *",
|
||||
a_none: "None (N) - No availability impact",
|
||||
a_low: "Low (L) - Limited availability loss",
|
||||
a_high: "High (H) - Complete availability loss",
|
||||
cvss_base_score: "CVSS v3.1 Base Score",
|
||||
cvss_vector_string: "CVSS Vector String",
|
||||
solutions_mitigations: "5. Solutions and Mitigations",
|
||||
solutions_mitigations_note: "Provide solutions, mitigations, and workarounds for the vulnerability. Support Markdown formatting (e.g., code blocks for workaround code).",
|
||||
solutions_editor_placeholder: "# Solutions and Mitigations\n\n## Recommended Actions\n1. Upgrade to the latest version\n2. Apply security patches\n\n## Workaround (if upgrade not possible)\n```javascript\n// Example workaround code\nfunction sanitizeInput(input) {\n return input.replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n```\n\n## Additional Guidance\nProvide any additional guidance for users...",
|
||||
references: "6. References",
|
||||
add_reference: "Add Reference",
|
||||
references_note: "Add references related to the vulnerability (e.g., vendor advisories, technical papers, SVE documentation links). Do not include CVE or CWE references.",
|
||||
reference_type: "Reference Type *",
|
||||
ref_vendor: "Vendor Advisory",
|
||||
ref_tech_doc: "Technical Documentation",
|
||||
ref_sve_guide: "SVE Guidance",
|
||||
ref_research: "Research Paper",
|
||||
ref_other: "Other",
|
||||
reference_title: "Reference Title",
|
||||
reference_title_placeholder: "e.g., WebFramework Security Advisory 2024-01",
|
||||
reference_url: "Reference URL *",
|
||||
reference_url_placeholder: "https://example.com/security/advisory",
|
||||
remove_reference: "Remove",
|
||||
related_sve: "7. Related SVE Entries",
|
||||
add_related_sve: "Add Related SVE",
|
||||
related_sve_note: "Add other SVE entries that are related to this vulnerability (e.g., same product family, similar attack vector).",
|
||||
related_sve_id_placeholder: "SVE-YYYY-XXXXXX",
|
||||
related_same_product: "Same Product",
|
||||
related_similar_vuln: "Similar Vulnerability",
|
||||
related_same_vendor: "Same Vendor",
|
||||
related_other: "Other Relationship",
|
||||
remove_related_sve: "Remove Related SVE",
|
||||
save_draft: "Save as Draft",
|
||||
submit_sve: "Submit SVE Entry",
|
||||
|
||||
// SVE详情页相关
|
||||
copy_sve_id: "Copy SVE ID",
|
||||
copied: "Copied!",
|
||||
description: "Description",
|
||||
vector: "Vector",
|
||||
vendor_advisory: "Vendor Advisory:",
|
||||
vulnerability_details: "Vulnerability Details",
|
||||
status: "Status",
|
||||
publicly_disclosed: "Publicly Disclosed",
|
||||
related_sve_entries: "Related SVE Entries",
|
||||
medium: "MEDIUM",
|
||||
high: "HIGH",
|
||||
critical: "CRITICAL",
|
||||
low: "LOW",
|
||||
none: "NONE",
|
||||
view_all_related: "View All Related",
|
||||
get_updates: "Get Updates",
|
||||
subscribe_desc: "Subscribe to receive notifications about changes to this SVE entry.",
|
||||
subscribe: "Subscribe",
|
||||
cve_compatibility: "CVE Compatibility",
|
||||
accessibility: "Accessibility",
|
||||
published: "Published:",
|
||||
last_modified: "Last Modified:",
|
||||
no_related_sves: "No related SVE entries found.",
|
||||
no_fixed_version: "No fixed version",
|
||||
|
||||
// CVSS简化显示文本
|
||||
av_network: "Network",
|
||||
av_adjacent: "Adjacent",
|
||||
av_local: "Local",
|
||||
av_physical: "Physical",
|
||||
ac_low: "Low",
|
||||
ac_high: "High",
|
||||
pr_none: "None",
|
||||
pr_low: "Low",
|
||||
pr_high: "High",
|
||||
ui_none: "None",
|
||||
ui_required: "Required",
|
||||
s_unchanged: "Unchanged",
|
||||
s_changed: "Changed",
|
||||
c_none: "None",
|
||||
c_low: "Low",
|
||||
c_high: "High",
|
||||
i_none: "None",
|
||||
i_low: "Low",
|
||||
i_high: "High",
|
||||
a_none: "None",
|
||||
a_low: "Low",
|
||||
a_high: "High",
|
||||
|
||||
// 错误页面
|
||||
error_404_title: "Page Not Found",
|
||||
error_404_desc: "The page you're looking for doesn't exist or has been moved. Please check the URL or return to the homepage.",
|
||||
error_back_home: "Back to Homepage",
|
||||
error_search_again: "Refresh Page",
|
||||
error_search_sve: "Search for SVE entries:",
|
||||
error_search_placeholder: "Enter SVE ID or keyword...",
|
||||
|
||||
// SVE列表页新增
|
||||
sve_list_title: "SVE Vulnerability List",
|
||||
sve_list_desc: "Display all publicly disclosed SVE vulnerabilities with multi-dimensional filtering and pagination",
|
||||
total_vulns: "Total Vulnerabilities:",
|
||||
current_page: "Current Page:",
|
||||
advanced_filter: "Advanced Filter",
|
||||
filter_title: "Vulnerability Title",
|
||||
filter_title_placeholder: "Search by keyword",
|
||||
filter_cvss_severity: "CVSS Severity",
|
||||
filter_publish_year: "Publish Year",
|
||||
filter_page_size: "Items per Page",
|
||||
filter_all: "All",
|
||||
apply_filter: "Apply Filters",
|
||||
reset_filter: "Reset Filters",
|
||||
attack_vector: "Attack Vector (AV)",
|
||||
attack_complexity: "Attack Complexity (AC)",
|
||||
privileges_required: "Privileges Required (PR)",
|
||||
av_network: "Network (N)",
|
||||
av_adjacent: "Adjacent (A)",
|
||||
av_local: "Local (L)",
|
||||
av_physical: "Physical (P)",
|
||||
ac_low: "Low (L)",
|
||||
ac_high: "High (H)",
|
||||
pr_none: "None (N)",
|
||||
pr_low: "Low (L)",
|
||||
pr_high: "High (H)",
|
||||
sve_id: "SVE ID",
|
||||
vuln_title: "Vulnerability Title",
|
||||
cvss_score: "CVSS Score",
|
||||
severity: "Severity",
|
||||
publish_date: "Publish Date",
|
||||
actions: "Actions",
|
||||
loading_data: "Loading data...",
|
||||
no_results: "No matching vulnerabilities found",
|
||||
reset_filters: "Reset filters",
|
||||
load_error: "Failed to load data",
|
||||
retry: "Retry",
|
||||
critical: "Critical",
|
||||
high: "High",
|
||||
medium: "Medium",
|
||||
low: "Low",
|
||||
view_details: "View Details",
|
||||
|
||||
// 页脚
|
||||
footer_desc: "A comprehensive database of security vulnerabilities and exposures, maintained by the Security Research Team.",
|
||||
footer_resources: "Resources",
|
||||
api: "API",
|
||||
bulk_data: "Bulk Data",
|
||||
statistics: "Statistics",
|
||||
footer_information: "Information",
|
||||
about_sve: "About SVE",
|
||||
vuln_metrics: "Vulnerability Metrics",
|
||||
faq: "FAQ",
|
||||
footer_contact: "Contact",
|
||||
report_vuln: "Report a Vulnerability",
|
||||
security_policy: "Security Policy",
|
||||
copyright: "© 2025 SVE Database. All rights reserved.",
|
||||
privacy_policy: "Privacy Policy",
|
||||
terms_service: "Terms of Service"
|
||||
},
|
||||
zh: {
|
||||
// 基础导航与通用
|
||||
sve_database: "SVE 数据库",
|
||||
home: "首页",
|
||||
browse: "浏览",
|
||||
search: "搜索",
|
||||
about: "关于我们",
|
||||
create_sve: "创建 SVE",
|
||||
documentation: "文档",
|
||||
search_sve_placeholder: "搜索 SVE...",
|
||||
|
||||
// 首页Hero区域
|
||||
hero_title: "GVSDS 旗下项目安全(SMANAGE)漏洞暴露数据库",
|
||||
hero_desc: "全面的安全漏洞知识库,为研究人员、开发人员和安全专业人员提供详细信息。",
|
||||
hero_search_placeholder: "按 SVE ID、CWE、关键词或受影响产品搜索...",
|
||||
search_btn: "搜索",
|
||||
hero_example: "示例:<a target=\"_blank\" href=\"https://www.gvsds.org/SVE/SVE-2025-00012\" class=\"underline hover:opacity-100\">SVE-2025-00012</a> 或 <a target=\"_blank\" href=\"/query.html?title=xss\" class=\"underline hover:opacity-100\">跨站脚本攻击(XSS)</a>",
|
||||
|
||||
// 统计数据
|
||||
stat_total_vuln: "漏洞总数",
|
||||
stat_total_trend: "较去年增长 12%",
|
||||
stat_critical_vuln: "严重漏洞数",
|
||||
stat_critical_trend: "较去年增长 8%",
|
||||
stat_this_month: "本月新增",
|
||||
stat_month_trend: "较上月下降 3%",
|
||||
stat_cwe_categories: "CWE 类别数",
|
||||
stat_cwe_trend: "新增 5 个类别",
|
||||
|
||||
// 图表相关
|
||||
chart_vuln_trends: "漏洞趋势",
|
||||
severity_critical: "严重",
|
||||
severity_medium: "中等",
|
||||
severity_low: "低级",
|
||||
chart_severity_dist: "漏洞严重程度分布",
|
||||
chart_top_cwe: "热门 CWE 类别",
|
||||
|
||||
// 最新SVE条目
|
||||
latest_sve: "最新 SVE 条目",
|
||||
view_all: "查看全部",
|
||||
table_sve_id: "SVE 编号",
|
||||
table_title: "标题",
|
||||
table_severity: "严重程度",
|
||||
table_published: "发布时间",
|
||||
table_cwe: "CWE 编号",
|
||||
|
||||
// 示例漏洞标题
|
||||
vuln_title_1: "CloudPlatform v4.2.1 远程代码执行漏洞",
|
||||
vuln_title_2: "AuthService v2.5.0 权限提升漏洞",
|
||||
vuln_title_3: "DataManager 信息泄露漏洞",
|
||||
vuln_title_4: "WebFramework v2.3.0 跨站脚本漏洞",
|
||||
vuln_title_5: "UserManager 弱密码策略漏洞",
|
||||
|
||||
// 资源板块
|
||||
resource_doc: "文档中心",
|
||||
resource_doc_desc: "学习如何使用 SVE 数据库、理解漏洞指标以及解读安全评级。",
|
||||
read_doc: "阅读文档",
|
||||
resource_api: "API 接口",
|
||||
resource_api_desc: "通过我们全面的 REST API 和开发工具,将 SVE 数据集成到您的应用中。",
|
||||
explore_api: "探索 API",
|
||||
resource_report: "漏洞上报",
|
||||
resource_report_desc: "提交新的安全漏洞,经审核后将纳入 SVE 数据库。",
|
||||
submit_report: "提交报告",
|
||||
|
||||
// 订阅板块
|
||||
subscribe_title: "及时获取安全漏洞更新",
|
||||
subscribe_desc: "订阅我们的通讯,每周获取新漏洞、补丁和安全趋势的更新。",
|
||||
email_placeholder: "您的邮箱地址",
|
||||
subscribe_btn: "立即订阅",
|
||||
privacy_note: "我们尊重您的隐私,可随时取消订阅。",
|
||||
|
||||
// 创建SVE相关
|
||||
create_sve_title: "创建新的 SVE 条目",
|
||||
create_sve_desc: "填写以下字段以创建新的 SVE 条目。所有必填字段均标有星号 (*)。",
|
||||
json_import_export_note: "您可以从 JSON 导入 SVE 数据,或将当前表单导出为 JSON",
|
||||
import_json: "导入 JSON",
|
||||
export_json: "导出 JSON",
|
||||
sve_basic_info: "1. SVE 基础信息",
|
||||
sve_id: "SVE 编号 *",
|
||||
sve_year_placeholder: "年份",
|
||||
sve_number_placeholder: "编号(6位)",
|
||||
sve_id_format_note: "格式:SVE-年份-6位编号(例如:SVE-2024-123456)",
|
||||
publish_date: "发布日期 *",
|
||||
vuln_title: "漏洞标题 *",
|
||||
vuln_title_placeholder: "例如:WebFramework v2.3.0 中的跨站脚本漏洞",
|
||||
vuln_status: "漏洞状态 *",
|
||||
vuln_status_draft: "草稿(未发布)",
|
||||
vuln_status_public: "已公开披露",
|
||||
vuln_status_reserved: "保留(待披露)",
|
||||
vuln_description: "2. 漏洞描述 *",
|
||||
vuln_description_note: "详细描述漏洞,包括技术细节、攻击场景和潜在影响。支持 Markdown 格式。",
|
||||
editor_edit_tab: "编辑",
|
||||
editor_preview_tab: "预览",
|
||||
vuln_description_editor_placeholder: "# 漏洞描述\n\n## 技术细节\n在此处描述漏洞的技术细节...\n\n## 攻击场景\n解释攻击者如何利用此漏洞...\n\n## 潜在影响\n列出此漏洞的潜在影响...",
|
||||
affected_products: "3. 受影响产品 *",
|
||||
add_product: "添加产品",
|
||||
affected_products_note: "列出所有受此漏洞影响的产品,包括产品名称、版本以及后续版本是否已修复。",
|
||||
product_name: "产品名称 *",
|
||||
product_name_placeholder: "例如:WebFramework",
|
||||
product_version: "受影响版本 *",
|
||||
product_version_placeholder: "例如:v2.3.0、v2.2.x",
|
||||
fixed_version: "修复版本(如有)",
|
||||
fixed_version_placeholder: "例如:v2.3.1、无",
|
||||
remove_product: "删除",
|
||||
cvss_rating: "4. CVSS v3.1 评分 *",
|
||||
cvss_rating_note: "选择 CVSS v3.1 指标以计算基础评分。有关选择适当指标的指导,请参考 SVE 文档。",
|
||||
attack_vector: "攻击向量 (AV) *",
|
||||
av_network: "网络 (N) - 可远程利用",
|
||||
av_adjacent: "相邻 (A) - 可通过相邻网络利用",
|
||||
av_local: "本地 (L) - 仅可本地利用",
|
||||
av_physical: "物理 (P) - 需要物理访问",
|
||||
attack_complexity: "攻击复杂度 (AC) *",
|
||||
ac_low: "低 (L) - 条件简单",
|
||||
ac_high: "高 (H) - 条件特殊",
|
||||
privileges_required: "所需权限 (PR) *",
|
||||
pr_none: "无 (N) - 无需权限",
|
||||
pr_low: "低 (L) - 需要基本权限",
|
||||
pr_high: "高 (H) - 需要管理员权限",
|
||||
user_interaction: "用户交互 (UI) *",
|
||||
ui_none: "无 (N) - 无需用户交互",
|
||||
ui_required: "需要 (R) - 需要用户操作",
|
||||
scope: "影响范围 (S) *",
|
||||
s_unchanged: "未变更 (U) - 影响仅限于漏洞组件",
|
||||
s_changed: "已变更 (C) - 影响超出漏洞组件",
|
||||
confidentiality_impact: "机密性 (C) *",
|
||||
c_none: "无 (N) - 无机密性影响",
|
||||
c_low: "低 (L) - 机密性有限损失",
|
||||
c_high: "高 (H) - 机密性完全损失",
|
||||
integrity_impact: "完整性 (I) *",
|
||||
i_none: "无 (N) - 无完整性影响",
|
||||
i_low: "低 (L) - 完整性有限损失",
|
||||
i_high: "高 (H) - 完整性完全损失",
|
||||
availability_impact: "可用性 (A) *",
|
||||
a_none: "无 (N) - 无可用性影响",
|
||||
a_low: "低 (L) - 可用性有限损失",
|
||||
a_high: "高 (H) - 可用性完全损失",
|
||||
cvss_base_score: "CVSS v3.1 基础评分",
|
||||
cvss_vector_string: "CVSS 向量字符串",
|
||||
solutions_mitigations: "5. 解决方案与缓解措施",
|
||||
solutions_mitigations_note: "提供漏洞的解决方案、缓解措施和临时规避方法。支持 Markdown 格式(例如,用于规避代码的代码块)。",
|
||||
solutions_editor_placeholder: "# 解决方案与缓解措施\n\n## 推荐操作\n1. 升级到最新版本\n2. 应用安全补丁\n\n## 临时规避方法(如无法立即升级)\n```javascript\n// 示例规避代码\nfunction sanitizeInput(input) {\n return input.replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n```\n\n## 额外指导\n为用户提供任何额外指导...",
|
||||
references: "6. 参考资料",
|
||||
add_reference: "添加参考资料",
|
||||
references_note: "添加与漏洞相关的参考资料(例如,厂商公告、技术文档、SVE 文档链接)。请勿包含 CVE 或 CWE 参考资料。",
|
||||
reference_type: "参考资料类型 *",
|
||||
ref_vendor: "厂商公告",
|
||||
ref_tech_doc: "技术文档",
|
||||
ref_sve_guide: "SVE 指导文档",
|
||||
ref_research: "研究论文",
|
||||
ref_other: "其他",
|
||||
reference_title: "参考资料标题",
|
||||
reference_title_placeholder: "例如:WebFramework 安全公告 2024-01",
|
||||
reference_url: "参考资料 URL *",
|
||||
reference_url_placeholder: "https://example.com/security/advisory",
|
||||
remove_reference: "删除",
|
||||
related_sve: "7. 相关 SVE 条目",
|
||||
add_related_sve: "添加相关 SVE",
|
||||
related_sve_note: "添加与此漏洞相关的其他 SVE 条目(例如,同一产品系列、类似攻击向量)。",
|
||||
related_sve_id_placeholder: "SVE-年份-6位编号",
|
||||
related_same_product: "同一产品",
|
||||
related_similar_vuln: "类似漏洞",
|
||||
related_same_vendor: "同一厂商",
|
||||
related_other: "其他关系",
|
||||
remove_related_sve: "删除相关 SVE",
|
||||
save_draft: "保存为草稿",
|
||||
submit_sve: "提交 SVE 条目",
|
||||
|
||||
// SVE详情页相关
|
||||
copy_sve_id: "复制 SVE 编号",
|
||||
copied: "已复制!",
|
||||
description: "漏洞描述",
|
||||
vector: "向量",
|
||||
vendor_advisory: "厂商公告:",
|
||||
vulnerability_details: "漏洞详情",
|
||||
status: "状态",
|
||||
publicly_disclosed: "已公开披露",
|
||||
related_sve_entries: "相关 SVE 条目",
|
||||
medium: "中等",
|
||||
high: "高危",
|
||||
critical: "严重",
|
||||
low: "低危",
|
||||
none: "无",
|
||||
view_all_related: "查看全部相关",
|
||||
get_updates: "获取更新",
|
||||
subscribe_desc: "订阅以接收此 SVE 条目的变更通知。",
|
||||
subscribe: "订阅",
|
||||
cve_compatibility: "CVE 兼容性",
|
||||
accessibility: "无障碍访问",
|
||||
published: "发布时间:",
|
||||
last_modified: "最后更新:",
|
||||
no_related_sves: "未找到相关 SVE 条目。",
|
||||
no_fixed_version: "无修复版本",
|
||||
|
||||
// CVSS简化显示文本
|
||||
av_network: "网络",
|
||||
av_adjacent: "相邻网络",
|
||||
av_local: "本地",
|
||||
av_physical: "物理",
|
||||
ac_low: "低",
|
||||
ac_high: "高",
|
||||
pr_none: "无",
|
||||
pr_low: "低",
|
||||
pr_high: "高",
|
||||
ui_none: "无",
|
||||
ui_required: "需要",
|
||||
s_unchanged: "未变更",
|
||||
s_changed: "已变更",
|
||||
c_none: "无",
|
||||
c_low: "低",
|
||||
c_high: "高",
|
||||
i_none: "无",
|
||||
i_low: "低",
|
||||
i_high: "高",
|
||||
a_none: "无",
|
||||
a_low: "低",
|
||||
a_high: "高",
|
||||
|
||||
// 错误页面
|
||||
error_404_title: "页面未找到",
|
||||
error_404_desc: "您访问的页面不存在或已被移动,请检查URL地址或返回首页。",
|
||||
error_back_home: "返回首页",
|
||||
error_search_again: "重新访问",
|
||||
error_search_sve: "搜索SVE条目:",
|
||||
error_search_placeholder: "输入SVE编号或关键词...",
|
||||
|
||||
// SVE列表页新增
|
||||
sve_list_title: "SVE漏洞列表",
|
||||
sve_list_desc: "展示所有已公开的SVE漏洞信息,支持多维度筛选和分页查询",
|
||||
total_vulns: "总漏洞数:",
|
||||
current_page: "当前页:",
|
||||
advanced_filter: "高级筛选",
|
||||
filter_title: "漏洞标题",
|
||||
filter_title_placeholder: "输入关键词搜索",
|
||||
filter_cvss_severity: "CVSS严重级别",
|
||||
filter_publish_year: "发布年份",
|
||||
filter_page_size: "每页条数",
|
||||
filter_all: "全部",
|
||||
apply_filter: "应用筛选",
|
||||
reset_filter: "重置筛选",
|
||||
attack_vector: "攻击向量(AV)",
|
||||
attack_complexity: "攻击复杂度(AC)",
|
||||
privileges_required: "所需权限(PR)",
|
||||
av_network: "网络(N)",
|
||||
av_adjacent: "相邻网络(A)",
|
||||
av_local: "本地(L)",
|
||||
av_physical: "物理(P)",
|
||||
ac_low: "低(L)",
|
||||
ac_high: "高(H)",
|
||||
pr_none: "无(N)",
|
||||
pr_low: "低(L)",
|
||||
pr_high: "高(H)",
|
||||
sve_id: "SVE编号",
|
||||
vuln_title: "漏洞标题",
|
||||
cvss_score: "CVSS评分",
|
||||
severity: "严重级别",
|
||||
publish_date: "发布日期",
|
||||
actions: "操作",
|
||||
loading_data: "加载数据中...",
|
||||
no_results: "未找到符合条件的漏洞",
|
||||
reset_filters: "重置筛选条件",
|
||||
load_error: "数据加载失败",
|
||||
retry: "重试",
|
||||
critical: "严重",
|
||||
high: "高危",
|
||||
medium: "中等",
|
||||
low: "低危",
|
||||
view_details: "查看详情",
|
||||
|
||||
// 页脚
|
||||
footer_desc: "由安全研究团队维护的全面安全漏洞与暴露数据库。",
|
||||
footer_resources: "资源中心",
|
||||
api: "API接口",
|
||||
bulk_data: "批量数据",
|
||||
statistics: "统计数据",
|
||||
footer_information: "相关信息",
|
||||
about_sve: "关于SVE",
|
||||
vuln_metrics: "漏洞指标",
|
||||
faq: "常见问题",
|
||||
footer_contact: "联系我们",
|
||||
report_vuln: "上报漏洞",
|
||||
security_policy: "安全政策",
|
||||
copyright: "© 2025 SVE数据库 保留所有权利。",
|
||||
privacy_policy: "隐私政策",
|
||||
terms_service: "服务条款"
|
||||
}
|
||||
};
|
||||
@@ -1,575 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" id="html-root">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>SVE Database - GVSDS-Owned Projects Security / SMANAGE Vulnerability Exposure Database</title>
|
||||
<script src="https://tailwind.gvsds.com"></script>
|
||||
<link href="https://cdn.gvsds.com/font-awesome/css/all.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.gvsds.com/Chart.js/dist/chart.umd.js"></script>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Tailwind配置 -->
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#0F3460',
|
||||
secondary: '#1A73E8',
|
||||
danger: '#D93025',
|
||||
warning: '#F4B400',
|
||||
success: '#1E8E3E',
|
||||
neutral: '#5F6368',
|
||||
light: '#F8F9FA',
|
||||
dark: '#202124'
|
||||
},
|
||||
fontFamily: {
|
||||
inter: ['Inter', 'sans-serif'],
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/tailwindcss">
|
||||
@layer utilities {
|
||||
.content-auto {
|
||||
content-visibility: auto;
|
||||
}
|
||||
.shadow-soft {
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
.bg-gradient-primary {
|
||||
background: linear-gradient(135deg, #0F3460 0%, #1A73E8 100%);
|
||||
}
|
||||
.lang-switch-btn {
|
||||
@apply px-3 py-1.5 rounded-lg text-sm font-medium transition-colors;
|
||||
}
|
||||
.lang-switch-btn.active {
|
||||
@apply bg-secondary text-white;
|
||||
}
|
||||
.lang-switch-btn.inactive {
|
||||
@apply bg-gray-200 text-dark hover:bg-gray-300;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="font-inter bg-gray-50 text-dark">
|
||||
<!-- 顶部导航栏(新增语言切换按钮) -->
|
||||
<header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<div class="flex items-center space-x-2">
|
||||
<i class="fa fa-shield text-primary text-2xl"></i>
|
||||
<span class="text-xl font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
|
||||
<!-- 新增:语言切换按钮组 -->
|
||||
<div class="hidden md:flex items-center space-x-2 mr-4">
|
||||
<button id="lang-en" class="lang-switch-btn active">English</button>
|
||||
<button id="lang-zh" class="lang-switch-btn inactive">中文</button>
|
||||
</div>
|
||||
|
||||
<nav class="hidden md:flex items-center space-x-8">
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
|
||||
<div class="flex items-center space-x-4">
|
||||
<!-- 移动端语言切换(隐藏,在汉堡菜单展开时显示) -->
|
||||
<div class="hidden sm:flex items-center space-x-2 mr-2" id="mobile-lang-switch">
|
||||
<button id="mobile-lang-en" class="lang-switch-btn active text-xs">EN</button>
|
||||
<button id="mobile-lang-zh" class="lang-switch-btn inactive text-xs">中文</button>
|
||||
</div>
|
||||
|
||||
<div class="relative hidden md:block">
|
||||
<input type="text" id="desktop-search" placeholder="Search SVE..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary w-64 transition-all" data-i18n-placeholder="search_sve_placeholder">
|
||||
<i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
||||
</div>
|
||||
<button class="md:hidden text-neutral hover:text-primary">
|
||||
<i class="fa fa-search text-xl"></i>
|
||||
</button>
|
||||
<button class="md:hidden text-neutral hover:text-primary" id="mobile-menu-btn">
|
||||
<i class="fa fa-bars text-xl"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 移动端导航菜单(默认隐藏) -->
|
||||
<div class="md:hidden hidden bg-white border-t border-gray-100 py-3" id="mobile-menu">
|
||||
<nav class="flex flex-col space-y-3 px-2">
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 英雄区域 -->
|
||||
<section class="bg-gradient-primary text-white py-16 md:py-24">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="max-w-3xl mx-auto text-center">
|
||||
<h1 class="text-3xl md:text-5xl font-bold mb-6 leading-tight" data-i18n="hero_title">GVSDS-Owned Projects Security / SMANAGE Vulnerability Exposure Database</h1>
|
||||
<p class="text-lg md:text-xl opacity-90 mb-8" data-i18n="hero_desc">A comprehensive repository of security vulnerabilities, providing detailed information for researchers, developers, and security professionals.</p>
|
||||
|
||||
<!-- 主要搜索框 -->
|
||||
<div class="relative max-w-2xl mx-auto">
|
||||
<input type="text" id="hero-search" placeholder="Search by SVE ID, CWE, keyword, or affected product..." class="w-full pl-5 pr-12 py-4 rounded-xl text-dark focus:outline-none focus:ring-4 focus:ring-white/20 transition-all" data-i18n-placeholder="hero_search_placeholder">
|
||||
<button id="hero-search-btn" class="absolute right-3 top-1/2 transform -translate-y-1/2 bg-secondary hover:bg-secondary/90 text-white px-4 py-2 rounded-lg transition-colors">
|
||||
<i class="fa fa-search mr-2"></i> <span data-i18n="search_btn">Search</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 text-sm opacity-80" data-i18n="hero_example">
|
||||
Example: <a target="_blank" href="https://www.gvsds.org/SVE/SVE-2025-00012" class="underline hover:opacity-100">SVE-2025-00012</a> or <a href="/query.html?q=xss" class="underline hover:opacity-100">Cross-Site Scripting</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 主要内容区 -->
|
||||
<main class="container mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
||||
<!-- 统计卡片 -->
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-12">
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 transform hover:-translate-y-1 transition-transform">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<p class="text-neutral mb-1" data-i18n="stat_total_vuln">Total Vulnerabilities</p>
|
||||
<h3 class="text-3xl font-bold text-primary">12,847</h3>
|
||||
</div>
|
||||
<div class="bg-primary/10 p-3 rounded-lg">
|
||||
<i class="fa fa-database text-primary text-xl"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 text-sm flex items-center text-success">
|
||||
<i class="fa fa-arrow-up mr-1"></i> <span data-i18n="stat_total_trend">12% from last year</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 transform hover:-translate-y-1 transition-transform">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<p class="text-neutral mb-1" data-i18n="stat_critical_vuln">Critical Vulnerabilities</p>
|
||||
<h3 class="text-3xl font-bold text-danger">1,423</h3>
|
||||
</div>
|
||||
<div class="bg-danger/10 p-3 rounded-lg">
|
||||
<i class="fa fa-exclamation-circle text-danger text-xl"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 text-sm flex items-center text-danger">
|
||||
<i class="fa fa-arrow-up mr-1"></i> <span data-i18n="stat_critical_trend">8% from last year</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 transform hover:-translate-y-1 transition-transform">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<p class="text-neutral mb-1" data-i18n="stat_this_month">This Month</p>
|
||||
<h3 class="text-3xl font-bold text-warning">247</h3>
|
||||
</div>
|
||||
<div class="bg-warning/10 p-3 rounded-lg">
|
||||
<i class="fa fa-calendar text-warning text-xl"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 text-sm flex items-center text-success">
|
||||
<i class="fa fa-arrow-down mr-1"></i> <span data-i18n="stat_month_trend">3% from last month</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 transform hover:-translate-y-1 transition-transform">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<p class="text-neutral mb-1" data-i18n="stat_cwe_categories">CWE Categories</p>
|
||||
<h3 class="text-3xl font-bold text-secondary">97</h3>
|
||||
</div>
|
||||
<div class="bg-secondary/10 p-3 rounded-lg">
|
||||
<i class="fa fa-tags text-secondary text-xl"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4 text-sm flex items-center text-success">
|
||||
<i class="fa fa-arrow-up mr-1"></i> <span data-i18n="stat_cwe_trend">5 new categories</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 图表和最新漏洞 -->
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
|
||||
<!-- 漏洞趋势图表 -->
|
||||
<div class="lg:col-span-1 bg-white rounded-xl shadow-soft p-6">
|
||||
<h3 class="text-lg font-semibold mb-6 text-primary" data-i18n="chart_vuln_trends">Vulnerability Trends</h3>
|
||||
<div class="h-64">
|
||||
<canvas id="trendsChart"></canvas>
|
||||
</div>
|
||||
<div class="mt-4 flex justify-center space-x-6 text-sm">
|
||||
<div class="flex items-center">
|
||||
<span class="w-3 h-3 bg-danger rounded-full mr-2"></span>
|
||||
<span data-i18n="severity_critical">Critical</span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<span class="w-3 h-3 bg-warning rounded-full mr-2"></span>
|
||||
<span data-i18n="severity_medium">Medium</span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<span class="w-3 h-3 bg-success rounded-full mr-2"></span>
|
||||
<span data-i18n="severity_low">Low</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 漏洞严重性分布 -->
|
||||
<div class="lg:col-span-1 bg-white rounded-xl shadow-soft p-6">
|
||||
<h3 class="text-lg font-semibold mb-6 text-primary" data-i18n="chart_severity_dist">Severity Distribution</h3>
|
||||
<div class="h-64">
|
||||
<canvas id="severityChart"></canvas>
|
||||
</div>
|
||||
<div class="mt-4 grid grid-cols-3 gap-2 text-center text-sm">
|
||||
<div>
|
||||
<div class="font-bold text-danger">11%</div>
|
||||
<div data-i18n="severity_critical">Critical</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-bold text-warning">45%</div>
|
||||
<div data-i18n="severity_medium">Medium</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-bold text-success">44%</div>
|
||||
<div data-i18n="severity_low">Low</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 热门CWE类别 -->
|
||||
<div class="lg:col-span-1 bg-white rounded-xl shadow-soft p-6">
|
||||
<h3 class="text-lg font-semibold mb-6 text-primary" data-i18n="chart_top_cwe">Top CWE Categories</h3>
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<div class="flex justify-between mb-1 text-sm">
|
||||
<span>CWE-79 (XSS)</span>
|
||||
<span>1,842</span>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-2">
|
||||
<div class="bg-secondary h-2 rounded-full" style="width: 85%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex justify-between mb-1 text-sm">
|
||||
<span>CWE-89 (SQL Injection)</span>
|
||||
<span>1,567</span>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-2">
|
||||
<div class="bg-secondary h-2 rounded-full" style="width: 72%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex justify-between mb-1 text-sm">
|
||||
<span>CWE-20 (Input Validation)</span>
|
||||
<span>1,245</span>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-2">
|
||||
<div class="bg-secondary h-2 rounded-full" style="width: 58%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex justify-between mb-1 text-sm">
|
||||
<span>CWE-352 (CSRF)</span>
|
||||
<span>987</span>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-2">
|
||||
<div class="bg-secondary h-2 rounded-full" style="width: 45%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="flex justify-between mb-1 text-sm">
|
||||
<span>CWE-434 (File Upload)</span>
|
||||
<span>765</span>
|
||||
</div>
|
||||
<div class="w-full bg-gray-200 rounded-full h-2">
|
||||
<div class="bg-secondary h-2 rounded-full" style="width: 35%"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 最新SVE漏洞 -->
|
||||
<section class="mb-12">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<h2 class="text-2xl font-bold text-primary" data-i18n="latest_sve">Latest SVE Entries</h2>
|
||||
<a href="#" class="text-secondary hover:text-primary transition-colors font-medium flex items-center">
|
||||
<span data-i18n="view_all">View All</span> <i class="fa fa-angle-right ml-2"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full bg-white rounded-xl shadow-soft">
|
||||
<thead>
|
||||
<tr class="border-b border-gray-200">
|
||||
<th class="text-left py-4 px-6 text-neutral font-semibold" data-i18n="table_sve_id">SVE ID</th>
|
||||
<th class="text-left py-4 px-6 text-neutral font-semibold" data-i18n="table_title">Title</th>
|
||||
<th class="text-left py-4 px-6 text-neutral font-semibold" data-i18n="table_severity">Severity</th>
|
||||
<th class="text-left py-4 px-6 text-neutral font-semibold" data-i18n="table_published">Published</th>
|
||||
<th class="text-left py-4 px-6 text-neutral font-semibold" data-i18n="table_cwe">CWE</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="border-b border-gray-100 hover:bg-gray-50 transition-colors">
|
||||
<td class="py-4 px-6">
|
||||
<a href="https://www.gvsds.org/SVE/SVE-2025-00001" class="text-secondary hover:underline font-medium">SVE-2025-00001</a>
|
||||
</td>
|
||||
<td class="py-4 px-6 max-w-xs">
|
||||
<a href="#" class="text-dark hover:text-secondary transition-colors" data-i18n="vuln_title_1">Remote Code Execution in CloudPlatform v4.2.1</a>
|
||||
</td>
|
||||
<td class="py-4 px-6">
|
||||
<span class="px-2 py-1 rounded-full bg-danger/10 text-danger text-xs font-medium" data-i18n="severity_critical">CRITICAL</span>
|
||||
</td>
|
||||
<td class="py-4 px-6 text-neutral">2023-08-28</td>
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline">CWE-78</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-b border-gray-100 hover:bg-gray-50 transition-colors">
|
||||
<td class="py-4 px-6">
|
||||
<a href="https://www.gvsds.org/SVE/SVE-2025-00001" class="text-secondary hover:underline font-medium">SVE-2025-00001</a>
|
||||
</td>
|
||||
<td class="py-4 px-6 max-w-xs">
|
||||
<a href="#" class="text-dark hover:text-secondary transition-colors" data-i18n="vuln_title_2">Privilege Escalation in AuthService v2.5.0</a>
|
||||
</td>
|
||||
<td class="py-4 px-6">
|
||||
<span class="px-2 py-1 rounded-full bg-danger/10 text-danger text-xs font-medium" data-i18n="severity_critical">CRITICAL</span>
|
||||
</td>
|
||||
<td class="py-4 px-6 text-neutral">2023-08-27</td>
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline">CWE-269</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-b border-gray-100 hover:bg-gray-50 transition-colors">
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline font-medium">SVE-2023-56787</a>
|
||||
</td>
|
||||
<td class="py-4 px-6 max-w-xs">
|
||||
<a href="#" class="text-dark hover:text-secondary transition-colors" data-i18n="vuln_title_3">Information Disclosure in DataManager</a>
|
||||
</td>
|
||||
<td class="py-4 px-6">
|
||||
<span class="px-2 py-1 rounded-full bg-warning/10 text-warning text-xs font-medium" data-i18n="severity_medium">MEDIUM</span>
|
||||
</td>
|
||||
<td class="py-4 px-6 text-neutral">2023-08-26</td>
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline">CWE-200</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-b border-gray-100 hover:bg-gray-50 transition-colors">
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline font-medium">SVE-2023-45678</a>
|
||||
</td>
|
||||
<td class="py-4 px-6 max-w-xs">
|
||||
<a href="#" class="text-dark hover:text-secondary transition-colors" data-i18n="vuln_title_4">Cross-Site Scripting in WebFramework v2.3.0</a>
|
||||
</td>
|
||||
<td class="py-4 px-6">
|
||||
<span class="px-2 py-1 rounded-full bg-warning/10 text-warning text-xs font-medium" data-i18n="severity_medium">MEDIUM</span>
|
||||
</td>
|
||||
<td class="py-4 px-6 text-neutral">2023-08-25</td>
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline">CWE-79</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="hover:bg-gray-50 transition-colors">
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline font-medium">SVE-2023-56786</a>
|
||||
</td>
|
||||
<td class="py-4 px-6 max-w-xs">
|
||||
<a href="#" class="text-dark hover:text-secondary transition-colors" data-i18n="vuln_title_5">Weak Password Policy in UserManager</a>
|
||||
</td>
|
||||
<td class="py-4 px-6">
|
||||
<span class="px-2 py-1 rounded-full bg-success/10 text-success text-xs font-medium" data-i18n="severity_low">LOW</span>
|
||||
</td>
|
||||
<td class="py-4 px-6 text-neutral">2023-08-24</td>
|
||||
<td class="py-4 px-6">
|
||||
<a href="#" class="text-secondary hover:underline">CWE-521</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 资源和链接 -->
|
||||
<section class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 transform hover:-translate-y-1 transition-transform">
|
||||
<div class="bg-primary/10 w-12 h-12 rounded-lg flex items-center justify-center mb-4">
|
||||
<i class="fa fa-file text-primary text-xl"></i>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold mb-2 text-primary" data-i18n="resource_doc">Documentation</h3>
|
||||
<p class="text-neutral mb-4" data-i18n="resource_doc_desc">Learn how to use the SVE database, understand vulnerability metrics, and interpret security ratings.</p>
|
||||
<a href="#" class="text-secondary hover:text-primary transition-colors font-medium flex items-center">
|
||||
<span data-i18n="read_doc">Read Documentation</span> <i class="fa fa-arrow-right ml-2"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 transform hover:-translate-y-1 transition-transform">
|
||||
<div class="bg-secondary/10 w-12 h-12 rounded-lg flex items-center justify-center mb-4">
|
||||
<i class="fa fa-code text-secondary text-xl"></i>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold mb-2 text-primary" data-i18n="resource_api">API Access</h3>
|
||||
<p class="text-neutral mb-4" data-i18n="resource_api_desc">Integrate SVE data into your applications with our comprehensive REST API and developer tools.</p>
|
||||
<a href="#" class="text-secondary hover:text-primary transition-colors font-medium flex items-center">
|
||||
<span data-i18n="explore_api">Explore API</span> <i class="fa fa-arrow-right ml-2"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 transform hover:-translate-y-1 transition-transform">
|
||||
<div class="bg-success/10 w-12 h-12 rounded-lg flex items-center justify-center mb-4">
|
||||
<i class="fa fa-flag text-success text-xl"></i>
|
||||
</div>
|
||||
<h3 class="text-lg font-semibold mb-2 text-primary" data-i18n="resource_report">Report Vulnerability</h3>
|
||||
<p class="text-neutral mb-4" data-i18n="resource_report_desc">Submit a new security vulnerability for inclusion in the SVE database after verification.</p>
|
||||
<a href="#" class="text-secondary hover:text-primary transition-colors font-medium flex items-center">
|
||||
<span data-i18n="submit_report">Submit Report</span> <i class="fa fa-arrow-right ml-2"></i>
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<!-- 订阅区域 --
|
||||
<section class="bg-light py-12 border-y border-gray-200">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="max-w-3xl mx-auto text-center">
|
||||
<h2 class="text-2xl font-bold text-primary mb-3" data-i18n="subscribe_title">Stay Updated on Security Vulnerabilities</h2>
|
||||
<p class="text-neutral mb-6" data-i18n="subscribe_desc">Subscribe to our newsletter to receive weekly updates on new vulnerabilities, patches, and security trends.</p>
|
||||
|
||||
<form class="flex flex-col sm:flex-row gap-3 max-w-xl mx-auto">
|
||||
<input type="email" placeholder="Your email address" class="flex-grow px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="email_placeholder">
|
||||
<button type="submit" class="bg-secondary hover:bg-secondary/90 text-white font-medium py-3 px-6 rounded-lg transition-colors whitespace-nowrap" data-i18n="subscribe_btn">
|
||||
Subscribe Now
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p class="text-xs text-neutral mt-4" data-i18n="privacy_note">We respect your privacy. Unsubscribe at any time.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section-->
|
||||
|
||||
<!-- 页脚 -->
|
||||
<footer class="bg-white py-12">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2 mb-4">
|
||||
<i class="fa fa-shield text-primary text-xl"></i>
|
||||
<span class="text-lg font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-4" data-i18n="footer_desc">A comprehensive database of security vulnerabilities and exposures, maintained by the Security Research Team.</p>
|
||||
<div class="flex space-x-4">
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-twitter"></i>
|
||||
</a>
|
||||
<a href="https://www.gvsds.com/GVSDS/" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-github"></i>
|
||||
</a>
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-linkedin"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_resources">Resources</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="api">API</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="bulk_data">Bulk Data</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="statistics">Statistics</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_information">Information</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about_sve">About SVE</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="cve_compatibility">CVE Compatibility</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="vuln_metrics">Vulnerability Metrics</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="faq">FAQ</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_contact">Contact</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-envelope text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.com" class="text-neutral hover:text-secondary transition-colors">sve@gvsds.com</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-file-text text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.org?subject=[WARNING]%20Report%20A%20Vulnerability%20!" class="text-neutral hover:text-secondary transition-colors" data-i18n="report_vuln">Report a Vulnerability</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-info-circle text-secondary mt-1 mr-2"></i>
|
||||
<a href="https://doc.gvsds.com/6e845a45fc493c66a23a9361bce1464d" class="text-neutral hover:text-secondary transition-colors" data-i18n="security_policy">Security Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-gray-200 mt-8 pt-6 flex flex-col md:flex-row justify-between items-center">
|
||||
<p class="text-sm text-neutral" data-i18n="copyright">© 2025 SVE Database. All rights reserved.</p>
|
||||
<div class="flex space-x-6 mt-4 md:mt-0 text-sm">
|
||||
<a href="https://doc.gvsds.com/fc084ab20a283208adb19033ca4de173" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="privacy_policy">Privacy Policy</a>
|
||||
<a href="https://doc.gvsds.com/1f07d3b8cec43a2ab9892a15b150bdd6" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="terms_service">Terms of Service</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="/assets/js/i18n.js"></script>
|
||||
<script src="/assets/js/index.js"></script>
|
||||
<script>
|
||||
// 通用搜索处理函数
|
||||
function handleSearch(inputElement) {
|
||||
const query = inputElement.value.trim();
|
||||
if (query) {
|
||||
window.open(`/query.html?title=${encodeURIComponent(query)}`);
|
||||
}
|
||||
}
|
||||
|
||||
// 1. 顶部导航栏搜索框(回车触发)
|
||||
const desktopSearch = document.getElementById('desktop-search');
|
||||
if (desktopSearch) {
|
||||
desktopSearch.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
handleSearch(desktopSearch);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 2. 英雄区域搜索框(点击按钮 + 回车触发)
|
||||
const heroSearch = document.getElementById('hero-search');
|
||||
const heroSearchBtn = document.getElementById('hero-search-btn');
|
||||
|
||||
if (heroSearch && heroSearchBtn) {
|
||||
// 点击搜索按钮
|
||||
heroSearchBtn.addEventListener('click', () => {
|
||||
handleSearch(heroSearch);
|
||||
});
|
||||
|
||||
// 回车触发搜索
|
||||
heroSearch.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
handleSearch(heroSearch);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 保留原有页面其他脚本(移动端菜单、图表等)
|
||||
// ... 原有 index.js 中的其他逻辑 ...
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,409 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title id="pageTitle" data-i18n="sve_list_title">SVE漏洞列表 - SVE Database</title>
|
||||
<script src="https://tailwind.gvsds.com"></script>
|
||||
<link href="https://cdn.gvsds.com/font-awesome/css/all.min.css" rel="stylesheet" media="print" onload="this.media='all'">
|
||||
<script src="https://cdn.gvsds.com/Chart.js/dist/chart.umd.js"></script>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'">
|
||||
|
||||
<!-- Tailwind配置 -->
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#0F3460',
|
||||
secondary: '#1A73E8',
|
||||
danger: '#D93025',
|
||||
warning: '#F4B400',
|
||||
success: '#1E8E3E',
|
||||
neutral: '#5F6368',
|
||||
light: '#F8F9FA',
|
||||
dark: '#202124'
|
||||
},
|
||||
fontFamily: {
|
||||
inter: ['Inter', 'sans-serif'],
|
||||
},
|
||||
animation: {
|
||||
'fade-in': 'fadeIn 0.3s ease-in-out',
|
||||
'slide-up': 'slideUp 0.4s ease-out',
|
||||
},
|
||||
keyframes: {
|
||||
fadeIn: {
|
||||
'0%': { opacity: '0' },
|
||||
'100%': { opacity: '1' },
|
||||
},
|
||||
slideUp: {
|
||||
'0%': { transform: 'translateY(10px)', opacity: '0' },
|
||||
'100%': { transform: 'translateY(0)', opacity: '1' },
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/tailwindcss">
|
||||
@layer utilities {
|
||||
.content-auto {
|
||||
content-visibility: auto;
|
||||
}
|
||||
.shadow-soft {
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.shadow-hover {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.shadow-hover:hover {
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
.severity-badge {
|
||||
@apply px-2 py-1 rounded-full text-xs font-medium;
|
||||
}
|
||||
.filter-card {
|
||||
@apply bg-white rounded-lg shadow-soft p-4 mb-4 animate-fade-in;
|
||||
}
|
||||
.lang-switch-btn {
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.lang-switch-btn.active {
|
||||
background-color: #1A73E8;
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
}
|
||||
.lang-switch-btn.inactive {
|
||||
background-color: #F8F9FA;
|
||||
color: #5F6368;
|
||||
}
|
||||
.lang-switch-btn.inactive:hover {
|
||||
background-color: #E8F0FE;
|
||||
color: #1A73E8;
|
||||
}
|
||||
.pagination-btn {
|
||||
@apply px-3 py-1.5 rounded-md border border-gray-300 text-neutral hover:bg-light transition-colors;
|
||||
}
|
||||
.pagination-btn.active {
|
||||
@apply bg-secondary text-white border-secondary;
|
||||
}
|
||||
.input-focus {
|
||||
@apply focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="font-inter bg-gray-50 text-dark">
|
||||
<!-- 顶部导航栏 -->
|
||||
<header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<div class="flex items-center space-x-2">
|
||||
<i class="fa fa-shield text-primary text-2xl"></i>
|
||||
<span class="text-xl font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
|
||||
<!-- 桌面端语言切换按钮组 -->
|
||||
<div class="hidden md:flex items-center space-x-2 mr-4">
|
||||
<button id="lang-en" class="lang-switch-btn active">English</button>
|
||||
<button id="lang-zh" class="lang-switch-btn inactive">中文</button>
|
||||
</div>
|
||||
|
||||
<nav class="hidden md:flex items-center space-x-8">
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
|
||||
<div class="flex items-center space-x-4">
|
||||
<!-- 移动端语言切换 -->
|
||||
<div class="hidden sm:flex items-center space-x-2 mr-2" id="mobile-lang-switch">
|
||||
<button id="mobile-lang-en" class="lang-switch-btn active text-xs">EN</button>
|
||||
<button id="mobile-lang-zh" class="lang-switch-btn inactive text-xs">中文</button>
|
||||
</div>
|
||||
|
||||
<div class="relative hidden md:block">
|
||||
<input type="text" placeholder="Search SVE..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 input-focus w-64 transition-all" data-i18n-placeholder="search_sve_placeholder">
|
||||
<i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
||||
</div>
|
||||
<button class="md:hidden text-neutral hover:text-primary">
|
||||
<i class="fa fa-search text-xl"></i>
|
||||
</button>
|
||||
<button class="md:hidden text-neutral hover:text-primary" id="mobile-menu-btn">
|
||||
<i class="fa fa-bars text-xl"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 移动端导航菜单 -->
|
||||
<div class="md:hidden hidden bg-white border-t border-gray-100 py-3" id="mobile-menu">
|
||||
<nav class="flex flex-col space-y-3 px-2">
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 主内容区 -->
|
||||
<main class="container mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<!-- 页面标题与统计 -->
|
||||
<div class="mb-8 animate-slide-up">
|
||||
<h1 class="text-2xl md:text-3xl font-bold text-primary mb-2" data-i18n="sve_list_title">SVE漏洞列表</h1>
|
||||
<p class="text-neutral" data-i18n="sve_list_desc">
|
||||
展示所有已公开的SVE漏洞信息,支持多维度筛选和分页查询
|
||||
</p>
|
||||
<div class="flex flex-wrap items-center gap-4 mt-4 text-sm">
|
||||
<span class="text-neutral" data-i18n="total_vulns">总漏洞数:</span>
|
||||
<span class="font-semibold text-primary" id="totalVulns">0</span>
|
||||
<span class="text-neutral ml-4" data-i18n="current_page">当前页:</span>
|
||||
<span class="font-semibold text-primary" id="currentPageInfo">1 / 0</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 筛选区域 -->
|
||||
<div class="mb-8 animate-fade-in">
|
||||
<button id="toggleFilterBtn" class="flex items-center text-secondary hover:text-primary transition-colors mb-4">
|
||||
<i class="fa fa-filter mr-2"></i>
|
||||
<span data-i18n="advanced_filter">高级筛选</span>
|
||||
<i class="fa fa-chevron-down ml-2 transition-transform duration-300" id="filterChevron"></i>
|
||||
</button>
|
||||
|
||||
<!-- 筛选面板 -->
|
||||
<div id="filterPanel" class="hidden bg-white rounded-xl shadow-soft p-6 mb-6">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
||||
<!-- 1. 标题搜索 -->
|
||||
<div class="filter-card">
|
||||
<label class="block text-sm font-medium text-neutral mb-2" data-i18n="filter_title">漏洞标题</label>
|
||||
<div class="relative">
|
||||
<input type="text" id="filterTitle" placeholder="输入关键词搜索"
|
||||
class="w-full px-4 py-2 rounded-lg border border-gray-300 input-focus text-sm"
|
||||
data-i18n-placeholder="filter_title_placeholder">
|
||||
<i class="fa fa-search absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 2. CVSS严重级别筛选 -->
|
||||
<div class="filter-card">
|
||||
<label class="block text-sm font-medium text-neutral mb-2" data-i18n="filter_cvss_severity">CVSS严重级别</label>
|
||||
<select id="filterCvssSeverity" class="w-full px-4 py-2 rounded-lg border border-gray-300 input-focus text-sm">
|
||||
<option value="" data-i18n="filter_all">全部</option>
|
||||
<option value="CRITICAL" data-i18n="critical">严重(CRITICAL)</option>
|
||||
<option value="HIGH" data-i18n="high">高危(HIGH)</option>
|
||||
<option value="MEDIUM" data-i18n="medium">中等(MEDIUM)</option>
|
||||
<option value="LOW" data-i18n="low">低危(LOW)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 3. 发布年份筛选 -->
|
||||
<div class="filter-card">
|
||||
<label class="block text-sm font-medium text-neutral mb-2" data-i18n="filter_publish_year">发布年份</label>
|
||||
<select id="filterPublishYear" class="w-full px-4 py-2 rounded-lg border border-gray-300 input-focus text-sm">
|
||||
<option value="" data-i18n="filter_all">全部</option>
|
||||
<!-- 动态生成近5年选项 -->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 4. 每页条数 -->
|
||||
<div class="filter-card">
|
||||
<label class="block text-sm font-medium text-neutral mb-2" data-i18n="filter_page_size">每页条数</label>
|
||||
<select id="filterPageSize" class="w-full px-4 py-2 rounded-lg border border-gray-300 input-focus text-sm">
|
||||
<option value="10">10 条/页</option>
|
||||
<option value="20">20 条/页</option>
|
||||
<option value="50">50 条/页</option>
|
||||
<option value="100">100 条/页</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 5. CVSS具体参数:攻击向量 -->
|
||||
<div class="filter-card">
|
||||
<label class="block text-sm font-medium text-neutral mb-2" data-i18n="attack_vector">攻击向量(AV)</label>
|
||||
<select id="filterCvssAv" class="w-full px-4 py-2 rounded-lg border border-gray-300 input-focus text-sm">
|
||||
<option value="" data-i18n="filter_all">全部</option>
|
||||
<option value="N" data-i18n="av_network">网络(N)</option>
|
||||
<option value="A" data-i18n="av_adjacent">相邻网络(A)</option>
|
||||
<option value="L" data-i18n="av_local">本地(L)</option>
|
||||
<option value="P" data-i18n="av_physical">物理(P)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 6. CVSS具体参数:攻击复杂度 -->
|
||||
<div class="filter-card">
|
||||
<label class="block text-sm font-medium text-neutral mb-2" data-i18n="attack_complexity">攻击复杂度(AC)</label>
|
||||
<select id="filterCvssAc" class="w-full px-4 py-2 rounded-lg border border-gray-300 input-focus text-sm">
|
||||
<option value="" data-i18n="filter_all">全部</option>
|
||||
<option value="L" data-i18n="ac_low">低(L)</option>
|
||||
<option value="H" data-i18n="ac_high">高(H)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 7. CVSS具体参数:所需权限 -->
|
||||
<div class="filter-card">
|
||||
<label class="block text-sm font-medium text-neutral mb-2" data-i18n="privileges_required">所需权限(PR)</label>
|
||||
<select id="filterCvssPr" class="w-full px-4 py-2 rounded-lg border border-gray-300 input-focus text-sm">
|
||||
<option value="" data-i18n="filter_all">全部</option>
|
||||
<option value="N" data-i18n="pr_none">无(N)</option>
|
||||
<option value="L" data-i18n="pr_low">低(L)</option>
|
||||
<option value="H" data-i18n="pr_high">高(H)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 8. 筛选按钮 -->
|
||||
<div class="filter-card flex items-end">
|
||||
<button id="applyFilterBtn" class="w-full bg-secondary hover:bg-secondary/90 text-white font-medium py-2 px-4 rounded-lg transition-colors text-sm" data-i18n="apply_filter">
|
||||
应用筛选
|
||||
</button>
|
||||
<button id="resetFilterBtn" class="w-full mt-2 text-neutral hover:text-danger transition-colors text-sm" data-i18n="reset_filter">
|
||||
重置筛选
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 漏洞列表区域 -->
|
||||
<div class="bg-white rounded-xl shadow-soft overflow-hidden animate-fade-in">
|
||||
<!-- 列表表头 -->
|
||||
<div class="hidden md:grid grid-cols-12 bg-gray-50 py-3 px-6 border-b border-gray-200 font-medium text-sm">
|
||||
<div class="col-span-2" data-i18n="sve_id">SVE ID</div>
|
||||
<div class="col-span-4" data-i18n="vuln_title">漏洞标题</div>
|
||||
<div class="col-span-2" data-i18n="cvss_score">CVSS评分</div>
|
||||
<div class="col-span-2" data-i18n="severity">严重级别</div>
|
||||
<div class="col-span-2" data-i18n="publish_date">发布日期</div>
|
||||
<div class="col-span-2" data-i18n="actions">操作</div>
|
||||
</div>
|
||||
|
||||
<!-- 列表内容 -->
|
||||
<div id="vulnList" class="divide-y divide-gray-200">
|
||||
<!-- 加载状态 -->
|
||||
<div id="loadingIndicator" class="py-12 text-center">
|
||||
<div class="inline-block animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-secondary mb-4"></div>
|
||||
<p class="text-neutral" data-i18n="loading_data">加载数据中...</p>
|
||||
</div>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<div id="emptyState" class="py-16 text-center hidden">
|
||||
<i class="fa fa-search text-4xl text-gray-300 mb-4"></i>
|
||||
<p class="text-neutral" data-i18n="no_results">未找到符合条件的漏洞</p>
|
||||
<button id="emptyResetBtn" class="mt-4 text-secondary hover:text-primary transition-colors text-sm" data-i18n="reset_filters">
|
||||
重置筛选条件
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 错误状态 -->
|
||||
<div id="errorState" class="py-16 text-center hidden">
|
||||
<i class="fa fa-exclamation-circle text-4xl text-danger mb-4"></i>
|
||||
<p class="text-neutral" data-i18n="load_error">数据加载失败</p>
|
||||
<button id="retryBtn" class="mt-4 bg-secondary hover:bg-secondary/90 text-white font-medium py-2 px-4 rounded-lg transition-colors text-sm" data-i18n="retry">
|
||||
重试
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 漏洞列表项将动态插入这里 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 分页控件 -->
|
||||
<div class="mt-8 flex flex-col sm:flex-row justify-between items-center gap-4 animate-fade-in">
|
||||
<div class="text-sm text-neutral" data-i18n="showing_results">
|
||||
<span id="showingFrom">1</span> - <span id="showingTo">10</span> 条,共 <span id="totalResults">0</span> 条
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<button id="prevPageBtn" class="pagination-btn" disabled>
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
</button>
|
||||
<div id="paginationNumbers" class="flex items-center gap-1">
|
||||
<!-- 页码将动态生成 -->
|
||||
</div>
|
||||
<button id="nextPageBtn" class="pagination-btn" disabled>
|
||||
<i class="fa fa-chevron-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 页脚 -->
|
||||
<footer class="bg-white py-12 mt-12">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2 mb-4">
|
||||
<i class="fa fa-shield text-primary text-xl"></i>
|
||||
<span class="text-lg font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-4" data-i18n="footer_desc">A comprehensive database of security vulnerabilities and exposures, maintained by the Security Research Team.</p>
|
||||
<div class="flex space-x-4">
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-twitter"></i>
|
||||
</a>
|
||||
<a href="https://www.gvsds.com/GVSDS/" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-github"></i>
|
||||
</a>
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-linkedin"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_resources">Resources</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="api">API</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="bulk_data">Bulk Data</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="statistics">Statistics</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_information">Information</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about_sve">About SVE</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="cve_compatibility">CVE Compatibility</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="vuln_metrics">Vulnerability Metrics</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="faq">FAQ</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_contact">Contact</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-envelope text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.com" class="text-neutral hover:text-secondary transition-colors">sve@gvsds.com</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-file-text text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.org?subject=[WARNING]%20Report%20A%20Vulnerability%20!" class="text-neutral hover:text-secondary transition-colors" data-i18n="report_vuln">Report a Vulnerability</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-info-circle text-secondary mt-1 mr-2"></i>
|
||||
<a href="https://doc.gvsds.com/6e845a45fc493c66a23a9361bce1464d" class="text-neutral hover:text-secondary transition-colors" data-i18n="security_policy" target="_blank">Security Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-gray-200 mt-8 pt-6 flex flex-col md:flex-row justify-between items-center">
|
||||
<p class="text-sm text-neutral" data-i18n="copyright">© 2025 SVE Database. All rights reserved.</p>
|
||||
<div class="flex space-x-6 mt-4 md:mt-0 text-sm">
|
||||
<a href="https://doc.gvsds.com/fc084ab20a283208adb19033ca4de173" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="privacy_policy">Privacy Policy</a>
|
||||
<a href="https://doc.gvsds.com/1f07d3b8cec43a2ab9892a15b150bdd6" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="terms_service">Terms of Service</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/assets/js/i18n.js"></script>
|
||||
<script src="/assets/js/query.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,444 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title id="pageTitle">SVE Details - SVE Database</title>
|
||||
<script src="https://tailwind.gvsds.com"></script>
|
||||
<link href="https://cdn.gvsds.com/font-awesome/css/all.min.css" rel="stylesheet" media="print" onload="this.media='all'">
|
||||
<script src="https://cdn.gvsds.com/Chart.js/dist/chart.umd.js"></script>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/marked/4.0.0/marked.min.js"></script>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/prism/1.29.0/prism.min.js"></script>
|
||||
<link href="https://cdn.bootcdn.net/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet" media="print" onload="this.media='all'">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'">
|
||||
<link rel="stylesheet" href="https://cdn.gvsds.com/highlight.js/styles/github.min.css" media="print" onload="this.media='all'">
|
||||
<script src="https://cdn.gvsds.com/highlight.js/highlight.min.js"></script>
|
||||
|
||||
<!-- 需要添加的额外库 -->
|
||||
<script src="https://cdn.gvsds.com/KaTeX/0.16.9/katex.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.gvsds.com/KaTeX/0.16.9/katex.min.css" media="print" onload="this.media='all'">
|
||||
<script src="https://cdn.gvsds.com/mermaid/11.5.0/mermaid.min.js"></script>
|
||||
<script defer src="https://cdn.gvsds.com/KaTeX/0.16.9/contrib/auto-render.min.js" ></script>
|
||||
|
||||
<!-- Tailwind配置 -->
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#0F3460',
|
||||
secondary: '#1A73E8',
|
||||
danger: '#D93025',
|
||||
warning: '#F4B400',
|
||||
success: '#1E8E3E',
|
||||
neutral: '#5F6368',
|
||||
light: '#F8F9FA',
|
||||
dark: '#202124'
|
||||
},
|
||||
fontFamily: {
|
||||
inter: ['Inter', 'sans-serif'],
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/tailwindcss">
|
||||
@layer utilities {
|
||||
.content-auto {
|
||||
content-visibility: auto;
|
||||
}
|
||||
.shadow-soft {
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
/* 语言切换按钮样式 */
|
||||
.lang-switch-btn {
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.lang-switch-btn.active {
|
||||
background-color: #1A73E8;
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
}
|
||||
.lang-switch-btn.inactive {
|
||||
background-color: #F8F9FA;
|
||||
color: #5F6368;
|
||||
}
|
||||
.lang-switch-btn.inactive:hover {
|
||||
background-color: #E8F0FE;
|
||||
color: #1A73E8;
|
||||
}
|
||||
/* 列表项样式 */
|
||||
.list-item-bullet {
|
||||
position: relative;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
.list-item-bullet::before {
|
||||
content: "•";
|
||||
position: absolute;
|
||||
left: 0.5rem;
|
||||
color: #5F6368;
|
||||
}
|
||||
.markdown-content * {
|
||||
@apply text-black;
|
||||
}
|
||||
|
||||
.markdown-content h2 {
|
||||
@apply text-2xl font-bold text-black mt-8 mb-4 border-b border-gray-200 dark:border-gray-700 pb-2;
|
||||
}
|
||||
|
||||
.markdown-content h3 {
|
||||
@apply text-xl font-bold text-black mt-6 mb-3;
|
||||
}
|
||||
|
||||
.markdown-content p {
|
||||
@apply text-black mb-4 leading-relaxed;
|
||||
}
|
||||
|
||||
.markdown-content a {
|
||||
@apply text-primary hover:underline;
|
||||
}
|
||||
|
||||
.markdown-content pre {
|
||||
@apply bg-[#181a1f] rounded-lg p-4 my-4 overflow-x-auto relative border border-gray-200 dark:border-gray-700;
|
||||
}
|
||||
|
||||
.markdown-content pre::before {
|
||||
content: '';
|
||||
}
|
||||
|
||||
.code-title {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
font-size: 0.8rem;
|
||||
color: #999;
|
||||
background-color: #181a1f;
|
||||
padding: 0.1rem 0.3rem;
|
||||
border-radius: 0.2rem 0.2rem 0 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.markdown-content code {
|
||||
background-color: #181a1f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.markdown-content .copy-btn i {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.markdown-content ul {
|
||||
@apply list-disc pl-5 mb-4 text-gray-700 dark:text-gray-300;
|
||||
}
|
||||
|
||||
.markdown-content ol {
|
||||
@apply list-decimal pl-5 mb-4 text-gray-700 dark:text-gray-300;
|
||||
}
|
||||
|
||||
.markdown-content blockquote {
|
||||
@apply border-l-4 border-primary dark:border-primary/70 pl-4 italic my-4 text-gray-600 dark:text-gray-400;
|
||||
}
|
||||
|
||||
/* 表格边框样式 */
|
||||
.markdown-content table {
|
||||
@apply border-collapse border border-gray-300 dark:border-gray-600 w-full;
|
||||
}
|
||||
|
||||
.markdown-content th,
|
||||
.markdown-content td {
|
||||
@apply border border-gray-300 dark:border-gray-600 p-2;
|
||||
}
|
||||
|
||||
/* 更多内嵌HTML卡片样式 */
|
||||
.html-card {
|
||||
@apply bg-gray-100 dark:bg-gray-700 p-4 rounded-md mb-4 shadow-md;
|
||||
}
|
||||
|
||||
.html-card-blue {
|
||||
@apply bg-blue-100 dark:bg-blue-800 p-4 rounded-md mb-4 shadow-md;
|
||||
}
|
||||
|
||||
.html-card-green {
|
||||
@apply bg-green-100 dark:bg-green-800 p-4 rounded-md mb-4 shadow-md;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="font-inter bg-gray-50 text-dark">
|
||||
<!-- 顶部导航栏(含语言切换) -->
|
||||
<header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<div class="flex items-center space-x-2">
|
||||
<i class="fa fa-shield text-primary text-2xl"></i>
|
||||
<span class="text-xl font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
|
||||
<!-- 桌面端语言切换按钮组 -->
|
||||
<div class="hidden md:flex items-center space-x-2 mr-4">
|
||||
<button id="lang-en" class="lang-switch-btn active">English</button>
|
||||
<button id="lang-zh" class="lang-switch-btn inactive">中文</button>
|
||||
</div>
|
||||
|
||||
<nav class="hidden md:flex items-center space-x-8">
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
|
||||
<div class="flex items-center space-x-4">
|
||||
<!-- 移动端语言切换(默认隐藏,汉堡菜单展开时显示) -->
|
||||
<div class="hidden sm:flex items-center space-x-2 mr-2" id="mobile-lang-switch">
|
||||
<button id="mobile-lang-en" class="lang-switch-btn active text-xs">EN</button>
|
||||
<button id="mobile-lang-zh" class="lang-switch-btn inactive text-xs">中文</button>
|
||||
</div>
|
||||
|
||||
<div class="relative hidden md:block">
|
||||
<input type="text" placeholder="Search SVE..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary w-64 transition-all" data-i18n-placeholder="search_sve_placeholder">
|
||||
<i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
||||
</div>
|
||||
<button class="md:hidden text-neutral hover:text-primary">
|
||||
<i class="fa fa-search text-xl"></i>
|
||||
</button>
|
||||
<button class="md:hidden text-neutral hover:text-primary" id="mobile-menu-btn">
|
||||
<i class="fa fa-bars text-xl"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 移动端导航菜单(默认隐藏) -->
|
||||
<div class="md:hidden hidden bg-white border-t border-gray-100 py-3" id="mobile-menu">
|
||||
<nav class="flex flex-col space-y-3 px-2">
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="about">About</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<!-- 主内容区 -->
|
||||
<main class="container mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<!-- 面包屑导航(工具文字i18n + 动态SVE数据) -->
|
||||
<div class="text-sm text-neutral mb-6">
|
||||
<a href="/" class="hover:text-secondary" data-i18n="home">Home</a> >
|
||||
<span class="text-dark font-medium" id="breadCrumbSveId">SVE-2025-00000</span>
|
||||
</div>
|
||||
|
||||
<!-- SVE标题和元数据(动态渲染) -->
|
||||
<div class="bg-white rounded-xl shadow-soft p-6 mb-8">
|
||||
<div class="flex flex-col lg:flex-row lg:items-start lg:justify-between gap-6">
|
||||
<div class="w-full lg:w-2/3 space-y-6">
|
||||
<div>
|
||||
<div class="flex items-center gap-3 mb-3">
|
||||
<h1 class="text-2xl md:text-3xl font-bold text-primary" id="sveIdDisplay">SVE-0000-00000</h1>
|
||||
<button id="copyBtn" class="text-neutral hover:text-secondary transition-colors" title="Copy SVE ID" data-i18n-title="copy_sve_id">
|
||||
<i class="fa fa-copy"></i>
|
||||
</button>
|
||||
<span id="copyMessage" class="text-success text-sm hidden" data-i18n="copied">Copied!</span>
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="text-xl md:text-2xl font-semibold text-dark mb-4 text-balance" style="word-wrap: break-word;" id="vulnTitle">TITLE...</h2>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-8 gap-y-2 text-sm text-neutral mb-2">
|
||||
<div class="flex items-center">
|
||||
<i class="fa fa-calendar mr-2 text-secondary"></i>
|
||||
<span data-i18n="published">Published:</span> <span class="text-dark font-medium" id="publishDate">2025-08-29</span>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<i class="fa fa-refresh mr-2 text-secondary"></i>
|
||||
<span data-i18n="last_modified">Last Modified:</span> <span class="text-dark font-medium" id="lastModified">2025-08-29</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 漏洞描述(动态渲染) -->
|
||||
<div>
|
||||
<h3 class="text-xl font-semibold mb-4 flex items-center" data-i18n="description">
|
||||
<i class="fa fa-info-circle text-secondary mr-2"></i>
|
||||
Description
|
||||
</h3>
|
||||
<div class="prose max-w-none text-neutral leading-relaxed markdown-content" id="vulnDescription">
|
||||
<!-- 动态渲染漏洞描述 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右侧 CVSS 评分卡片(动态渲染) -->
|
||||
<div class="bg-light rounded-lg p-5 border border-gray-200 w-full lg:w-auto flex-shrink-0">
|
||||
<div class="text-sm text-neutral mb-1" data-i18n="cvss_base_score">CVSS v3.1 Base Score</div>
|
||||
<div class="flex items-end gap-3 mb-2">
|
||||
<span class="text-3xl font-bold text-white" id="cvssScore">?.?</span>
|
||||
<span class="font-medium" id="cvssSeverity">???</span>
|
||||
</div>
|
||||
<div class="text-xs text-neutral">
|
||||
<span class="font-medium" data-i18n="vector">Vector:</span> <span id="cvssVector">CVSS:3.1/??</span>
|
||||
</div>
|
||||
<!-- 评分图表(动态渲染) -->
|
||||
<div class="mt-4 h-64">
|
||||
<canvas id="cvssChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 主要内容两栏布局(动态渲染) -->
|
||||
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
<!-- 左侧主内容 -->
|
||||
<div class="lg:col-span-2 space-y-8">
|
||||
<!-- 受影响的产品(动态渲染) -->
|
||||
<section class="bg-white rounded-xl shadow-soft p-6">
|
||||
<h3 class="text-xl font-semibold mb-4 flex items-center" data-i18n="affected_products">
|
||||
<i class="fa fa-exclamation-triangle text-warning mr-2"></i>
|
||||
Affected Products
|
||||
</h3>
|
||||
<ul class="space-y-3 text-neutral" id="affectedProductsList">
|
||||
<!-- 动态渲染受影响产品 -->
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<!-- 解决方案(动态渲染) -->
|
||||
<section class="bg-white rounded-xl shadow-soft p-6">
|
||||
<h3 class="text-xl font-semibold mb-4 flex items-center" data-i18n="solutions_mitigations">
|
||||
<i class="fa fa-wrench text-success mr-2"></i>
|
||||
Solutions and Mitigations
|
||||
</h3>
|
||||
<div class="prose max-w-none text-neutral markdown-content" id="solutionsContent">
|
||||
<!-- 动态渲染解决方案 -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 参考资料(动态渲染) -->
|
||||
<section class="bg-white rounded-xl shadow-soft p-6">
|
||||
<h3 class="text-xl font-semibold mb-4 flex items-center" data-i18n="references">
|
||||
<i class="fa fa-external-link text-secondary mr-2"></i>
|
||||
References
|
||||
</h3>
|
||||
<ul class="space-y-3 text-neutral" id="referencesList">
|
||||
<!-- 动态渲染参考资料 -->
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- 右侧边栏 -->
|
||||
<div class="space-y-8">
|
||||
<!-- 漏洞信息卡片(动态渲染) -->
|
||||
<div class="bg-white rounded-xl shadow-soft p-6">
|
||||
<h3 class="text-lg font-semibold mb-4 text-primary" data-i18n="vulnerability_details">Vulnerability Details</h3>
|
||||
|
||||
<div class="space-y-4 text-sm" id="vulnDetailsCard">
|
||||
<!-- 动态渲染漏洞详情 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 相关SVE(动态渲染,无数据时显示提示) -->
|
||||
<div class="bg-white rounded-xl shadow-soft p-6" id="relatedSvesContainer">
|
||||
<h3 class="text-lg font-semibold mb-4 text-primary" data-i18n="related_sve_entries">Related SVE Entries</h3>
|
||||
<div id="relatedSvesList">
|
||||
<!-- 动态渲染相关SVE,无数据时显示提示 -->
|
||||
</div>
|
||||
<button class="mt-4 text-sm text-secondary hover:text-primary transition-colors font-medium hidden" id="viewAllRelatedBtn" data-i18n="view_all_related">
|
||||
View All Related <i class="fa fa-angle-right ml-1"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 订阅更新 --
|
||||
<div class="bg-primary/5 rounded-xl p-6 border border-primary/10">
|
||||
<h3 class="text-lg font-semibold mb-3 text-primary" data-i18n="get_updates">Get Updates</h3>
|
||||
<p class="text-sm text-neutral mb-4" data-i18n="subscribe_desc">Subscribe to receive notifications about changes to this SVE entry.</p>
|
||||
<form class="space-y-3">
|
||||
<input type="email" placeholder="Your email address" class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary text-sm" data-i18n-placeholder="email_placeholder">
|
||||
<button type="submit" class="w-full bg-secondary hover:bg-secondary/90 text-white font-medium py-2 px-4 rounded-lg transition-colors text-sm" data-i18n="subscribe">
|
||||
Subscribe
|
||||
</button>
|
||||
</form>
|
||||
</div-->
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 页脚 -->
|
||||
<footer class="bg-white py-12">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2 mb-4">
|
||||
<i class="fa fa-shield text-primary text-xl"></i>
|
||||
<span class="text-lg font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-4" data-i18n="footer_desc">A comprehensive database of security vulnerabilities and exposures, maintained by the Security Research Team.</p>
|
||||
<div class="flex space-x-4">
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-twitter"></i>
|
||||
</a>
|
||||
<a href="https://www.gvsds.com/GVSDS/" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-github"></i>
|
||||
</a>
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa-brands fa-linkedin"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_resources">Resources</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="api">API</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="bulk_data">Bulk Data</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="statistics">Statistics</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_information">Information</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about_sve">About SVE</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="cve_compatibility">CVE Compatibility</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="vuln_metrics">Vulnerability Metrics</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="faq">FAQ</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_contact">Contact</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-envelope text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.com" class="text-neutral hover:text-secondary transition-colors">sve@gvsds.com</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-file-text text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.org?subject=[WARNING]%20Report%20A%20Vulnerability%20!" class="text-neutral hover:text-secondary transition-colors" data-i18n="report_vuln">Report a Vulnerability</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-info-circle text-secondary mt-1 mr-2"></i>
|
||||
<a href="https://doc.gvsds.com/6e845a45fc493c66a23a9361bce1464d" class="text-neutral hover:text-secondary transition-colors" data-i18n="security_policy" target="_blank">Security Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-gray-200 mt-8 pt-6 flex flex-col md:flex-row justify-between items-center">
|
||||
<p class="text-sm text-neutral" data-i18n="copyright">© 2025 SVE Database. All rights reserved.</p>
|
||||
<div class="flex space-x-6 mt-4 md:mt-0 text-sm">
|
||||
<a href="https://doc.gvsds.com/fc084ab20a283208adb19033ca4de173" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="privacy_policy">Privacy Policy</a>
|
||||
<a href="https://doc.gvsds.com/1f07d3b8cec43a2ab9892a15b150bdd6" target="_blank" class="text-neutral hover:text-secondary transition-colors" data-i18n="terms_service">Terms of Service</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/assets/js/i18n.js"></script>
|
||||
<script src="/assets/js/template.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,598 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Create New SVE Entry - SVE Database</title>
|
||||
<script src="https://tailwind.gvsds.com"></script>
|
||||
<link href="https://cdn.gvsds.com/font-awesome/css/all.min.css" rel="stylesheet">
|
||||
<script src="https://cdn.gvsds.com/Chart.js/dist/chart.umd.js"></script>
|
||||
<!-- Markdown编辑器依赖 -->
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/marked/4.0.0/marked.min.js"></script>
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/prism/1.29.0/prism.min.js"></script>
|
||||
<link href="https://cdn.bootcdn.net/ajax/libs/prism/1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Tailwind配置 -->
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#0F3460',
|
||||
secondary: '#1A73E8',
|
||||
danger: '#D93025',
|
||||
warning: '#F4B400',
|
||||
success: '#1E8E3E',
|
||||
neutral: '#5F6368',
|
||||
light: '#F8F9FA',
|
||||
dark: '#202124'
|
||||
},
|
||||
fontFamily: {
|
||||
inter: ['Inter', 'sans-serif'],
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/tailwindcss">
|
||||
@layer utilities {
|
||||
.content-auto {
|
||||
content-visibility: auto;
|
||||
}
|
||||
.shadow-soft {
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
/* 语言切换按钮样式 */
|
||||
.lang-switch-btn {
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.lang-switch-btn.active {
|
||||
background-color: #1A73E8;
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
}
|
||||
.lang-switch-btn.inactive {
|
||||
background-color: #F8F9FA;
|
||||
color: #5F6368;
|
||||
}
|
||||
.lang-switch-btn.inactive:hover {
|
||||
background-color: #E8F0FE;
|
||||
color: #1A73E8;
|
||||
}
|
||||
/* Markdown编辑器样式 */
|
||||
.markdown-editor {
|
||||
border: 1px solid #E5E7EB;
|
||||
border-radius: 0.5rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.editor-tab {
|
||||
padding: 0.5rem 1rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.editor-tab.active {
|
||||
border-bottom: 2px solid #1A73E8;
|
||||
color: #1A73E8;
|
||||
font-weight: 500;
|
||||
}
|
||||
.editor-content {
|
||||
min-height: 200px;
|
||||
resize: vertical;
|
||||
}
|
||||
.preview-content {
|
||||
min-height: 200px;
|
||||
padding: 1rem;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px solid #E5E7EB;
|
||||
}
|
||||
.preview-content h1, .preview-content h2, .preview-content h3,
|
||||
.preview-content h4, .preview-content h5, .preview-content h6 {
|
||||
margin: 1rem 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
.preview-content p {
|
||||
margin: 0.5rem 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.preview-content ul, .preview-content ol {
|
||||
margin: 0.5rem 0 0.5rem 1.5rem;
|
||||
}
|
||||
.preview-content code {
|
||||
padding: 0.2rem 0.4rem;
|
||||
background-color: #F3F4F6;
|
||||
border-radius: 0.25rem;
|
||||
font-family: monospace;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.preview-content pre {
|
||||
padding: 1rem;
|
||||
background-color: #F3F4F6;
|
||||
border-radius: 0.5rem;
|
||||
overflow-x: auto;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
.preview-content pre code {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="font-inter bg-gray-50 text-dark">
|
||||
<!-- 顶部导航栏(含语言切换) -->
|
||||
<header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center py-4">
|
||||
<div class="flex items-center space-x-2">
|
||||
<i class="fa fa-shield text-primary text-2xl"></i>
|
||||
<span class="text-xl font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
|
||||
<!-- 桌面端语言切换按钮组 -->
|
||||
<div class="hidden md:flex items-center space-x-2 mr-4">
|
||||
<button id="lang-en" class="lang-switch-btn active">English</button>
|
||||
<button id="lang-zh" class="lang-switch-btn inactive">中文</button>
|
||||
</div>
|
||||
|
||||
<nav class="hidden md:flex items-center space-x-8">
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors" data-i18n="create_sve">Create SVE</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
|
||||
<div class="flex items-center space-x-4">
|
||||
<!-- 移动端语言切换(默认隐藏,汉堡菜单展开时显示) -->
|
||||
<div class="hidden sm:flex items-center space-x-2 mr-2" id="mobile-lang-switch">
|
||||
<button id="mobile-lang-en" class="lang-switch-btn active text-xs">EN</button>
|
||||
<button id="mobile-lang-zh" class="lang-switch-btn inactive text-xs">中文</button>
|
||||
</div>
|
||||
|
||||
<div class="relative hidden md:block">
|
||||
<input type="text" placeholder="Search SVE..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary w-64 transition-all" data-i18n-placeholder="search_sve_placeholder">
|
||||
<i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
|
||||
</div>
|
||||
<button class="md:hidden text-neutral hover:text-primary">
|
||||
<i class="fa fa-search text-xl"></i>
|
||||
</button>
|
||||
<button class="md:hidden text-neutral hover:text-primary" id="mobile-menu-btn">
|
||||
<i class="fa fa-bars text-xl"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 移动端导航菜单(默认隐藏) -->
|
||||
<div class="md:hidden hidden bg-white border-t border-gray-100 py-3" id="mobile-menu">
|
||||
<nav class="flex flex-col space-y-3 px-2">
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="home">Home</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="browse">Browse</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="search">Search</a>
|
||||
<a href="#" class="text-primary font-medium hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="create_sve">Create SVE</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors py-2 px-3 rounded" data-i18n="documentation">Documentation</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- 主内容区 -->
|
||||
<main class="container mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<!-- 面包屑导航 -->
|
||||
<div class="text-sm text-neutral mb-6">
|
||||
<a href="#" class="hover:text-secondary" data-i18n="home">Home</a> >
|
||||
<span class="text-primary font-medium" data-i18n="create_sve">Create New SVE Entry</span>
|
||||
</div>
|
||||
|
||||
<!-- 页面标题 -->
|
||||
<div class="mb-8">
|
||||
<h1 class="text-2xl md:text-3xl font-bold text-primary mb-2" data-i18n="create_sve_title">Create New SVE Entry</h1>
|
||||
<p class="text-neutral" data-i18n="create_sve_desc">Fill in the following fields to create a new SVE entry. All required fields are marked with an asterisk (*).</p>
|
||||
</div>
|
||||
|
||||
<!-- 操作按钮区(导入/导出) -->
|
||||
<div class="bg-white rounded-xl shadow-soft p-4 mb-8 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
||||
<div class="flex items-center gap-2">
|
||||
<i class="fa fa-info-circle text-secondary"></i>
|
||||
<span class="text-neutral text-sm" data-i18n="json_import_export_note">You can import SVE data from JSON or export the current form as JSON</span>
|
||||
</div>
|
||||
<div class="flex gap-3">
|
||||
<!-- 导入JSON -->
|
||||
<label class="relative group">
|
||||
<input type="file" id="importJson" accept=".json" class="absolute opacity-0 w-0 h-0">
|
||||
<button type="button" class="flex items-center gap-2 px-4 py-2 border border-secondary text-secondary hover:bg-secondary/5 rounded-lg transition-colors text-sm font-medium" data-i18n="import_json">
|
||||
<i class="fa fa-upload"></i>
|
||||
Import JSON
|
||||
</button>
|
||||
</label>
|
||||
<!-- 导出JSON -->
|
||||
<button id="exportJson" type="button" class="flex items-center gap-2 px-4 py-2 bg-secondary text-white hover:bg-secondary/90 rounded-lg transition-colors text-sm font-medium" data-i18n="export_json">
|
||||
<i class="fa fa-download"></i>
|
||||
Export JSON
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SVE表单 -->
|
||||
<form id="sveForm" class="bg-white rounded-xl shadow-soft p-6 mb-8">
|
||||
<!-- 第一部分:SVE基础信息 -->
|
||||
<div class="mb-8 pb-6 border-b border-gray-200">
|
||||
<h2 class="text-xl font-semibold mb-4 text-primary" data-i18n="sve_basic_info">1. SVE Basic Information</h2>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
|
||||
<!-- SVE ID -->
|
||||
<div>
|
||||
<label for="sveId" class="block text-sm font-medium text-neutral mb-1" data-i18n="sve_id">SVE ID *</label>
|
||||
<div class="flex items-center">
|
||||
<span class="text-neutral mr-2">SVE-</span>
|
||||
<input type="text" id="sveYear" name="sveYear" placeholder="YYYY" maxlength="4" class="w-20 px-3 py-2 border border-gray-300 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="sve_year_placeholder">
|
||||
<span class="text-neutral mx-2">-</span>
|
||||
<input type="text" id="sveNumber" name="sveNumber" placeholder="XXXXXX" maxlength="6" class="flex-1 px-3 py-2 border border-gray-300 rounded-r-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="sve_number_placeholder">
|
||||
</div>
|
||||
<p class="text-xs text-neutral mt-1" data-i18n="sve_id_format_note">Format: SVE-YYYY-XXXXXX (e.g., SVE-2024-123456)</p>
|
||||
</div>
|
||||
|
||||
<!-- 发布日期 -->
|
||||
<div>
|
||||
<label for="publishDate" class="block text-sm font-medium text-neutral mb-1" data-i18n="publish_date">Publish Date *</label>
|
||||
<input type="date" id="publishDate" name="publishDate" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- 漏洞标题 -->
|
||||
<div>
|
||||
<label for="vulnTitle" class="block text-sm font-medium text-neutral mb-1" data-i18n="vuln_title">Vulnerability Title *</label>
|
||||
<input type="text" id="vulnTitle" name="vulnTitle" placeholder="e.g., Cross-Site Scripting Vulnerability in WebFramework v2.3.0" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="vuln_title_placeholder">
|
||||
</div>
|
||||
|
||||
<!-- 漏洞状态 -->
|
||||
<div>
|
||||
<label for="vulnStatus" class="block text-sm font-medium text-neutral mb-1" data-i18n="vuln_status">Vulnerability Status *</label>
|
||||
<select id="vulnStatus" name="vulnStatus" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary">
|
||||
<option value="draft" data-i18n="vuln_status_draft">Draft (Not Published)</option>
|
||||
<option value="public" data-i18n="vuln_status_public">Publicly Disclosed</option>
|
||||
<option value="reserved" data-i18n="vuln_status_reserved">Reserved (Pending Disclosure)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 第二部分:漏洞描述(Markdown编辑器) -->
|
||||
<div class="mb-8 pb-6 border-b border-gray-200">
|
||||
<h2 class="text-xl font-semibold mb-4 text-primary" data-i18n="vuln_description">2. Vulnerability Description *</h2>
|
||||
<p class="text-sm text-neutral mb-3" data-i18n="vuln_description_note">Describe the vulnerability in detail, including technical details, attack scenarios, and potential impacts. Support Markdown formatting.</p>
|
||||
|
||||
<!-- Markdown编辑器 -->
|
||||
<div class="markdown-editor w-full">
|
||||
<div class="flex border-b border-gray-200">
|
||||
<div class="editor-tab active flex-1 text-center" data-tab="edit" data-i18n="editor_edit_tab">Edit</div>
|
||||
<div class="editor-tab flex-1 text-center text-neutral" data-tab="preview" data-i18n="editor_preview_tab">Preview</div>
|
||||
</div>
|
||||
<textarea id="vulnDescription" name="vulnDescription" class="editor-content w-full px-4 py-3 border-0 focus:outline-none" placeholder="# Vulnerability Description ## Technical Details Describe the technical details of the vulnerability here... ## Attack Scenario Explain how an attacker could exploit this vulnerability... ## Potential Impact List the potential impacts of this vulnerability..." data-i18n-placeholder="vuln_description_editor_placeholder"></textarea>
|
||||
<div class="preview-content hidden" id="vulnDescriptionPreview"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 第三部分:受影响产品 -->
|
||||
<div class="mb-8 pb-6 border-b border-gray-200">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h2 class="text-xl font-semibold text-primary" data-i18n="affected_products">3. Affected Products *</h2>
|
||||
<button type="button" id="addProductBtn" class="flex items-center gap-1 px-3 py-1 text-secondary hover:text-primary text-sm font-medium" data-i18n="add_product">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
Add Product
|
||||
</button>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-3" data-i18n="affected_products_note">List all products affected by this vulnerability. Include product name, version, and whether it's fixed in later versions.</p>
|
||||
|
||||
<!-- 受影响产品列表 -->
|
||||
<div id="productsList" class="space-y-4">
|
||||
<!-- 默认产品项 -->
|
||||
<div class="product-item p-4 border border-gray-200 rounded-lg">
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-3">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="product_name">Product Name *</label>
|
||||
<input type="text" name="productName[]" placeholder="e.g., WebFramework" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="product_name_placeholder">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="product_version">Affected Version(s) *</label>
|
||||
<input type="text" name="productVersion[]" placeholder="e.g., v2.3.0, v2.2.x" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="product_version_placeholder">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="fixed_version">Fixed Version (if any)</label>
|
||||
<input type="text" name="productFixedVersion[]" placeholder="e.g., v2.3.1, None" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="fixed_version_placeholder">
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="removeProductBtn text-danger hover:text-danger/80 text-sm flex items-center gap-1" data-i18n="remove_product">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 第四部分:CVSS评分 -->
|
||||
<div class="mb-8 pb-6 border-b border-gray-200">
|
||||
<h2 class="text-xl font-semibold mb-4 text-primary" data-i18n="cvss_rating">4. CVSS v3.1 Rating *</h2>
|
||||
<p class="text-sm text-neutral mb-3" data-i18n="cvss_rating_note">Select the CVSS v3.1 metrics to calculate the base score. Refer to the SVE documentation for guidance on selecting appropriate metrics.</p>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
|
||||
<!-- 攻击向量 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="attack_vector">Attack Vector (AV) *</label>
|
||||
<select name="cvssAV" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="N" data-i18n="av_network">Network (N) - Exploitable remotely</option>
|
||||
<option value="A" data-i18n="av_adjacent">Adjacent (A) - Exploitable via adjacent network</option>
|
||||
<option value="L" data-i18n="av_local">Local (L) - Exploitable only locally</option>
|
||||
<option value="P" data-i18n="av_physical">Physical (P) - Requires physical access</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 攻击复杂度 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="attack_complexity">Attack Complexity (AC) *</label>
|
||||
<select name="cvssAC" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="L" data-i18n="ac_low">Low (L) - Minimal conditions</option>
|
||||
<option value="H" data-i18n="ac_high">High (H) - Specialized conditions</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 所需权限 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="privileges_required">Privileges Required (PR) *</label>
|
||||
<select name="cvssPR" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="N" data-i18n="pr_none">None (N) - No privileges needed</option>
|
||||
<option value="L" data-i18n="pr_low">Low (L) - Basic privileges needed</option>
|
||||
<option value="H" data-i18n="pr_high">High (H) - Admin privileges needed</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 用户交互 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="user_interaction">User Interaction (UI) *</label>
|
||||
<select name="cvssUI" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="N" data-i18n="ui_none">None (N) - No user interaction needed</option>
|
||||
<option value="R" data-i18n="ui_required">Required (R) - User action needed</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 影响范围 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="scope">Scope (S) *</label>
|
||||
<select name="cvssS" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="U" data-i18n="s_unchanged">Unchanged (U) - Impact limited to vulnerable component</option>
|
||||
<option value="C" data-i18n="s_changed">Changed (C) - Impact extends beyond vulnerable component</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 机密性影响 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="confidentiality_impact">Confidentiality (C) *</label>
|
||||
<select name="cvssC" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="N" data-i18n="c_none">None (N) - No confidentiality impact</option>
|
||||
<option value="L" data-i18n="c_low">Low (L) - Limited confidentiality loss</option>
|
||||
<option value="H" data-i18n="c_high">High (H) - Complete confidentiality loss</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 完整性影响 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="integrity_impact">Integrity (I) *</label>
|
||||
<select name="cvssI" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="N" data-i18n="i_none">None (N) - No integrity impact</option>
|
||||
<option value="L" data-i18n="i_low">Low (L) - Limited integrity loss</option>
|
||||
<option value="H" data-i18n="i_high">High (H) - Complete integrity loss</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 可用性影响 -->
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="availability_impact">Availability (A) *</label>
|
||||
<select name="cvssA" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary cvss-metric">
|
||||
<option value="N" data-i18n="a_none">None (N) - No availability impact</option>
|
||||
<option value="L" data-i18n="a_low">Low (L) - Limited availability loss</option>
|
||||
<option value="H" data-i18n="a_high">High (H) - Complete availability loss</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 计算出的CVSS评分 -->
|
||||
<div class="bg-light p-4 rounded-lg border border-gray-200">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3">
|
||||
<div>
|
||||
<div class="text-sm text-neutral mb-1" data-i18n="cvss_base_score">CVSS v3.1 Base Score</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<span id="cvssScore" class="text-2xl font-bold text-danger">6.1</span>
|
||||
<span id="cvssSeverity" class="px-2 py-1 rounded-full bg-warning/10 text-warning text-xs font-medium">MEDIUM</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-neutral mb-1" data-i18n="cvss_vector_string">CVSS Vector String</div>
|
||||
<div id="cvssVector" class="text-sm font-mono bg-white px-2 py-1 rounded border border-gray-200">CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 第五部分:解决方案(Markdown编辑器) -->
|
||||
<div class="mb-8 pb-6 border-b border-gray-200">
|
||||
<h2 class="text-xl font-semibold mb-4 text-primary" data-i18n="solutions_mitigations">5. Solutions and Mitigations</h2>
|
||||
<p class="text-sm text-neutral mb-3" data-i18n="solutions_mitigations_note">Provide solutions, mitigations, and workarounds for the vulnerability. Support Markdown formatting (e.g., code blocks for workaround code).</p>
|
||||
|
||||
<!-- Markdown编辑器 -->
|
||||
<div class="markdown-editor w-full">
|
||||
<div class="flex border-b border-gray-200">
|
||||
<div class="editor-tab active flex-1 text-center" data-tab="edit" data-i18n="editor_edit_tab">Edit</div>
|
||||
<div class="editor-tab flex-1 text-center text-neutral" data-tab="preview" data-i18n="editor_preview_tab">Preview</div>
|
||||
</div>
|
||||
<textarea id="solutions" name="solutions" class="editor-content w-full px-4 py-3 border-0 focus:outline-none" placeholder="# Solutions and Mitigations ## Recommended Actions 1. Upgrade to the latest version 2. Apply security patches ## Workaround (if upgrade not possible) ```javascript // Example workaround code function sanitizeInput(input) { return input.replace(/&/g, '&') .replace(/</g, '<') .replace(/>/g, '>'); } ``` ## Additional Guidance Provide any additional guidance for users..." data-i18n-placeholder="solutions_editor_placeholder"></textarea>
|
||||
<div class="preview-content hidden" id="solutionsPreview"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 第六部分:参考资料 -->
|
||||
<div class="mb-8 pb-6 border-b border-gray-200">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h2 class="text-xl font-semibold text-primary" data-i18n="references">6. References</h2>
|
||||
<button type="button" id="addReferenceBtn" class="flex items-center gap-1 px-3 py-1 text-secondary hover:text-primary text-sm font-medium" data-i18n="add_reference">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
Add Reference
|
||||
</button>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-3" data-i18n="references_note">Add references related to the vulnerability (e.g., vendor advisories, technical papers, SVE documentation links). Do not include CVE or CWE references.</p>
|
||||
|
||||
<!-- 参考资料列表 -->
|
||||
<div id="referencesList" class="space-y-4">
|
||||
<!-- 默认参考资料项 -->
|
||||
<div class="reference-item p-4 border border-gray-200 rounded-lg">
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-3">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="reference_type">Reference Type *</label>
|
||||
<select name="referenceType[]" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary">
|
||||
<option value="vendor" data-i18n="ref_vendor">Vendor Advisory</option>
|
||||
<option value="tech_doc" data-i18n="ref_tech_doc">Technical Documentation</option>
|
||||
<option value="sve_guide" data-i18n="ref_sve_guide">SVE Guidance</option>
|
||||
<option value="research" data-i18n="ref_research">Research Paper</option>
|
||||
<option value="other" data-i18n="ref_other">Other</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="reference_title">Reference Title</label>
|
||||
<input type="text" name="referenceTitle[]" placeholder="e.g., WebFramework Security Advisory 2024-01" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="reference_title_placeholder">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-neutral mb-1" data-i18n="reference_url">Reference URL *</label>
|
||||
<input type="url" name="referenceUrl[]" placeholder="https://example.com/security/advisory" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="reference_url_placeholder">
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="removeReferenceBtn text-danger hover:text-danger/80 text-sm flex items-center gap-1" data-i18n="remove_reference">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 第七部分:相关SVE -->
|
||||
<div class="mb-8">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h2 class="text-xl font-semibold text-primary" data-i18n="related_sve">7. Related SVE Entries</h2>
|
||||
<button type="button" id="addRelatedSveBtn" class="flex items-center gap-1 px-3 py-1 text-secondary hover:text-primary text-sm font-medium" data-i18n="add_related_sve">
|
||||
<i class="fa fa-plus-circle"></i>
|
||||
Add Related SVE
|
||||
</button>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-3" data-i18n="related_sve_note">Add other SVE entries that are related to this vulnerability (e.g., same product family, similar attack vector).</p>
|
||||
|
||||
<!-- 相关SVE列表 -->
|
||||
<div id="relatedSveList" class="space-y-3">
|
||||
<!-- 默认相关SVE项 -->
|
||||
<div class="related-sve-item flex items-center gap-3 p-3 border border-gray-200 rounded-lg">
|
||||
<input type="text" name="relatedSveId[]" placeholder="SVE-YYYY-XXXXXX" class="flex-1 px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary" data-i18n-placeholder="related_sve_id_placeholder">
|
||||
<select name="relatedSveRelation[]" class="w-40 px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-secondary/50 focus:border-secondary">
|
||||
<option value="same_product" data-i18n="related_same_product">Same Product</option>
|
||||
<option value="similar_vuln" data-i18n="related_similar_vuln">Similar Vulnerability</option>
|
||||
<option value="same_vendor" data-i18n="related_same_vendor">Same Vendor</option>
|
||||
<option value="other" data-i18n="related_other">Other Relationship</option>
|
||||
</select>
|
||||
<button type="button" class="removeRelatedSveBtn text-danger hover:text-danger/80 p-2" data-i18n-title="remove_related_sve">
|
||||
<i class="fa fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 表单提交按钮 -->
|
||||
<div class="flex flex-col sm:flex-row justify-end gap-4 pt-6 border-t border-gray-200">
|
||||
<button type="button" class="px-6 py-3 border border-gray-300 text-neutral hover:bg-gray-50 rounded-lg transition-colors font-medium" data-i18n="save_draft">
|
||||
Save as Draft
|
||||
</button>
|
||||
<button type="submit" class="px-6 py-3 bg-secondary text-white hover:bg-secondary/90 rounded-lg transition-colors font-medium" data-i18n="submit_sve">
|
||||
Submit SVE Entry
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
<!-- 页脚 -->
|
||||
<footer class="bg-white py-12">
|
||||
<div class="container mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||
<div>
|
||||
<div class="flex items-center space-x-2 mb-4">
|
||||
<i class="fa fa-shield text-primary text-xl"></i>
|
||||
<span class="text-lg font-bold text-primary" data-i18n="sve_database">SVE Database</span>
|
||||
</div>
|
||||
<p class="text-sm text-neutral mb-4" data-i18n="footer_desc">A comprehensive database of security vulnerabilities and exposures, maintained by the Security Research Team. Independent of CVE and CWE.</p>
|
||||
<div class="flex space-x-4">
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa fa-github"></i>
|
||||
</a>
|
||||
<a href="#" class="text-neutral hover:text-primary transition-colors">
|
||||
<i class="fa fa-linkedin"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_resources">Resources</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="documentation">Documentation</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="api">API</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="bulk_data">Bulk Data</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="statistics">Statistics</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_information">Information</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="about_sve">About SVE</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="sve_guidelines">SVE Guidelines</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="vuln_metrics">Vulnerability Metrics</a></li>
|
||||
<li><a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="faq">FAQ</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="font-semibold text-dark mb-4" data-i18n="footer_contact">Contact</h4>
|
||||
<ul class="space-y-2 text-sm">
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-envelope text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.com" class="text-neutral hover:text-secondary transition-colors">sve@gvsds.com</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-file-text text-secondary mt-1 mr-2"></i>
|
||||
<a href="mailto:sve@gvsds.org?subject=[SVE]%20Report%20A%20Vulnerability%20!" class="text-neutral hover:text-secondary transition-colors" data-i18n="report_vuln">Report a Vulnerability</a>
|
||||
</li>
|
||||
<li class="flex items-start">
|
||||
<i class="fa fa-info-circle text-secondary mt-1 mr-2"></i>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="security_policy">Security Policy</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-gray-200 mt-8 pt-6 flex flex-col md:flex-row justify-between items-center">
|
||||
<p class="text-sm text-neutral" data-i18n="copyright">© 2024 SVE Database. All rights reserved.</p>
|
||||
<div class="flex space-x-6 mt-4 md:mt-0 text-sm">
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="privacy_policy">Privacy Policy</a>
|
||||
<a href="#" class="text-neutral hover:text-secondary transition-colors" data-i18n="terms_service">Terms of Service</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/assets/js/i18n.js"></script>
|
||||
<script src="/assets/js/write.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -52,6 +52,7 @@ SUBDOMAIN_CONFIG = {
|
||||
'cdn': {'dir': 'cdn', 'root_is_index': False, 'root_text': 'GVSDS CDN'},
|
||||
'yc8z': {'dir': 'yc8z', 'root_is_index': True},
|
||||
'omc': {'dir': 'omc', 'root_is_index': True},
|
||||
'sve': {'dir': 'SVE', 'root_is_index': True},
|
||||
'tailwind': {'dir': 'Tailwindcss', 'root_is_index': False, 'root_redirect': '/3.4.17'},
|
||||
'nanjingmassacre': {'dir': 'NanjingMassacre', 'root_is_index': True},
|
||||
'3c': {'dir': 'CreateECentralCourt', 'root_is_index': True},
|
||||
|
||||
+91
-52
@@ -1,38 +1,81 @@
|
||||
"""模块:SVE 安全漏洞百科视图
|
||||
提供漏洞查询、写入、列表筛选功能。"""
|
||||
提供漏洞查询、写入、列表筛选功能。
|
||||
|
||||
import uuid
|
||||
SveID 存储规范(用户定案):5 字节二进制,hex 形式 0x0YYYYNNNNN
|
||||
- YYYY:4 位年份(hex 数字,如 2023 → '2023')
|
||||
- NNNNN:5 位数字编号(hex 数字,如 00001)
|
||||
例:SVE-2023-00001 ⇄ 字节 02 02 30 00 01(hex 0202300001)
|
||||
"""
|
||||
|
||||
import re
|
||||
import datetime
|
||||
from rest_framework import viewsets
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.permissions import IsAuthenticated, AllowAny
|
||||
from rest_framework.permissions import AllowAny
|
||||
from django.db.models import Q
|
||||
|
||||
from .models import SVEBase
|
||||
from .serializers import SVESerializer, SVEListSerializer, SVEWriteSerializer
|
||||
from gvsdsdk.model_utils import UUIDObj
|
||||
|
||||
|
||||
def _sve_id_to_bytes(sve_id_str):
|
||||
sve_id_str = sve_id_str.strip().upper()
|
||||
if sve_id_str.startswith('SVE-'):
|
||||
sve_id_str = sve_id_str[4:]
|
||||
parts = sve_id_str.split('-')
|
||||
if len(parts) == 3:
|
||||
def _sve_id_to_bytes(sve_id):
|
||||
"""SVE-YYYY-NNNNN(或 0x0YYYYNNNNN / 0YYYYNNNNN)→ 5 字节二进制 ID。
|
||||
|
||||
无效格式抛 ValueError,由调用方转为 400 响应。
|
||||
"""
|
||||
s = str(sve_id).strip()
|
||||
m = re.fullmatch(r'SVE[-_ ]?(\d{4})[-_ ]?(\d+)', s, re.IGNORECASE)
|
||||
if m:
|
||||
year, count = m.group(1), m.group(2)
|
||||
# 编号按十进制解析后补足 5 位(如 00012 → '00012'),拼成 hex 0+年份+编号
|
||||
return bytes.fromhex(f'0{year}{int(count):05d}')
|
||||
hex_str = s[2:] if s.lower().startswith('0x') else s
|
||||
if len(hex_str) == 10 and re.fullmatch(r'[0-9a-fA-F]{10}', hex_str):
|
||||
return bytes.fromhex(hex_str)
|
||||
raise ValueError(f'无效的 SveID 格式: {sve_id},期望 SVE-YYYY-NNNNN')
|
||||
|
||||
|
||||
def _format_sve_id(sve_id):
|
||||
"""5 字节 ID → SVE-YYYY-NNNNN;兼容 16 字节补零 / UTF-8 文本等存量形态。"""
|
||||
if isinstance(sve_id, bytes):
|
||||
hex_str = sve_id.hex()
|
||||
# 规范形态:10 位 hex 且首字符为 0(0x0YYYYNNNNN)
|
||||
if len(sve_id) == 5 and hex_str.startswith('0'):
|
||||
return f'SVE-{hex_str[1:5]}-{hex_str[5:]}'
|
||||
# 兼容旧补零存储:去掉尾部 \x00 后重试
|
||||
stripped = sve_id.rstrip(b'\x00')
|
||||
if stripped != sve_id:
|
||||
return _format_sve_id(stripped)
|
||||
# 兼容 UTF-8 文本形态(旧字符串存储)
|
||||
try:
|
||||
year = int(parts[0])
|
||||
count = int(parts[2])
|
||||
return f'SVE-{year}-{count:04d}'
|
||||
except (ValueError, IndexError):
|
||||
text = sve_id.decode('utf-8')
|
||||
if text.startswith('SVE-'):
|
||||
return text
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
return sve_id_str
|
||||
return hex_str
|
||||
return str(sve_id)
|
||||
|
||||
|
||||
def _format_sve_id(sve_id_bytes):
|
||||
if isinstance(sve_id_bytes, bytes):
|
||||
return UUIDObj(sve_id_bytes).str or sve_id_bytes.hex()
|
||||
return str(sve_id_bytes)
|
||||
def _detail_data(sve):
|
||||
"""详情页统一载荷(SveID 转 SVE-YYYY-NNNNN 可读文本)。"""
|
||||
cvss_data = sve.SveCvss or {}
|
||||
return {
|
||||
'SveID': _format_sve_id(sve.SveID),
|
||||
'SveName': sve.SveName,
|
||||
'SveDescription': sve.SveDescription,
|
||||
'SveVulnStatus': sve.SveVulnStatus,
|
||||
'SveProducts': sve.SveProducts,
|
||||
'SveCvss': sve.SveCvss,
|
||||
'CvssBaseScore': cvss_data.get('score', cvss_data.get('baseScore')),
|
||||
'CvssBaseSeverity': cvss_data.get('severity', cvss_data.get('baseSeverity')),
|
||||
'SveSolutions': sve.SveSolutions,
|
||||
'SveReferences': sve.SveReferences,
|
||||
'SveRelatedSves': sve.SveRelatedSves,
|
||||
'SveCreateTime': sve.SveCreateTime.isoformat() if sve.SveCreateTime else None,
|
||||
'SveLastModified': sve.SveLastModified.isoformat() if sve.SveLastModified else None,
|
||||
}
|
||||
|
||||
|
||||
class SVEViewSet(viewsets.ModelViewSet):
|
||||
@@ -67,7 +110,7 @@ class SVEViewSet(viewsets.ModelViewSet):
|
||||
filtered = []
|
||||
for sve in all_sves:
|
||||
cvss_data = sve.SveCvss or {}
|
||||
score = cvss_data.get('baseScore', 0)
|
||||
score = cvss_data.get('score', cvss_data.get('baseScore', 0))
|
||||
if CvssMin <= score <= CvssMax:
|
||||
filtered.append(sve)
|
||||
qs = filtered
|
||||
@@ -93,8 +136,8 @@ class SVEViewSet(viewsets.ModelViewSet):
|
||||
'SveName': sve.SveName,
|
||||
'SveDescription': (sve.SveDescription or '')[:200],
|
||||
'SveVulnStatus': sve.SveVulnStatus,
|
||||
'CvssBaseScore': cvss_data.get('baseScore'),
|
||||
'CvssSeverity': cvss_data.get('baseSeverity'),
|
||||
'CvssBaseScore': cvss_data.get('score', cvss_data.get('baseScore')),
|
||||
'CvssSeverity': cvss_data.get('severity', cvss_data.get('baseSeverity')),
|
||||
'SveCreateTime': sve.SveCreateTime.isoformat() if sve.SveCreateTime else None,
|
||||
})
|
||||
|
||||
@@ -111,42 +154,38 @@ class SVEViewSet(viewsets.ModelViewSet):
|
||||
SveID = request.query_params.get('SveID') or request.data.get('SveID')
|
||||
if not SveID:
|
||||
return Response({'code': 1, 'msg': '缺少SveID'}, status=400)
|
||||
formatted_id = _sve_id_to_bytes(SveID)
|
||||
try:
|
||||
sve = SVEBase.objects.get(SveID=formatted_id.encode('utf-8')[:16].ljust(16, b'\x00'))
|
||||
except SVEBase.DoesNotExist:
|
||||
try:
|
||||
sve = SVEBase.objects.get(SveID=SveID)
|
||||
except SVEBase.DoesNotExist:
|
||||
return Response({'code': 1, 'msg': 'SVE不存在'}, status=404)
|
||||
sve_id_bytes = _sve_id_to_bytes(SveID)
|
||||
except ValueError as e:
|
||||
return Response({'code': 1, 'msg': str(e)}, status=400)
|
||||
|
||||
cvss_data = sve.SveCvss or {}
|
||||
return Response({
|
||||
'code': 0,
|
||||
'data': {
|
||||
'SveID': _format_sve_id(sve.SveID),
|
||||
'SveName': sve.SveName,
|
||||
'SveDescription': sve.SveDescription,
|
||||
'SveVulnStatus': sve.SveVulnStatus,
|
||||
'SveProducts': sve.SveProducts,
|
||||
'SveCvss': sve.SveCvss,
|
||||
'CvssBaseScore': cvss_data.get('baseScore'),
|
||||
'CvssBaseSeverity': cvss_data.get('baseSeverity'),
|
||||
'SveSolutions': sve.SveSolutions,
|
||||
'SveReferences': sve.SveReferences,
|
||||
'SveRelatedSves': sve.SveRelatedSves,
|
||||
'SveCreateTime': sve.SveCreateTime.isoformat() if sve.SveCreateTime else None,
|
||||
'SveLastModified': sve.SveLastModified.isoformat() if sve.SveLastModified else None,
|
||||
}
|
||||
})
|
||||
# 依次尝试:规范 5 字节 → 旧补零 16 字节 → 旧 UTF-8 文本字节
|
||||
candidates = (
|
||||
sve_id_bytes,
|
||||
SveID.encode('utf-8')[:16].ljust(16, b'\x00'),
|
||||
SveID.encode('utf-8'),
|
||||
)
|
||||
sve = None
|
||||
for candidate in candidates:
|
||||
try:
|
||||
sve = SVEBase.objects.get(SveID=candidate)
|
||||
break
|
||||
except SVEBase.DoesNotExist:
|
||||
continue
|
||||
if sve is None:
|
||||
return Response({'code': 1, 'msg': 'SVE不存在'}, status=404)
|
||||
|
||||
return Response({'code': 0, 'data': _detail_data(sve)})
|
||||
|
||||
@action(detail=False, methods=['post'])
|
||||
def write(self, request):
|
||||
ser = SVEWriteSerializer(data=request.data)
|
||||
ser.IsValid(raise_exception=True)
|
||||
data = ser.ValidatedData
|
||||
formatted_id = _sve_id_to_bytes(data['SveID'])
|
||||
sve_id_bytes = formatted_id.encode('utf-8')[:16].ljust(16, b'\x00')
|
||||
try:
|
||||
sve_id_bytes = _sve_id_to_bytes(data['SveID'])
|
||||
except ValueError as e:
|
||||
return Response({'code': 1, 'msg': str(e)}, status=400)
|
||||
|
||||
defaults = {
|
||||
'SveName': data.get('SveName', ''),
|
||||
@@ -171,5 +210,5 @@ class SVEViewSet(viewsets.ModelViewSet):
|
||||
return Response({
|
||||
'code': 0,
|
||||
'msg': '创建成功' if created else '更新成功',
|
||||
'data': SVESerializer(sve).data,
|
||||
})
|
||||
'data': _detail_data(sve),
|
||||
})
|
||||
Reference in new issue
Block a user