| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
!20319 merge cleanup-want-sender-stub into master Remove empty WantSenderStub and inherit IRemoteStub directly Created-by: RuiChen_01 Commit-by: RuiChen_01 Merged-by: openharmony_ci Description: **IssueNo**: **Description**: - WantSenderStub was an empty shell class (no methods, no logic) whose only role was an intermediate base class - PendingWantRecord now inherits IRemoteStub<IWantSender> directly, keeping the same IPC descriptor ohos.aafwk.WantSender - Drop want_sender_stub.h, its dedicated unittest want_sender_stub_test, wantsenderstub_fuzzer, and the *WantSenderStub* entry in libabilityms.map - Remove redundant want_sender_stub.h includes from 9 test files - WantSenderProxy and IWantSender are kept unchanged (client-side broker registration for iface_cast) See merge request: openharmony/ability_ability_runtime!20319 | 1 天前 | |
Message: 乘法溢出优化 Signed-off-by: zhengdongdong12 <zhengchengkai@huawei.com> | 11 天前 | |
!20310 merge FixAquireChildProcessInfoErrorCode into master 修复查询子进程相关错误码转化问题 Created-by: SKY2001 Commit-by: SKY2001 Merged-by: openharmony_ci Description: 修复查询子进程相关错误码转化问题 https://gitcode.com/openharmony/ability_ability_runtime/issues/16074?ref=&did=4283744#tid-4283744 See merge request: openharmony/ability_ability_runtime!20310 | 1 天前 | |
refactor: prelaunch no call request Signed-off-by: yangxuguang-huawei <yangxuguang3@h-partners.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: pi (glm-5.2) <ai@local> Change-Id: Ic48c93dcef13e366ed3da1cd4774289497c00f5a | 2 天前 | |
update Signed-off-by: zph000 <zhaopenghui8@huawei.com> Co-Authored-By: Agent | 1 个月前 | |
!20304 merge aq into master 安全告警 Created-by: liuzongze Commit-by: liuzongze@h-partners.com Merged-by: openharmony_ci Description: **IssueNo**: https://gitcode.com/openharmony/ability_ability_runtime/issues/16068 **Description**: **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | 不涉及 | | 成员变量进行赋值或创建需要排查并发 | 不涉及 | | 谨慎在lambda表达式中使用引用捕获 | 不涉及 | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | 不涉及 | | map\vector\list\set等stl模板类使用时需要排查并发 | 不涉及 | | 谨慎考虑加锁范围 | 不涉及 | | 在IPC通信中谨慎使用同步通信方式 | 不涉及 | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | 不涉及 | | 禁止将外部传入的裸指针在内部直接构造智能指针 | 不涉及 | | 禁止多个独立创建的智能指针管理同一地址 | 不涉及 | | 禁止在析构函数中抛异步任务 | 不涉及 | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | 不涉及 | | 禁止在对外接口中未经判空直接使用外部传入的指针 | 不涉及 | | 禁止接口返回局部变量引用 | 不涉及 | | 禁止在信号函数中加锁 | 不涉及 | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | 不涉及 | | 禁止将同一个cpp编译在不同的so中 | 不涉及 | **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | 不涉及 | | json对象在取值之前必须先判断类型,避免类型不匹配 | 不涉及 | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | 不涉及 | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | 不涉及 | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | 不涉及 | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | 不涉及 | | readParcelable获取的对象使用前需要判空 | 不涉及 | | 分配和释放内存的函数需要成对出现 | 不涉及 | | 申请内存后异常退出前需要及时进行内存释放 | 不涉及 | | 内存申请前必须对内存大小进行合法性校验 | 不涉及 | | 内存分配后必须判断是否成功 | 不涉及 | | 禁止使用realloc、alloca函数 | 不涉及 | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | 不涉及 | | 禁止打印内存地址 | 不涉及 | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | 不涉及 | | 禁止对有符号整数进行位操作符运算 | 不涉及 | | 禁止对指针进行逻辑或位运算 | 不涉及 | | 循环次数如果收外部数据控制,需要检验其合法性 | 不涉及 | | 禁止使用内存操作类危险函数,需要使用安全函数 | 不涉及 | | 谨慎使用不可重入函数 | 不涉及 | | 必须检查安全函数的返回值,并进行正确处理 | 不涉及 | | 禁止仅通过TokenType类型判断绕过权限校验 | 不涉及 | **TDD Result**: **XTS Result**: ### 是否已执行L0用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 ### AI检视评分(使用本地代码检视skills扫描): ## 报告元数据 <!-- codecheck-report-metadata:start --> yaml codecheck_report: schema_version: "1.0" scope: "commit 61082c292c 安全告警修复" round: 1 commit_id: "61082c292c8f3030efb4609bca221105f13214c8" change_id: "I63b03585cdaff08e8d48f5f1314351c1cdeb84ba" report_id: "I63b03585cdaff08e8d48f5f1314351c1cdeb84ba-R1" date: "2026-08-27" gate_decision: "approve" risk_level: "low" score: 94 dimensions_required: ["security-scanner", "logic-scanner", "input-scanner"] dimensions_executed: ["security-scanner", "logic-scanner", "input-scanner"] findings_total: 3 findings_by_severity: {P0: 0, P1: 0, P2: 0, P3: 3} gate_blockers: [] must_fix: [] followups: ["SEC-01", "LOG-01", "LOG-02"] <!-- codecheck-report-metadata:end --> --- ## 1. 门禁结论 | 项目 | 结论 | |---|---| | 决策 | **approve** | | 风险等级 | 🟢 low | | 评分 | **94/100** | | 阻塞项 | 无 | | 必须修复(P0/P1) | 0 项 | | 建议跟进(P2/P3) | 3 项 | **一句话结论**:本次安全告警修复(路径遍历前缀校验 + PixelMap 生命周期管理 + NPE 防御 + 日志合规)实现正确、对合法路径零逻辑影响,仅 3 项 P3 跟进项(无阻塞),准予上库。 --- ## 2. 扣分原因 (gate_decision=approve,本节省略) --- ## 3. 必须立即处理(P0/P1) **无。** --- ## 4. 建议本轮或下一补档处理(P2/P3) | ID | 优先级 | 问题 | 建议行动 | 排期 | |---|---|---|---|---| | SEC-01 | P3 | IntentContent.ets:60 aboutToDisappear 调 async releasePixelMaps 不 await(fire-and-forget),组件销毁后 release 异步执行,进程立即退出时可能未完成 | 可接受(OS 回收 native 资源);若需确定释放可在 UIAbility 生命周期或延迟任务中释放 | 下一补档 | | LOG-01 | P3 | IntentContent.ets:130 setAppName(materialItems[0]) 循环内始终传 [0],同 bundle 多 module 时所有 item 的 bundleNameCN 被设为第一个 module 的应用名(预存逻辑 bug,非本次引入) | 改为 materialItems[key];独立逻辑缺陷,建议另起任务 | 独立任务 | | LOG-02 | P3 | IntentDetailPage.ets:144 onBackPress context 为 null 时静默无 fallback,用户按返回无响应 | 可接受(优先防 NPE);若需更好 UX 可加 articlePathStack.pop() fallback | 下一补档 | --- ## 5. 分维度速览 | 维度 | 结果 | 关键说明 | |---|---|---| | security-scanner | ✅ 通过 | 路径遍历修复(IsPathWithinCodePath)实现正确:codePath realpath 规范化 + 补尾 / 防误匹配 + size 边界 + 前缀比较;GetSafeData/ReadAmiData 校验点位于 realpath 后 fopen 前。PixelMap 释放(trackPixelMap/releasePixelMaps)正确管理生命周期。NPE 防御(context 空检查)到位。无 P0/P1 高影响缺陷。 | | logic-scanner | ✅ 通过 | 零逻辑影响:合法路径 realpath 后必在 codePath 内,IsPathWithinCodePath 恒通过;PixelMap 正常加载路径不变;isCompActive 三处异步销毁判断正确。预存 materialItems[0] 逻辑 bug 列为 P3 跟进。 | | input-scanner | ✅ 通过 | uri→ami→realpath→IsPathWithinCodePath 输入链路校验有效,阻断 ../ 越界;ami.find("el2") 子串匹配虽未改,但 IsPathWithinCodePath 兜底拦截越界,纵深防御成立;IntentContent 异步输入 isCompActive 防销毁后写。 | --- ## 6. 关键发现详情 ### [SEC-01] aboutToDisappear fire-and-forget async releasePixelMaps (P3, security-scanner) - **位置**:services/dialog_ui/ams_system_dialog/feature/src/main/ets/view/IntentContent.ets:60-62 - **触发路径**:组件销毁 → aboutToDisappear → isCompActive=false → this.releasePixelMaps()(async,不 await)→ for...of await pm.release() 异步执行 → 若进程立即退出,release 可能未完成 - **影响**:PixelMap native 资源依赖底层 Finalizer 延迟回收;aboutToDisappear 不 await async,理论上 release 可能未完成。实际 OS 在进程退出时回收 native 资源,影响低。 - **证据**: ts aboutToDisappear() { this.isCompActive = false; this.releasePixelMaps(); // async, not awaited } - **建议**:当前可接受(ArkTS 生命周期约束,aboutToDisappear 非 async)。若需确定释放,可在 UIAbility 的 onShow/onForeground 阶段或单次延迟任务中释放。不阻塞上库。 ### [LOG-01] setAppName 循环内始终传 materialItems[0] (P3, logic-scanner) - **位置**:services/dialog_ui/ams_system_dialog/feature/src/main/ets/view/IntentContent.ets:130 - **触发路径**:getInfos → bundleNames.map async → for (key of materialItems) → setAppName(materialItems[0])(循环内始终传第一个 item)→ 同 bundle 多 module 时所有 item.bundleNameCN 被设为第一个 module 的应用名 - **影响**:UI 显示应用名错误(同 bundle 多 module 场景)。功能缺陷,非安全。 - **证据**: ts for (const key of Object.keys(materialItems)) { const iconImg = await this.getAllIntentIcon(materialItems[key].icon, bundleName); ... const appName = await this.setAppName(materialItems[0]); // 应为 materialItems[key] - **建议**:改为 this.setAppName(materialItems[key])。预存 bug(非本次 commit 引入,该行在 diff 上下文未改动),建议另起独立任务修复。 ### [LOG-02] onBackPress context null 无 fallback (P3, logic-scanner) - **位置**:services/dialog_ui/ams_system_dialog/feature/src/main/ets/view/IntentDetailPage.ets:144-146 - **触发路径**:用户按返回 → onBackPress → AppStorage.get('context') → 若为 null → if (context) 不执行 terminateSelf → 无其他 fallback(如 articlePathStack.pop)→ 用户按返回无响应 - **影响**:context 为 null 时返回键无响应,用户体验退化。防 NPE 崩溃优先,可接受。 - **证据**: ts onBackPress() { let context = AppStorage.get('context') as common.UIAbilityContext; if (context) { context.terminateSelf(); } // 无 else fallback } - **建议**:可接受(安全告警优先防 NPE)。若需更好 UX,加 else { this.articlePathStack.pop(); } fallback。不阻塞上库。 See merge request: openharmony/ability_ability_runtime!20304 | 1 天前 | |
Add cfi/pac config Co-Authored-By: Agent Signed-off-by: wangzhen <wangzhen416@huawei.com> 🤖 AI[0%] 👌 AI Adopted[0%] 🧑 Human[100%] | 1 个月前 | |
new process Signed-off-by: wendel <yuwenze1@huawei.com> Co-Authored-By: Agent Change-Id: Icd39e8a6fa7ada974eae4bcb080c851027e6ef9e | 4 个月前 | |
perf(build): enable size_optimize_config on 130 SO targets Add a new services/common:size_optimize_config (same flags as optimize_config minus the explicit -flto=full, so the toolchain's global ThinLTO mode is preserved) and apply it to the 130 ohos_shared_library targets that previously shipped without any optimization config, so unreferenced functions/data are dropped at link time and ROM shrinks without overriding the global LTO policy. -Wl,--gc-sections is an ELF-only linker flag: Apple ld rejects it, so both optimize_config and size_optimize_config now add it only when current_os != "mac", keeping the darwin SDK host build (which links dylibs with -dead_strip) working. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: claude (glm-5.3) <ai@local> | 11 天前 | |
Warn fix Co-Authored-By: Agent Signed-off-by: wangzhen <wangzhen416@huawei.com> 🤖 AI[3%] 👌 AI Adopted[3%] 🧑 Human[97%] Change-Id: Idfdecf1c59a96756280efed987fddab81239203b | 1 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 天前 | ||
| 11 天前 | ||
| 1 天前 | ||
| 2 天前 | ||
| 1 个月前 | ||
| 1 天前 | ||
| 1 个月前 | ||
| 4 个月前 | ||
| 11 天前 | ||
| 1 个月前 |