Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{go,mod,sum}]
indent_style = tab
indent_size = 4

[Makefile]
indent_style = tab

[*.{js,jsx,ts,tsx,json,yml,yaml,css,scss,html,md,mdx}]
indent_style = space
indent_size = 2

[*.sh]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* text=auto eol=lf

*.bat text eol=crlf
*.cmd text eol=crlf

*.gif binary
*.ico binary
*.jpg binary
*.jpeg binary
*.png binary
*.webp binary
*.woff binary
*.woff2 binary
*.gz binary
*.zip binary
43 changes: 28 additions & 15 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: "\U0001F41B Bug 报告"
about: "报告一个 Bug,帮助我们改进 BackupX"
name: "Bug 报告"
about: "提交可复现的缺陷报告"
title: "[Bug] "
labels: ["bug"]
assignees: []
---

## 描述
## 问题描述

<!-- 清晰简洁地描述这个 Bug -->
<!-- 清晰说明发生了什么,以及它为什么是缺陷。 -->

## 复现步骤

Expand All @@ -18,26 +18,39 @@ assignees: []

## 期望行为

<!-- 描述你期望发生什么 -->
<!-- 描述正确结果。 -->

## 实际行为

<!-- 描述实际发生了什么 -->
<!-- 描述实际结果,包括稳定复现还是偶发。 -->

## 环境信息

- **OS**: <!-- 例如 Ubuntu 22.04 -->
- **Go 版本**: <!-- 例如 1.21 -->
- **Node.js 版本**: <!-- 例如 18.17 -->
- **浏览器**: <!-- 例如 Chrome 120 -->
- **BackupX 版本**: <!-- 例如 v1.0.0 -->
- BackupX 版本或提交:
- 部署方式(Docker、裸机、集群):
- 操作系统与架构:
- 数据库或备份类型:
- 浏览器版本(仅界面问题):
- 是否使用代理、私有 CA 或堡垒机:

## 相关日志
## 最小配置

<!-- 仅保留复现所需字段。删除密码、Token、域名、IP 和存储凭据。 -->

```yaml

```
<!-- 粘贴相关日志输出 -->

## 相关日志

<!-- 附问题发生前后的最小日志片段,并先删除所有敏感信息。 -->

```text

```

## 截图
## 补充信息

<!-- 可附截图、相关 Issue、临时缓解方式或其他上下文。 -->

<!-- 如有截图请附上 -->
请勿提交数据库文件、完整配置、备份数据、API Key、Agent Token、安装命令或未脱敏日志。安全漏洞请使用私密漏洞报告入口。
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 讨论区 / Discussions
url: https://github.com/Awuqing/GoogleDriverBackupEveryDay/discussions
about: 提问、讨论功能想法或分享使用经验
- name: 安全漏洞 / Security vulnerability
url: https://github.com/Awuqing/BackupX/security/advisories/new
about: 请通过私密渠道报告安全问题,不要创建公开 Issue。
31 changes: 22 additions & 9 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
---
name: "\U0001F680 功能请求"
about: "建议一个新功能或改进"
name: "功能请求"
about: "建议一个可落地的新功能或改进"
title: "[Feature] "
labels: ["enhancement"]
assignees: []
---

## 需求描述
## 使用场景

<!-- 清晰简洁地描述你希望的功能 -->
<!-- 描述谁在什么环境中遇到了什么问题。 -->

## 使用场景
## 期望结果

<!-- 说明用户最终需要完成的任务,不要只描述界面元素。 -->

## 建议方案

<!-- 可选:描述 API、配置、工作流或界面交互。 -->

## 替代方案

<!-- 说明当前绕过方式,以及它为什么不足。 -->

## 兼容性与风险

<!-- 描述你在什么场景下需要这个功能 -->
<!-- 是否影响现有配置、数据格式、部署方式、权限或集群节点。 -->

## 建议的解决方案
## 验收标准

<!-- 描述你认为应该如何实现(可选) -->
- [ ]
- [ ]

## 补充信息

<!-- 任何其他相关信息、截图或上下文 -->
<!-- 可附相关文档、日志、截图或同类实现。不要附敏感信息。 -->
57 changes: 38 additions & 19 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,48 @@
## Pull Request
## 变更说明 / Summary

### 变更类型 / Type of Change
<!-- 说明做了什么、为什么需要,以及对用户或运维人员的影响。 -->

- [ ] 🐛 Bug 修复 (非破坏性变更)
- [ ] ✨ 新功能 (非破坏性变更)
- [ ] 💥 破坏性变更 (修复或功能导致现有功能变更)
- [ ] 📝 文档更新
- [ ] ♻️ 代码重构 (不影响功能)
- [ ] ⚡ 性能优化
## 变更类型 / Type of Change

### 描述 / Description
- [ ] 缺陷修复
- [ ] 新功能
- [ ] 破坏性变更
- [ ] 性能优化
- [ ] 重构或工程化
- [ ] 文档更新

<!-- 描述你做了什么更改以及为什么 -->
## 相关 Issue / Related Issue

### 相关 Issue / Related Issue
<!-- 例如:Closes #123。没有关联 Issue 时写“无”。 -->

<!-- 关联的 Issue 编号,如 Fixes #123 -->
## 验证 / Validation

### 测试 / Testing
<!-- 只勾选实际执行过的项目,并在下方补充无法执行的原因。 -->

- [ ] 后端测试通过 (`go test ./...`)
- [ ] 前端测试通过 (`npm run test`)
- [ ] 前端构建成功 (`npm run build`)
- [ ] 已在本地环境手动测试
- [ ] 后端格式、静态检查与测试通过
- [ ] 前端测试与生产构建通过
- [ ] 文档类型检查与中英文生产构建通过
- [ ] 配置、迁移或部署兼容性已验证
- [ ] 已完成与变更范围相符的手动验证

### 截图 / Screenshots
验证命令与结果:

<!-- 如有 UI 变更请附上截图 -->
```text

```

## 风险与回滚 / Risk and Rollback

<!-- 说明兼容性风险、数据迁移、配置变化和回滚方法。无风险时写“无”。 -->

## 界面变更 / UI Changes

<!-- 有界面变更时附前后截图;无界面变更时写“无”。 -->

## 提交前检查 / Checklist

- [ ] 提交信息符合 Conventional Commits
- [ ] 未提交密钥、Token、真实配置、数据库或日志
- [ ] 新行为已补充测试和中英文文档
- [ ] 前端未使用 Emoji、渐变、阴影、独立字体或超过 4px 的圆角
- [ ] 没有夹带与本 PR 无关的格式化或重构
50 changes: 28 additions & 22 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
# 安全漏洞披露政策 / Security Policy
# 安全策略 / Security Policy

## 支持的版本 / Supported Versions
## 支持范围 / Supported Versions

| Version | Supported |
|---------|--------------------|
| latest | ✅ |
| < latest | ❌ |
安全修复面向最新稳定版本和 `main` 分支。旧版本不会单独维护安全补丁;升级前请先阅读对应 Release Notes 和升级恢复文档。

## 报告安全漏洞 / Reporting a Vulnerability
Security fixes target the latest stable release and the `main` branch. Older versions do not receive separate security patches. Review the release notes and upgrade documentation before updating.

如果您发现了安全漏洞,**请不要通过公开 Issue 报告**。
| Version | Status |
|---------|--------|
| Latest stable release | Supported |
| `main` | Development support |
| Older releases | Unsupported |

请发送邮件至项目维护者,包含以下信息:
## 报告漏洞 / Reporting a Vulnerability

1. 漏洞描述
2. 复现步骤
3. 受影响的版本
4. 可能的影响范围
请勿通过公开 Issue、Discussion 或 Pull Request 披露安全漏洞。使用 GitHub 的[私密漏洞报告入口](https://github.com/Awuqing/BackupX/security/advisories/new)提交报告。

我们会在 48 小时内确认收到并开始处理。
Do not disclose vulnerabilities in a public Issue, Discussion, or Pull Request. Submit the report through GitHub's [private vulnerability reporting form](https://github.com/Awuqing/BackupX/security/advisories/new).

---
报告应包含:

If you discover a security vulnerability, **please do NOT open a public issue**.
1. 受影响版本或提交;
2. 漏洞描述、攻击前提和影响范围;
3. 最小复现步骤或验证代码;
4. 已知缓解措施;
5. 希望使用的署名信息。

Instead, email the project maintainer with the following details:
不要上传真实密钥、Token、备份数据、数据库或包含客户信息的日志。必要时请先脱敏,并使用最小化测试数据。

1. Description of the vulnerability
2. Steps to reproduce
3. Affected versions
4. Potential impact
Do not upload real credentials, tokens, backup data, databases, or logs containing customer information. Redact sensitive values and use minimal test data.

We will acknowledge receipt within 48 hours and begin working on a fix.
## 处理流程 / Response Process

- 维护者会尽快确认报告并进行初步分级;
- 修复期间请保持细节私密,避免影响仍未升级的部署;
- 修复发布后会在安全公告或 Release Notes 中说明受影响范围、缓解措施和升级版本;
- 披露时间由报告者与维护者协调确定。

The maintainer will acknowledge and triage the report as soon as practical. Details should remain private until a fix and coordinated disclosure are ready.
86 changes: 86 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
time: "03:00"
timezone: Asia/Shanghai
open-pull-requests-limit: 5
commit-message:
prefix: chore(deps)
groups:
github-actions:
patterns:
- "*"

- package-ecosystem: gomod
directory: /server
schedule:
interval: weekly
day: monday
time: "03:10"
timezone: Asia/Shanghai
open-pull-requests-limit: 5
commit-message:
prefix: chore(deps)
groups:
go-minor-and-patch:
patterns:
- "*"
update-types:
- minor
- patch

- package-ecosystem: npm
directory: /web
schedule:
interval: weekly
day: monday
time: "03:20"
timezone: Asia/Shanghai
open-pull-requests-limit: 5
commit-message:
prefix: chore(deps)
groups:
web-minor-and-patch:
patterns:
- "*"
update-types:
- minor
- patch

- package-ecosystem: npm
directory: /docs-site
schedule:
interval: weekly
day: monday
time: "03:30"
timezone: Asia/Shanghai
open-pull-requests-limit: 5
commit-message:
prefix: chore(deps)
groups:
docs-minor-and-patch:
patterns:
- "*"
update-types:
- minor
- patch

- package-ecosystem: docker
directory: /
schedule:
interval: weekly
day: monday
time: "03:40"
timezone: Asia/Shanghai
open-pull-requests-limit: 5
commit-message:
prefix: chore(deps)
groups:
container-images:
patterns:
- "*"
Loading
Loading