Skip to content

Commit fc818b9

Browse files
committed
chore: merge upstream main
2 parents 83b84c8 + 41cec0d commit fc818b9

861 files changed

Lines changed: 168674 additions & 60549 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/audit-exceptions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ exceptions:
55
severity: high
66
reason: "Admin export only; switched to dynamic import to reduce exposure (CVE-2023-30533)"
77
mitigation: "Load only on export; restrict export permissions and data scope"
8-
expires_on: "2026-07-06"
8+
expires_on: "2026-10-06"
99
owner: "security@your-domain"
1010
- package: xlsx
1111
advisory: "GHSA-5pgg-2g8v-p4x9"
1212
severity: high
1313
reason: "Admin export only; switched to dynamic import to reduce exposure (CVE-2024-22363)"
1414
mitigation: "Load only on export; restrict export permissions and data scope"
15-
expires_on: "2026-07-06"
15+
expires_on: "2026-10-06"
1616
owner: "security@your-domain"
1717
- package: lodash
1818
advisory: "GHSA-r5fr-rjxr-66jc"

.github/workflows/backend-ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ permissions:
88
contents: read
99

1010
jobs:
11+
shell:
12+
runs-on: macos-15
13+
steps:
14+
- uses: actions/checkout@v6
15+
- name: Check deployment scripts
16+
run: |
17+
/bin/bash -n deploy/apple-container.sh
18+
/bin/bash deploy/tests/apple-container-test.sh
19+
1120
test:
1221
runs-on: ubuntu-latest
1322
steps:
@@ -20,7 +29,7 @@ jobs:
2029
cache-dependency-path: backend/go.sum
2130
- name: Verify Go version
2231
run: |
23-
go version | grep -q 'go1.26.4'
32+
go version | grep -q 'go1.26.5'
2433
- name: Unit tests
2534
working-directory: backend
2635
run: make test-unit
@@ -60,7 +69,7 @@ jobs:
6069
cache-dependency-path: backend/go.sum
6170
- name: Verify Go version
6271
run: |
63-
go version | grep -q 'go1.26.4'
72+
go version | grep -q 'go1.26.5'
6473
- name: golangci-lint
6574
uses: golangci/golangci-lint-action@v9
6675
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115

116116
- name: Verify Go version
117117
run: |
118-
go version | grep -q 'go1.26.4'
118+
go version | grep -q 'go1.26.5'
119119
120120
# Docker setup for GoReleaser
121121
- name: Set up QEMU

.github/workflows/security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
cache-dependency-path: backend/go.sum
2424
- name: Verify Go version
2525
run: |
26-
go version | grep -q 'go1.26.4'
26+
go version | grep -q 'go1.26.5'
2727
- name: Run govulncheck
2828
working-directory: backend
2929
run: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ backend/.installed
116116
# 其他
117117
# ===================
118118
tests
119+
!deploy/tests/
120+
!deploy/tests/**
119121
CLAUDE.md
120122
.claude
121123
scripts

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# syntax=docker/dockerfile:1.7
12
# =============================================================================
23
# Sub2API Multi-Stage Dockerfile
34
# =============================================================================
@@ -7,16 +8,18 @@
78
# =============================================================================
89

910
ARG NODE_IMAGE=node:24-alpine
10-
ARG GOLANG_IMAGE=golang:1.26.4-alpine
11+
ARG GOLANG_IMAGE=golang:1.26.5-alpine
1112
ARG ALPINE_IMAGE=alpine:3.21
1213
ARG POSTGRES_IMAGE=postgres:18-alpine
1314
ARG GOPROXY=https://goproxy.cn,direct
1415
ARG GOSUMDB=sum.golang.google.cn
16+
ARG NPM_CONFIG_REGISTRY=
1517

1618
# -----------------------------------------------------------------------------
1719
# Stage 1: Frontend Builder
1820
# -----------------------------------------------------------------------------
1921
FROM ${NODE_IMAGE} AS frontend-builder
22+
ARG NPM_CONFIG_REGISTRY
2023

2124
WORKDIR /app/frontend
2225
ENV NODE_OPTIONS=--max-old-space-size=4096
@@ -26,7 +29,9 @@ RUN corepack enable && corepack prepare pnpm@11.5.2 --activate
2629

2730
# Install dependencies first (better caching)
2831
COPY frontend/package.json frontend/pnpm-lock.yaml frontend/pnpm-workspace.yaml ./
29-
RUN pnpm install --frozen-lockfile
32+
RUN --mount=type=cache,id=sub2api-pnpm-store,target=/root/.local/share/pnpm/store \
33+
if [ -n "${NPM_CONFIG_REGISTRY}" ]; then pnpm config set registry "${NPM_CONFIG_REGISTRY}"; fi && \
34+
pnpm install --frozen-lockfile --prefer-offline
3035

3136
# Copy frontend source and build.
3237
# LegalDocumentView.vue (admin-compliance gate) build-time imports

Makefile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build build-backend build-frontend build-datamanagementd test test-backend test-frontend test-frontend-critical test-datamanagementd secret-scan
1+
.PHONY: build build-backend build-frontend test test-backend test-frontend test-frontend-critical
22

33
FRONTEND_CRITICAL_VITEST := \
44
src/views/auth/__tests__/LinuxDoCallbackView.spec.ts \
@@ -19,10 +19,6 @@ build-backend:
1919
build-frontend:
2020
@pnpm --dir frontend run build
2121

22-
# 编译 datamanagementd(宿主机数据管理进程)
23-
build-datamanagementd:
24-
@cd datamanagement && go build -o datamanagementd ./cmd/datamanagementd
25-
2622
# 运行测试(后端 + 前端)
2723
test: test-backend test-frontend
2824

@@ -36,9 +32,3 @@ test-frontend:
3632

3733
test-frontend-critical:
3834
@pnpm --dir frontend exec vitest run $(FRONTEND_CRITICAL_VITEST)
39-
40-
test-datamanagementd:
41-
@cd datamanagement && go test ./...
42-
43-
secret-scan:
44-
@python3 tools/secret_scan.py

0 commit comments

Comments
 (0)