feat(ds-flow): 前端设计系统治理重构(Flutter 五端 + Web 两端) #2

Merged
wangjia merged 117 commits from worktree-macos-killswitch into main 2026-07-08 00:47:03 +00:00
2 changed files with 31 additions and 0 deletions
Showing only changes of commit 1b091f3be0 - Show all commits
+19
View File
@@ -57,6 +57,14 @@ jobs:
/mnt/scripts/ci/test.sh \
/mnt/scripts/ci/backup-db.sh
- name: shellcheck CI 脚本(ci/)
run: |
docker run --rm \
-v "$PWD/ci:/mnt/ci:ro" \
koalaman/shellcheck:stable \
-S warning \
/mnt/ci/scan-cleartext.sh
# ── Job 2: OpenAPI Sync Check ────────────────────────────────────────────
openapi-check:
name: OpenAPI Sync Check
@@ -85,6 +93,17 @@ jobs:
- name: scan UI text resources for prohibited words
run: bash ci/scan-redline.sh
# ── Job 3b: Cleartext Scan (Android 禁全局明文,#25 控制面已 https) ──────
cleartext-scan:
name: Cleartext Scan — Android 禁明文
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: scan Android manifest for global cleartext
run: bash ci/scan-cleartext.sh
# ── Job 4: Flutter 客户端(分析 + 单测/组件测试)────────────────────────
flutter-client:
name: Flutter — analyze + test
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# scan-cleartext.sh — 禁止 Android manifest 重新开启全局明文(控制面已 https/CF Tunnel)。
# usesCleartextTraffic="true" 会让全 app 允许明文 HTTP,退回 #25 之前的不安全态。
set -euo pipefail
MANIFEST="client/android/app/src/main/AndroidManifest.xml"
if grep -q 'usesCleartextTraffic="true"' "$MANIFEST"; then
echo "$MANIFEST 含 usesCleartextTraffic=\"true\":控制面已 https,禁止全局明文。" >&2
echo " 如个别调试域名确需明文,请用 res/xml/network_security_config.xml 按域白名单,勿开全局。" >&2
exit 1
fi
echo "✅ Android manifest 未开启全局明文"