feat: 接入 iOSGuard LLVM 混淆工具链与 IPA 加固门禁,按分支策略兼容旧版本打包
- 新增 toolchain_manager:构建前自愈校验 LLVM opt 工具链,按 Xcode 版本与渠道隔离 obj_cache - readoor31/readoor31OtherPay Archive 透传 IG_DIST_CHANNEL/IG_OBF_MODE/IG_ALL_GUARD_OFF/IG_RELEASE_SEED - Archive 前核对分发渠道编译条件:上架包缺失 IG_APPSTORE_DISTRIBUTION 即阻断,非上架包带该条件仅告警,未接入 anti_tamper 的分支跳过 - 导出后执行 IPA 加固门禁审计,失败阻断上传;持久化 dSYM、混淆映射、诊断事件码与审计报告 - 混淆是否执行改由分支 AutoPacking/build_policy.json 声明:force_obfuscation=true 强制,否则按任务勾选,兼容旧分支/旧 Tag;恢复打包页混淆勾选框 - 分支未自带混淆脚本时回退服务端脚本并告警;同步更新服务端 L1 混淆脚本 - .gitignore 忽略 iosguard_cache 与 artifacts 运行时目录;README 补充分支打包策略说明
This commit is contained in:
@@ -1441,3 +1441,40 @@ async def delete_project(project_id: str):
|
||||
del root["projects"][project_id]
|
||||
_write_root(root)
|
||||
return {"message": "项目已删除"}
|
||||
|
||||
|
||||
@router.get("/toolchain")
|
||||
async def get_toolchain_info():
|
||||
"""查看当前打包机 Xcode 与 iOSGuard LLVM opt 工具链缓存状态(仅管理员)。"""
|
||||
from ..services.toolchain_manager import get_toolchain_status
|
||||
|
||||
return await get_toolchain_status()
|
||||
|
||||
|
||||
@router.post("/toolchain/refresh")
|
||||
async def refresh_toolchain(request: Request):
|
||||
"""手动触发 Xcode / opt 工具链校验与更新,可选传 {\"force_rebuild\": true}(仅管理员)。"""
|
||||
from ..services.toolchain_manager import discover_toolchain_resolver, ensure_toolchain
|
||||
|
||||
force_rebuild = False
|
||||
try:
|
||||
body = await request.json()
|
||||
if isinstance(body, dict):
|
||||
force_rebuild = bool(body.get("force_rebuild", False))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
resolver = discover_toolchain_resolver()
|
||||
if resolver is None:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail="未找到 iOSGuard 工具链脚本,请先同步 Readoor 源码或配置 IG_TOOLCHAIN_SOURCE_DIR",
|
||||
)
|
||||
try:
|
||||
return await ensure_toolchain(
|
||||
resolver,
|
||||
force_rebuild=force_rebuild,
|
||||
notify_on_event=True,
|
||||
)
|
||||
except Exception as exc:
|
||||
raise HTTPException(status_code=500, detail=str(exc)) from exc
|
||||
|
||||
Reference in New Issue
Block a user