Files
workinf_Blender_Wasm/docs/status/N-025.md
2026-08-12 19:31:41 -04:00

37 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# N-025 Scripting 与平台
状态:`BLOCKED`(默认拒绝策略、真实 Main Text 来源清单、签名 manifest、权限/资源预算、
平台报告和服务端 hash 门已落地;本地隔离执行、真实 server job 与发布审计未实现)
## 已验证切片
1. N-025-A脚本默认拒绝网络、autorun、driver expression 和 add-on 安装entry/dependency
path 必须在项目内,未知权限和重复 ID 会拒绝。
2. N-025-B部分脚本 manifest 要求 SHA-256、固定长度签名、publisher/keyId、权限
allowlist、CPU/内存/墙钟预算,并检查脚本依赖图。
3. N-025-C合法脚本仍要求隔离 sandboxserver job 需要 script/source/input
hash 一致,但当前 endpoint 未配置,返回 `SERVER_JOB_UNAVAILABLE`
4. N-025-DWorker/WebGPU/OffscreenCanvas/OPFS 与 native/CUDA/Metal/HIP/OptiX capability
报告只反映 API 存在或显式 `BLOCKED`
5. N-025-AMain reader从 Blender `Text`/`TextLine` 重建最多 1 MiB、65,536 行的完整
UTF-8 内嵌来源,记录项目相对外部路径、`use_module` autorun 请求和 SHA-256所有来源均为
只读且 `executionStatus=BLOCKED`autorun 请求按默认拒绝处理,不引入 Python 执行入口。
6. `test:scripting-isolation` 独立验证未批准 key 返回 `SCRIPT_SIGNATURE_INVALID`,批准 key
仍返回 `SCRIPT_SANDBOX_UNAVAILABLE`server job 返回 `SERVER_JOB_UNAVAILABLE`;测试不创建
本地执行器,也不把签名校验误报为 sandbox。
## 仍然阻断
- N-025-B/C签名验证密钥管理、无网络 CPython/native sandbox、server Blender job 和
output hash 提交。
- N-025-D/E真实 GPU/native window/file watcher 适配、恶意脚本/依赖混淆/逃逸/重放、
审计日志和发布门。
## 验收
```bash
npm --prefix web run test:script-main-reader
npm --prefix web run test:scripting-isolation
WEB_TEST_PORT=5325 npm --prefix web run test:e2e -- --grep "N-025 script"
```