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
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_call:

jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install frontend dependencies
working-directory: frontend
run: npm ci

- name: Build frontend assets
working-directory: frontend
run: npm run build

- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev

- name: Go vet
run: go vet ./internal/... .

- name: Go tests
run: go test ./internal/... .

- name: TypeScript check
working-directory: frontend
run: npx tsc --noEmit

- name: Frontend tests
working-directory: frontend
env:
TZ: Asia/Shanghai
run: npm test
8 changes: 6 additions & 2 deletions .github/workflows/release-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ on:
required: true

jobs:
test:
uses: ./.github/workflows/ci.yml

build:
needs: test
strategy:
matrix:
include:
Expand All @@ -39,7 +43,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version-file: go.mod

- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -54,7 +58,7 @@ jobs:
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev

- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
run: go install github.com/wailsapp/wails/v2/cmd/wails@v2.12.0

- name: Install frontend deps
shell: bash
Expand Down
173 changes: 0 additions & 173 deletions .github/workflows/release.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/frontend/node_modules_ubuntu/
/frontend/node_modules_mac/
/build/
/.idea/
/.vscode/
/tests/*
!/tests/source/
Expand Down
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

16 changes: 0 additions & 16 deletions .idea/jsLinters/jshint.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/locknote-client.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

13 changes: 8 additions & 5 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,16 @@ locknote/
The Wails entry point, same-package APIs, and tests of unexported functions remain at the root.
Source contract tests live in tests/source/: run go test ./tests/source, or go test ./... for all Go tests.

## Security Notes
## Security Model

- Master key only resides in memory after unlocking
LockNote encrypts note bodies, titles and previews, note history, attachments and thumbnails, and todo titles. Tag names, notebook names, original attachment filenames, smart-view filters, password hints, timestamps, and file counts and sizes are not encrypted.

Backups contain only notes, history, and attachments; they do not contain tags, notebooks, todos, settings, or the database. **Restore Backup works only with a backup from the same vault.** To move data to another device or use a different key, use recovery-key import. If both the password and recovery key are lost, the data is unrecoverable by design.

- The master key remains in memory only after unlocking
- Each note uses an independent random nonce
- Ciphertext files use atomic write
- Password reset supported via recovery key
- If you lose both your login password and the recovery key, your data cannot be recovered
- Ciphertext files are written atomically
- Password reset is supported through the recovery key

## Version

Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,16 @@ locknote/
根目录保留 Wails 入口及同包 API;依赖未导出函数的单元测试随实现保留在根目录。
源码契约测试统一位于 tests/source/,可运行 go test ./tests/source;完整 Go 测试运行 go test ./...。

## 安全说明
## 安全模型

LockNote 使用加密密钥保护笔记正文、标题和预览、历史版本、附件及缩略图,以及待办事项标题。标签名称、笔记本名称、附件原始文件名、智能视图筛选条件、密码提示、时间戳及文件数量和大小不加密。

备份仅包含笔记、历史版本和附件,不包含标签、笔记本、待办事项、设置或数据库。**“恢复备份”仅适用于同一密码库的备份**;要迁移到其他设备或使用不同密钥,请选择“用恢复密钥导入”。如果密码和恢复密钥都丢失,数据将按设计无法恢复。

- 主密钥仅在解锁后驻留内存
- 每篇笔记使用独立随机 nonce
- 密文文件采用原子写入
- 支持恢复密钥重置密码
- 如果你同时遗失登录密码和恢复密钥,数据将无法恢复

## 版本

Expand Down
Loading
Loading