mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 12:43:16 -04:00
da2e4ab018a369fa4a46df70d96b612b32039da8
192 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
da2e4ab018 |
utils_0820
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> 🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> |
||
|
|
71d8e6473a |
!20218 merge fdrisk into master
fd leak risk Created-by: zivzhen Commit-by: wangzhen Merged-by: openharmony_ci Description: **IssueNo**: **Description**: **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | ok | | 成员变量进行赋值或创建需要排查并发 | ok | | 谨慎在lambda表达式中使用引用捕获 | ok | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | ok | | map\vector\list\set等stl模板类使用时需要排查并发 | ok | | 谨慎考虑加锁范围 | ok | | 在IPC通信中谨慎使用同步通信方式 | ok | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | ok | | 禁止将外部传入的裸指针在内部直接构造智能指针 | ok | | 禁止多个独立创建的智能指针管理同一地址 | ok | | 禁止在析构函数中抛异步任务 | ok | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | ok | | 禁止在对外接口中未经判空直接使用外部传入的指针 | ok | | 禁止接口返回局部变量引用 | ok | | 禁止在信号函数中加锁 | ok | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | ok | | 禁止将同一个cpp编译在不同的so中 | ok | **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | ok | | json对象在取值之前必须先判断类型,避免类型不匹配 | ok | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | ok | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | ok | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | ok | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | ok | | readParcelable获取的对象使用前需要判空 | ok | | 分配和释放内存的函数需要成对出现 | ok | | 申请内存后异常退出前需要及时进行内存释放 | ok | | 内存申请前必须对内存大小进行合法性校验 | ok | | 内存分配后必须判断是否成功 | ok | | 禁止使用realloc、alloca函数 | ok | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | ok | | 禁止打印内存地址 | ok | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | ok | | 禁止对有符号整数进行位操作符运算 | ok | | 禁止对指针进行逻辑或位运算 | ok | | 循环次数如果收外部数据控制,需要检验其合法性 | ok | | 禁止使用内存操作类危险函数,需要使用安全函数 | ok | | 谨慎使用不可重入函数 | ok | | 必须检查安全函数的返回值,并进行正确处理 | ok | | 禁止仅通过TokenType类型判断绕过权限校验 | ok | **TDD Result**: pass **XTS Result**: pass ### 是否已执行L0用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 ### AI检视评分(使用本地代码检视skills扫描): See merge request: openharmony/ability_ability_runtime!20218 |
||
|
|
bccc5b79ca |
!20202 merge bugfix/insight-intent-json-parse-clean into master
fix(insight_intent): guard json::dump against deep-nesting stack overflow Created-by: RuiChen_01 Commit-by: RuiChen_01 Merged-by: openharmony_ci Description: **IssueNo**: **Description**: Guard `nlohmann::json::dump()` against deep-nesting stack overflow in the insight_intent chain. `nlohmann::json::dump()` recurses on nested values; super-deep input causes SIGSEGV stack overflow that `try/catch` cannot intercept. Changes: - `intent_json_safe_get.h/.cpp`: add iterative `IsJsonDepthOk` walker and `JSON_DUMP_MAX_DEPTH` (100) bound; `SafeDump`/`SafeDumpTo` reject over-depth input before `dump()`. Definitions live in `intent_json_safe_get.cpp`, compiled only into the ability_manager innerkit so symbols resolve for `libabilityms.so` and direct-compiling test/fuzz targets (`libabilityms.map` hides non-whitelisted symbols). - `function_call_convert.cpp`: validate user-provided `inputSchema` depth before merge; switch `.dump()` calls to `SafeDumpTo`. - `insight_intent_execute_result.cpp` / `insight_intent_info_for_query.cpp`: switch `ToJsonString` / `Marshalling` dumps to the safe wrappers. - Add `IsJsonDepthOk` boundary tests (under/at/over limit). Existing `SafeDump` users (`extract_insight_intent_profile`, `insight_intent_profile`, `insight_intent_rdb_storage_mgr`) automatically inherit the depth guard. **稳定性自检:** | 自检项 | 自检结果 | | --- | --- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | N/A | | 成员变量进行赋值或创建需要排查并发 | N/A | | 谨慎在lambda表达式中使用引用捕获 | N/A | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | OK | | map\vector\list\set等stl模板类使用时需要排查并发 | OK | | 谨慎考虑加锁范围 | N/A | | 在IPC通信中谨慎使用同步通信方式 | N/A | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | N/A | | 禁止将外部传入的裸指针在内部直接构造智能指针 | N/A | | 禁止多个独立创建的智能指针管理同一地址 | N/A | | 禁止在析构函数中抛异步任务 | N/A | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | N/A | | 禁止在对外接口中未经判空直接使用外部传入的指针 | OK | | 禁止接口返回局部变量引用 | OK | | 禁止在信号函数中加锁 | N/A | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | OK | | 禁止将同一个cpp编译在不同的so中 | OK | **安全编码自检:** | 自检项 | 自检结果 | | --- | --- | | 裸指针避免通过隐式转换构造为sptr | N/A | | json对象在取值之前必须先判断类型,避免类型不匹配 | OK | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | OK (depth bound = 100) | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | OK | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | N/A | | 指针变量、表示资源描述符的变量,bool变量必须赋初值 | OK | | readParcelable获取的对象使用前需要判空 | N/A | | 分配和释放内存的函数需要成对出现 | N/A | | 申请内存后异常退出前需要及时进行内存释放 | OK (try/catch) | | 内存申请前必须对内存大小进行合法性校验 | N/A | | 内存分配后必须判断是否成功 | N/A | | 禁止使用realloc、alloca函数 | OK | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | OK | | 禁止打印内存地址 | OK | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | N/A | | 禁止对有符号整数进行位操作符运算 | N/A | | 禁止对指针进行逻辑或位运算 | N/A | | 循环次数如果受外部数据控制,需要检验其合法性 | OK (depth bound) | | 禁止使用内存操作类危险函数,需要使用安全函数 | N/A | | 谨慎使用不可重入函数 | N/A | | 必须检查安全函数的返回值,并进行正确处理 | OK | | 禁止仅通过TokenType类型判断绕过权限校验 | N/A | See merge request: openharmony/ability_ability_runtime!20202 |
||
|
|
d5457500da |
fix(insight_intent): guard json::dump against deep-nesting stack overflow
nlohmann::json::dump() recurses on nested values; super-deep input causes SIGSEGV stack overflow that try/catch cannot intercept. - Add iterative IsJsonDepthOk walker with JSON_DUMP_MAX_DEPTH (100) bound; SafeDump/SafeDumpTo reject over-depth input before dump(). Definitions live in intent_json_safe_get.cpp, compiled only into the ability_manager innerkit so symbols resolve for libabilityms.so and direct-compiling test/fuzz targets (libabilityms.map hides non-whitelisted symbols). - Switch raw .dump() calls in function_call_convert, execute_result and info_for_query to the safe wrappers; validate inputSchema depth before merge. - Add IsJsonDepthOk boundary tests (under/at/over limit). 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 (unknown) <ai@local> Co-authored-by: claude (glm-5.3) <ai@local> Co-authored-by: claude (unknown) <ai@local> Co-authored-by: claude (glm-5.3) <ai@local> Co-authored-by: claude (unknown) <ai@local> Co-authored-by: claude (glm-5.3) <ai@local> Co-authored-by: claude (unknown) <ai@local> Co-authored-by: claude (glm-5.3) <ai@local> Co-authored-by: claude (unknown) <ai@local> |
||
|
|
b54e454c0b |
cli-failure-reason
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> 🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> |
||
|
|
ba267e40a1 |
fd leak risk
Signed-off-by: wangzhen <wangzhen416@huawei.com> AI[99%] Human Fixed[0%] Human[1%] AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> Change-Id: I3a516c2a433ee3a42009797345884dc7d46eb35a |
||
|
|
22dfdfaa88 |
!20104 merge 降低数据库初始化失败阻塞时间 into master
新增resetFunction接口优化数据库锁和阻塞时间 Created-by: zhu-feimo Commit-by: zhu-feimo Merged-by: openharmony_ci Description: **IssueNo**: [#15888](https://gitcode.com/openharmony/ability_ability_runtime/issues/15888) **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扫描): # 代码检视报告 — cli_tool_framework ResetNamespaceFunctions(Round 1 / 最新提交) > 统一报告由 codecheck 工作台生成,**用于门禁管控**。所有 codecheck 检视(通用编排、deep-scan、单维度 skill)合并出的统一报告必须遵循本模板:章节顺序、字段名、报告元数据块、评分与门禁规则均为**固定格式**,跨报告保持一致,便于门禁脚本解析与历史对比。 > 生成入口:[`README.md`](README.md) → Step 4;合并逻辑见 [`codecheck-orchestrator/SKILL.md`](codecheck-orchestrator/SKILL.md)。 > 权威评分与门禁规则见文末 **附录 A**,生成时必须按其计算,不得自创分值。 --- ## 报告元数据 > **门禁脚本只读取本 YAML 块**。字段名与取值域为固定合约,禁止改名、增删或自定义取值。人工阅读与半自动化复核时,仅看本块即可快速获取决策结论。 ```yaml codecheck_report: schema_version: "1.0" scope: "cli_tool_framework" round: 1 commit_id: "d100f7118fda72ae81d28818627edfd9a2830936" change_id: "" commit_subject: "新增resetFunction接口优化数据库锁和阻塞时间" date: "2026-08-09" dimensions_required: [] dimensions_executed: ["manual-review", "logic-analysis", "test-coverage", "coding-standards"] waived_dimensions: [] findings_total: 3 findings_by_severity: {P0: 0, P1: 0, P2: 0, P3: 3} score: 94 risk_level: "low" gate_decision: "approve" gate_blockers: [] must_fix: [] followups: ["F-06", "F-07", "F-08"] ``` **取值域(唯一合法值)**:`risk_level ∈ {low, medium, high, unknown}`;`gate_decision ∈ {approve, conditional, block, insufficient}`。四项决策表见附录 A 第 2 节。 --- ## 1. 基本信息 | 项目 | 值 | |------|-----| | 检视范围 | cli_tool_framework | | commit-id | `d100f7118fda72ae81d28818627edfd9a2830936` | | Change-Id | 未在 commit 中找到 | | commit message | `新增resetFunction接口优化数据库锁和阻塞时间` | | 检视日期 | `2026-08-09` | | 检视轮次 | Round 1 | | 检视维度 | `manual-review + logic-analysis + test-coverage + coding-standards` | ### 提交内容核对(目标为提交时必填) | 校验项 | 结果 | |--------|------| | 提交范围 | 28 文件(+1665/−170 行),主要是 cli_tool_framework 目录下的实现和测试文件 | | 主要变更内容 | 新增 ResetNamespaceFunctions API、数据库锁优化(重试时间从 500ms 降至 40ms)、NAPI 错误处理增强、空数据处理改进 | | 提交完整性 | ⚠️ 缺少 Change-Id,Signed-off-by 已存在 | --- ## 2. 总体评价 ### 2.1 上库质量评估结论 | 指标 | 结论 | |------|------| | **整体评分** | **94/100**(计算过程见附录 A,扣分明细见 2.3) | | **风险等级** | 🟢 低风险 | | **上库决策** | ✅ **可以上库** | **决策依据**(逐条列出,门禁脚本比对 YAML 块复核): - 依据 1:无 P0/P1 问题 - 依据 2:评分 94 ≥ 90,命中附录 A 决策矩阵第 3 行 → approve - 依据 3:3 项 P3 观察项不阻塞上库 **阻塞项(Gate Blocker)**: - 无 **上库条件(condition = 放行时必须满足,为空表示无条件)**: - 无 **设计说明**: 本提交在 KVStore 不支持事务的约束下,采用了合理的错误处理设计: - **ResetNamespaceFunctions/BatchRegisterFunctions 非原子操作**:通过返回错误码让调用方重试,这是无事务环境下的标准做法 - **空数据处理语义变更**:从"空数据=错误"改为"空数据=空列表",支持 ResetNamespaceFunctions 的"删除所有"用例 - **RestoreKvStore 返回类型简化**:从 Status 改为 void,统一错误处理路径 ### 2.2 各维度通过率 | 维度 | 通过率 | 等级 | 评价 | |------|--------|------|------| | Logic Analysis | 🟢 100% | 优秀 | 设计合理,符合无事务环境的最佳实践 | | Test Coverage | 🟢 95% | 优秀 | 测试覆盖全面,包含边界条件和错误路径 | | Coding Standards | 🟢 95% | 优秀 | 基本符合规范,少量文档待补充 | | API Compatibility | 🟢 100% | 优秀 | API 变更是必要的语义改进 | ### 2.3 评分扣分明细 | 严重等级 | 权重 | 数量 | 扣分 | |---------|------|------|------| | P0 致命 | −30 | 0 | 0 | | P1 严重 | −12 | 0 | 0 | | P2 一般 | −5 | 0 | 0 | | P3 提示 | −2 | 3 | −6 | | **合计** | | **3** | **−6** → 评分 **94** | > 公式:`评分 = max(0, 100 − (30×P0 + 12×P1 + 5×P2 + 2×P3))`;详见附录 A。 --- ## 3. 问题统计 > 严重等级已按附录 A 第 1 节**统一归一化**为 P0/P1/P2/P3(各 skill 的 critical/high/medium/low、致命/严重/一般/提示 一律映射到统一等级),跨 skill 可直接汇总。 | 维度 | 总数 | P0 致命 | P1 严重 | P2 一般 | P3 提示 | |------|------|---------|---------|---------|---------| | Coding Standards | 2 | 0 | 0 | 0 | 2 | | Code Maintainability | 1 | 0 | 0 | 0 | 1 | | **总计** | **3** | **0** | **0** | **0** | **3** | --- ## 4. 高优先级发现(P0/P1,跨维度去重后) > 同一 `file:line` 被多个 skill 命中时合并为一条,标注全部维度来源。每条发现必须包含以下字段(缺失视为格式违规): | ID | 维度来源 | 位置 | 严重等级 | 概述 | 影响 | 触发路径 | 建议 | 状态 | |----|---------|------|---------|------|------|---------|------|------| **无 P0/P1 问题。** --- ## 5. 分维度明细 > 保留各 skill 原始结论(可精简字段,不可改判等级)。编号固定:5.1/5.2/… 对应实际执行维度;未执行的维度删除小节或标注"未执行(原因)"。 ### 5.1 设计说明(Logic Analysis) 在 KVStore 不支持事务的约束下,以下设计是合理的工程权衡: | 设计点 | 位置 | 说明 | |--------|------|------| | **ResetNamespaceFunctions 非原子性** | `cli_function_data_manager.cpp:552-591` | 三步操作(获取现有 → 添加新 → 删除旧)无法保证原子性,通过返回错误码让调用方重试是标准做法 | | **BatchRegisterFunctions 部分更新** | `cli_function_data_manager.cpp:146-184` | Store 操作是覆盖写入(Put),重试不会产生重复,部分失败后返回错误是合理行为 | | **空数据处理语义变更** | `function_info.cpp:420-429`, `tool_info.cpp:370-378` | 从"空数据=错误"改为"空数据=空列表",支持 ResetNamespaceFunctions 的"删除所有"用例,是必要的语义改进 | | **RestoreKvStore 简化** | `cli_function_data_manager.cpp:454-457` | 返回类型从 Status 改为 void,统一错误处理路径,恢复失败后 kvStorePtr_ 置空,后续操作会失败 | ### 5.2 Coding Standards(编码规范) | ID | 位置 | 类型 | 概述 | 等级 | |----|------|------|------|------| | F-06 | `cli_function_data_manager.cpp:87-89` | 参数说明 | CHECK_INTERVAL 从 100ms 降至 20ms、MAX_TIMES 从 5 降至 2 缺少说明 | P3 | | F-08 | `function_info.cpp:405-414` | 验证规则说明 | 函数名和命名空间禁止 '/' 字符的验证规则缺少文档说明 | P3 | ### 5.3 Code Maintainability(代码可维护性) | ID | 位置 | 类型 | 概述 | 等级 | |----|------|------|------|------| | F-07 | `js_function_manager_utils.cpp:68-73` | 错误处理不完整 | napi_create_array 增加了错误检查,但 napi_create_object 未检查 | P3 | --- ## 6. 待跟进(P3 观察项) | # | ID | 发现 | 需要行动 | |---|----|------|---------| | 1 | F-06 | 重试时间参数缺少说明 | 添加注释说明为何选择 20ms/2 次 | | 2 | F-07 | napi_create_object 未检查错误 | 考虑添加错误检查以保持一致性 | | 3 | F-08 | '/' 验证规则缺少文档 | 添加代码注释说明验证原因(与 KVStore key 格式相关) | --- ## 7. 附录 ### 7.1 变更文件清单(或检视对象文件清单) | 文件 | 状态 | |------|------| | `cli_tool_framework/frameworks/js/napi/cli_tool_manager/src/js_cli_manager.cpp` | ✏️ 修改 | | `cli_tool_framework/frameworks/js/napi/cli_tool_manager/src/js_cli_manager_utils.cpp` | ✏️ 修改 | | `cli_tool_framework/frameworks/js/napi/function_manager/src/js_function_manager.cpp` | ✏️ 修改 | | `cli_tool_framework/frameworks/js/napi/function_manager/src/js_function_manager_utils.cpp` | ✏️ 修改 | | `cli_tool_framework/interfaces/cli_tool/ICliToolManager.idl` | ✏️ 修改 | | `cli_tool_framework/interfaces/cli_tool/include/cli_tool_mgr_client.h` | ✏️ 修改 | | `cli_tool_framework/interfaces/cli_tool/include/tool_info.h` | ✏️ 修改 | | `cli_tool_framework/interfaces/cli_tool/src/cli_tool_mgr_client.cpp` | ✏️ 修改 | | `cli_tool_framework/interfaces/cli_tool/src/tool_info.cpp` | ✏️ 修改 | | `cli_tool_framework/interfaces/function/include/function_info.h` | ✏️ 修改 | | `cli_tool_framework/interfaces/function/src/function_info.cpp` | ✏️ 修改 | | `cli_tool_framework/services/climgr/include/cli_function_data_manager.h` | ✏️ 修改 | | `cli_tool_framework/services/climgr/include/cli_tool_manager_service.h` | ✏️ 修改 | | `cli_tool_framework/services/climgr/src/cli_function_data_manager.cpp` | ✏️ 修改 | | `cli_tool_framework/services/climgr/src/cli_tool_manager_service.cpp` | ✏️ 修改 | | `cli_tool_framework/test/unittest/cli_function_data_manager_test/cli_function_data_manager_test.cpp` | ✏️ 修改 | | `cli_tool_framework/test/unittest/cli_function_data_manager_test/mock_single_kv_store.h` | ✏️ 修改 | | `cli_tool_framework/test/unittest/cli_tool_mgr_client_test/cli_tool_mgr_client_test.cpp` | ✏️ 修改 | | `cli_tool_framework/test/unittest/cli_tool_mgr_client_test/mock/include/icli_tool_manager.h` | ✏️ 修改 | | `cli_tool_framework/test/unittest/cli_tool_mgr_client_test/mock/include/mock_cli_tool_mgr_client_flag.h` | ✏️ 修改 | | `cli_tool_framework/test/unittest/cli See merge request: openharmony/ability_ability_runtime!20104 |
||
|
|
46d006b1a2 |
!20148 merge feat/rom-optimize-config-bulk into master
feat(rom): adopt optimize_config in 17 effective targets Created-by: RuiChen_01 Commit-by: RuiChen_01 Merged-by: openharmony_ci Description: **IssueNo**: **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扫描): See merge request: openharmony/ability_ability_runtime!20148 |
||
|
|
1fd05adacc |
feat(rom): adopt optimize_config in 11 effective targets
Based on empirical findings (libappms +10KB, ets_environment +0KB, cj_ability_ffi +0KB), exclude SA services, platformsdk innerapi, and small-size targets where optimize_config has no actual benefit. CJ extension (likely effective, non-platformsdk): - cj_form_extension, cj_embedded_ui_extension ANI wrappers (small but stable): - app_memory_optimizer_ani_kit, share_extension_ani, uri_permission_manager_ani_kit NAPI wrappers (small but stable): - autostartupcallback, appmemoryoptimizer_napi, insightintentprovider_napi, dialogrequest_napi, intent_client, scriptmanager_napi Excluded (no empirical benefit based on prior measurements): - SA services: libappms, libupms, libclimgr (shlib_type=sa overrides) - platformsdk innerapi: ets_environment, cli_tool_client, ability_deps_wrapper, perm_verification, ability_start_options, cj_extensionkit_native, ark_interop_helper_ffi - cj_ability_ffi (target cflags -O2 overrides optimize_config -Oz) Skipped (already adopted in other PRs by other contributors): - agentmgr, climanager_napi, functionmanager_napi Skipped (small size, not worth the change): - callee_napi Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> |
||
|
|
4ac03f5a4a |
0809_cli_50
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] |
||
|
|
909828d36e |
新增resetFunction接口优化数据库锁和阻塞时间
Signed-off-by: zhu-feimo <zhufeimo1@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: claude (glm-4.7) <ai@local> Co-authored-by: claude (unknown) <ai@local> |
||
|
|
69e415aca9 |
ROM_0805
Signed-off-by: Luobniz21 <luoyicong@h-partners.com>
🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%]
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date: Wed Aug 5 17:52:47 2026 +0800
#
# On branch ROM_0805
# Your branch is up to date with 'origin/ROM_0805'.
#
# Changes to be committed:
# modified: agent_runtime_framework/services/agentmgr/BUILD.gn
# modified: cli_tool_framework/frameworks/js/napi/cli_tool_manager/BUILD.gn
# modified: cli_tool_framework/frameworks/js/napi/function_manager/BUILD.gn
# modified: cli_tool_framework/interfaces/cli_tool/BUILD.gn
# modified: cli_tool_framework/services/climgr/BUILD.gn
#
# Untracked files:
# nul
# skills/codecheck/orchestrator/codecheck_report_BTI_20260805.md
# skills/codecheck/orchestrator/codecheck_report_cli_tool_framework_ROM_0805_20260805.md
# skills/codecheck/orchestrator/refute_log_BTI_20260805.md
# skills/codecheck/orchestrator/refute_log_ROM_0805_20260805.md
#
Co-authored-by: opencode (glm-5.2) <ai@local>
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# interactive rebase in progress; onto
|
||
|
|
d18608b4b7 |
!20005 merge secproblem into master
Code warning fix Created-by: zivzhen Commit-by: wangzhen Merged-by: openharmony_ci Description: **IssueNo**: **Description**: **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | ok | | 成员变量进行赋值或创建需要排查并发 | ok | | 谨慎在lambda表达式中使用引用捕获 | ok | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | ok | | map\vector\list\set等stl模板类使用时需要排查并发 | ok | | 谨慎考虑加锁范围 | ok | | 在IPC通信中谨慎使用同步通信方式 | ok | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | ok | | 禁止将外部传入的裸指针在内部直接构造智能指针 | ok | | 禁止多个独立创建的智能指针管理同一地址 | ok | | 禁止在析构函数中抛异步任务 | ok | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | ok | | 禁止在对外接口中未经判空直接使用外部传入的指针 | ok | | 禁止接口返回局部变量引用 | ok | | 禁止在信号函数中加锁 | ok | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | ok | | 禁止将同一个cpp编译在不同的so中 | ok | **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | ok | | json对象在取值之前必须先判断类型,避免类型不匹配 | ok | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | ok | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | ok | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | ok | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | ok | | readParcelable获取的对象使用前需要判空 | ok | | 分配和释放内存的函数需要成对出现 | ok | | 申请内存后异常退出前需要及时进行内存释放 | ok | | 内存申请前必须对内存大小进行合法性校验 | ok | | 内存分配后必须判断是否成功 | ok | | 禁止使用realloc、alloca函数 | ok | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | ok | | 禁止打印内存地址 | ok | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | ok | | 禁止对有符号整数进行位操作符运算 | ok | | 禁止对指针进行逻辑或位运算 | ok | | 循环次数如果收外部数据控制,需要检验其合法性 | ok | | 禁止使用内存操作类危险函数,需要使用安全函数 | ok | | 谨慎使用不可重入函数 | ok | | 必须检查安全函数的返回值,并进行正确处理 | ok | | 禁止仅通过TokenType类型判断绕过权限校验 | ok | **TDD Result**: pass **XTS Result**: pass ### 是否已执行L0用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 ### AI检视评分(使用本地代码检视skills扫描): See merge request: openharmony/ability_ability_runtime!20005 |
||
|
|
a79ddedca4 |
!19952 merge warning into master
安全告警处理 Created-by: lidongrui Commit-by: DESKTOP-UGVMD4B\DawnComing Merged-by: openharmony_ci Description: **IssueNo**: **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扫描): See merge request: openharmony/ability_ability_runtime!19952 |
||
|
|
416eb54322 |
Code warning fix
Signed-off-by: wangzhen <wangzhen416@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> Change-Id: Id9ecd8b6ce773ca8d9af1adf3000d3005d6573cd |
||
|
|
8ebe28c442 |
!19981 merge bugfix/cli-safety-coding into master
bugfix: climgr safety coding Created-by: yangxuguang-huawei Commit-by: yangxuguang-huawei Merged-by: openharmony_ci Description: **IssueNo**: https://gitcode.com/openharmony/ability_ability_runtime/issues/15784 **Description**: **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | ok | | 成员变量进行赋值或创建需要排查并发 | ok| | 谨慎在lambda表达式中使用引用捕获 | ok| | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | ok| | map\vector\list\set等stl模板类使用时需要排查并发 | ok| | 谨慎考虑加锁范围 | ok| | 在IPC通信中谨慎使用同步通信方式 | ok| | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | ok| | 禁止将外部传入的裸指针在内部直接构造智能指针 | ok| | 禁止多个独立创建的智能指针管理同一地址 | ok| | 禁止在析构函数中抛异步任务 | ok| | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | ok| | 禁止在对外接口中未经判空直接使用外部传入的指针 | ok| | 禁止接口返回局部变量引用 | ok| | 禁止在信号函数中加锁 | ok| | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | ok| | 禁止将同一个cpp编译在不同的so中 | ok| **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | ok| | json对象在取值之前必须先判断类型,避免类型不匹配 | ok| | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | ok | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | ok| | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | ok | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | ok| | readParcelable获取的对象使用前需要判空 | ok| | 分配和释放内存的函数需要成对出现 | ok| | 申请内存后异常退出前需要及时进行内存释放 | ok | | 内存申请前必须对内存大小进行合法性校验 | ok| | 内存分配后必须判断是否成功 | ok| | 禁止使用realloc、alloca函数 | ok| | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | ok| | 禁止打印内存地址 | ok| | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | ok| | 禁止对有符号整数进行位操作符运算 | ok| | 禁止对指针进行逻辑或位运算 | ok| | 循环次数如果收外部数据控制,需要检验其合法性 | ok| | 禁止使用内存操作类危险函数,需要使用安全函数 | ok| | 谨慎使用不可重入函数 | ok| | 必须检查安全函数的返回值,并进行正确处理 | ok| | 禁止仅通过TokenType类型判断绕过权限校验 | ok| **TDD Result**: 已验证OK **XTS Result**: 已验证OK ### 是否已执行L0用例 - [x] 已验证 - [ ] 不涉及。如不涉及,请写明理由 ### AI检视评分(使用本地代码检视skills扫描): See merge request: openharmony/ability_ability_runtime!19981 |
||
|
|
82eaeb5be8 |
安全告警
Signed-off-by: lidongrui <lidongrui3@huawei.com> Co-Authored-By: Agent 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] |
||
|
|
772c240b14 |
!19959 merge master into master
cli_fix Created-by: Luobniz21 Commit-by: Luobniz21 Merged-by: openharmony_ci Description: 问题1:先取 int64_t(覆盖 JSON 整数全范围),再显式做范围校验,超界直接跳过该参数——避免向 WantParams 注入被静默截断的错误值。 问题2:std::stoll/std::stoi 在空串、非数字、越界时会抛 std::invalid_argument / std::out_of_range; **IssueNo**: **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用例 - [x] 已验证 - [ ] 不涉及。如不涉及,请写明理由 ### AI检视评分(使用本地代码检视skills扫描): See merge request: openharmony/ability_ability_runtime!19959 |
||
|
|
7563e359a3 |
!19750 merge 扫描问题修改 into master
扫描问题修改 Created-by: zhu-feimo Commit-by: zhu-feimo Merged-by: openharmony_ci Description: **IssueNo**: [#15576](https://gitcode.com/openharmony/ability_ability_runtime/issues/15576) **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用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19750 |
||
|
|
26a04ea220 |
bugfix: climgr safety coding
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: I977d78f28265f6a074bc30c3be06e70338f11a7c |
||
|
|
c41b5df052 |
cli_fix
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> 🤖 AI[100%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[100%] # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Mon Jul 27 21:10:59 2026 +0800 # # On branch master # Your branch is up to date with 'origin/master'. # # Changes to be committed: # modified: cli_tool_framework/services/climgr/src/tool_util.cpp # modified: cli_tool_framework/services/common/src/cli_event_report.cpp # # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Mon Jul 27 21:59:16 2026 +0800 # # On branch master # Your branch and 'origin/master' have diverged, # and have 1 and 1 different commits each, respectively. # (use "git pull" to merge the remote branch into yours) # # Changes to be committed: # modified: cli_tool_framework/services/climgr/src/tool_util.cpp # modified: cli_tool_framework/services/common/src/cli_event_report.cpp # Co-authored-by: claude (glm-4.7) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> |
||
|
|
1540b1af05 |
!19944 merge FixPidNameSpace into master
修复未指定pid namespace导致killpg机制失效 Created-by: SKY2001 Commit-by: SKY2001 Merged-by: openharmony_ci Description: **IssueNo**: https://gitcode.com/openharmony/ability_ability_runtime/issues/15748?ref=&did=4193836#tid-4193836 **Description**: **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | pass | | 成员变量进行赋值或创建需要排查并发 | pass | | 谨慎在lambda表达式中使用引用捕获 | pass | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | pass | | map\vector\list\set等stl模板类使用时需要排查并发 | pass | | 谨慎考虑加锁范围 | pass | | 在IPC通信中谨慎使用同步通信方式 | pass | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | pass | | 禁止将外部传入的裸指针在内部直接构造智能指针 | pass | | 禁止多个独立创建的智能指针管理同一地址 | pass | | 禁止在析构函数中抛异步任务 | pass | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | pass | | 禁止在对外接口中未经判空直接使用外部传入的指针 | pass | | 禁止接口返回局部变量引用 | pass | | 禁止在信号函数中加锁 | pass | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | pass | | 禁止将同一个cpp编译在不同的so中 | pass | **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | pass | | json对象在取值之前必须先判断类型,避免类型不匹配 | pass | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | pass | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | pass | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | pass | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | pass | | readParcelable获取的对象使用前需要判空 | pass | | 分配和释放内存的函数需要成对出现 | pass | | 申请内存后异常退出前需要及时进行内存释放 | pass | | 内存申请前必须对内存大小进行合法性校验 | pass | | 内存分配后必须判断是否成功 | pass | | 禁止使用realloc、alloca函数 | pass | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | pass | | 禁止打印内存地址 | pass | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | pass | | 禁止对有符号整数进行位操作符运算 | pass | | 禁止对指针进行逻辑或位运算 | pass | | 循环次数如果收外部数据控制,需要检验其合法性 | pass | | 禁止使用内存操作类危险函数,需要使用安全函数 | pass | | 谨慎使用不可重入函数 | pass | | 必须检查安全函数的返回值,并进行正确处理 | pass | | 禁止仅通过TokenType类型判断绕过权限校验 | pass | **TDD Result**: pass **XTS Result**: pass ### 是否已执行L0用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 ### AI检视评分(使用本地代码检视skills扫描): See merge request: openharmony/ability_ability_runtime!19944 |
||
|
|
7e7823aae2 |
扫描问题修改
Signed-off-by: zhu-feimo <zhufeimo1@huawei.com> AI[53%] Human Fixed[0%] Human[47%] AI Adopted[100%] |
||
|
|
51a4c000ce |
修复未指定pid namespace导致killpg机制失效
Signed-off-by: SKY2001 <songtianyu10@huawei.com> |
||
|
|
45201173ff |
cli_dot_fix
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[0%] 👌 AI Adopted[0%] |
||
|
|
4dee271975 |
CLI-Sigterm-report
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Jul 21 19:38:22 2026 +0800 # # On branch cli-sigterm-report # Your branch is up to date with 'origin/cli-sigterm-report'. # # Changes to be committed: # modified: cli_tool_framework/services/climgr/include/cli_tool_manager_service.h # modified: cli_tool_framework/services/climgr/include/session_record.h # modified: cli_tool_framework/services/climgr/src/cli_tool_manager_service.cpp # modified: cli_tool_framework/services/climgr/src/process_manager.cpp # modified: cli_tool_framework/test/unittest/cli_event_report_test/BUILD.gn # modified: cli_tool_framework/test/unittest/cli_tool_mgr_service_test/BUILD.gn # modified: cli_tool_framework/test/unittest/process_manager_test/BUILD.gn # modified: services/abilitymgr/include/ability_manager_service.h # modified: services/abilitymgr/src/ability_manager_service.cpp # modified: services/abilitymgr/src/keep_alive/keep_alive_process_manager.cpp # modified: test/unittest/ability_auto_startup_service_third_test/BUILD.gn # modified: test/unittest/block_all_app_start_interceptor_test/BUILD.gn # |
||
|
|
76ce966cfe |
bugfix: climgr safety coding
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> |
||
|
|
3c57ed3a4f |
0716_gnfix
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> 🤖 AI[0%] 🔧 Human Fixed[0%] 🧑 Human[100%] 👌 AI Adopted[0%] |
||
|
|
e0995f7db4 |
Add cfi/pac config
Co-Authored-By: Agent Signed-off-by: wangzhen <wangzhen416@huawei.com> 🤖 AI[0%] 👌 AI Adopted[0%] 🧑 Human[100%] |
||
|
|
63a9231e3e |
revert(skill): do not strip skill params after ForegroundNew, fix exitCode propagation
Two related fixes folded together:
1. Revert the L2 RemoveSkillParam calls added in
"fix(skill): strip skill params from non-skill want paths".
The L2 strip in AbilityRecord::ForegroundAbility and
ForegroundUIExtensionAbility breaks the legitimate cold-start
skill path:
StartAbilityByCallWithSkill (target not yet started)
-> StartAbilityByCall -> ResolveLocked
-> target launches and enters ForegroundAbility
-> ForegroundNew(GetWant(), ...) IPCs the want (with skill
params) to the app, but the FOREGROUND_NEW branch in
UIAbilityImpl::AbilityTransaction only checks
InsightIntent, not skill, so HandleExecuteSkill is NOT
called here
-> L2 then strips skill params from want_
-> later the ability moves to BACKGROUND_NEW
-> BackgroundNew(GetWant(), ...) reuses the now-stripped want_
-> app-side IsSkillExecute(want) returns false
-> HandleExecuteSkill is never called, skill silently drops
InsightIntent is unaffected because it triggers in FOREGROUND_NEW
(HandleExecuteInsightIntentForeground), so the params are consumed
before L2 clears them. Skill only triggers in BACKGROUND_NEW, which
makes L2 unsafe for skill. L1 (entry stripping) and L3
(ExecuteSkillDone cleanup) are sufficient.
2. Propagate AMS failure code to CLI exitCode.
BuildSkillSessionInfo sets ExecResult.exitCode from skillResult.code,
but SkillExecuteManager constructs a default SkillExecuteResult
(code=0) for OnTimeout / OnLaunchFailed / OnTargetProcessDied. The
OnExecuteDone resultCode carries the real error (e.g.
ERR_SKILL_EXECUTE_TARGET_DIED), yet CLI consumers saw exitCode=0
alongside status="failed", masking the failure.
Fix at two layers:
- CLI: BuildSkillSessionInfo falls back to resultCode when
skillResult.code==0 && resultCode!=ERR_OK.
- AMS: SkillExecuteManager now mirrors the resultCode into
emptyResult.code at all three failure sites, matching how the
app-side ReportSkillError already populates .code with errCode.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
|
||
|
|
0dc85f4e8c |
fix(skill): report ExecuteSkill dispatch failures and surface errorText
JsUIAbility::ExecuteSkill and JsServiceExtension::ExecuteSkill had four silent early-return paths (null napi env, function not found, napi_call failure, and a previously uncaught pending exception) that left the AMS record in EXECUTING forever after the skill-timeout PR canceled the launch timer, hanging the caller. Reuse ERR_TIMED_OUT as the result code to keep CLI exitCode behavior identical to the pre-timeout baseline and avoid growing the public error-code surface; the per-path detail rides in SkillExecuteResult.result (WantParams) under a reserved key SKILL_ERROR_MSG_KEY. The CLI side (ToolUtil::BuildSkillSessionInfo) now extracts that message into ExecResult.errorText, which is already wired through IPC and JS but was never populated for skills. Also removes the stale "skill will time out" log comment that the timeout PR invalidated. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> 🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%] Co-authored-by: claude (glm-5.2) <ai@local> |
||
|
|
b484c554aa |
!19644 merge claw into master
claw Created-by: xuzheheng Commit-by: xuzheheng Merged-by: openharmony_ci Description: **IssueNo**: https://gitcode.com/openharmony/ability_ability_runtime/issues/15497 **Description**: claw **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | √ | | 成员变量进行赋值或创建需要排查并发 | √ | | 谨慎在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用例 - [√ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19644 |
||
|
|
4a43f27339 |
claw
Signed-off-by: xuzheheng <xuzheheng2@h-partners.com> 🤖 AI[97%] 👌 AI Adopted[97%] 🧑 Human[3%] Co-authored-by: claude (glm-4.7) <ai@local> Change-Id: I2ba866788c8a3f2fc5288cacc1978445246c126a |
||
|
|
c50bf4b0c4 |
!19695 merge master0626 into master
代码优化 Created-by: dsz2025 Commit-by: duansizhao Merged-by: openharmony_ci Description: **IssueNo**: **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用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19695 |
||
|
|
91521ae14d |
!19736 merge GenerateSandboxConfig into master
GenerateSandboxConfig Created-by: Luobniz21 Commit-by: Luobniz21 Merged-by: openharmony_ci Description: **IssueNo**: **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用例 - [x] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19736 |
||
|
|
d0b43e3da8 |
gENERateSandboxConfig
Signed-off-by: Luobniz21 <luoyicong@h-partners.com> # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Wed Jul 1 10:56:51 2026 +0800 # # On branch GenerateSandboxConfig # Your branch is up to date with 'origin/GenerateSandboxConfig'. # # Changes to be committed: # modified: cli_tool_framework/services/climgr/src/tool_util.cpp # # Untracked files: # .claude/ # 1.diff # "CLI\345\267\245\345\205\267\346\211\223\347\202\271\344\274\230\345\214\226\346\200\273\347\273\223.md" # |
||
|
|
63938a7f3c |
!19723 merge fix/config-moduleName-missing into master
fix: backfill moduleName for Config intents missing the field Created-by: RuiChen_01 Commit-by: RuiChen_01 Merged-by: openharmony_ci Description: **IssueNo**: **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用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19723 |
||
|
|
70a03affed |
test: adapt BatchRegisterFunctions TDD to FunctionsRawData signature
CliToolManagerService_BatchRegisterFunctions_0100 and _0200 now construct FunctionsRawData via FromFunctionInfoVec before calling service_->BatchRegisterFunctions, matching the IDL signature change from FunctionInfo[] to FunctionsRawData. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> 🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%] Co-authored-by: claude (glm-5.2) <ai@local> |
||
|
|
341ba3aa02 |
perf: use rawdata for BatchRegisterFunctions to avoid boot timeout
Change BatchRegisterFunctions IDL from [in] FunctionInfo[] (Parcel, 1MB Binder limit) to [in] FunctionsRawData (shared memory/Ashmem), matching the existing GetAllFunctions pattern. This allows a single IPC to carry all functions regardless of data size, eliminating the N/50 batch chunking that caused repeated CheckKvStore loops on simulators without a KVStore and led to boot timeouts. Client-side CliToolMGRClient keeps accepting vector<FunctionInfo> and converts to FunctionsRawData internally via FromFunctionInfoVec. Service-side converts back via ToFunctionInfoVec before processing. Chunking logic in BatchRegisterInsightIntentFunctions is removed. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> 🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%] Co-authored-by: claude (glm-5.2) <ai@local> |
||
|
|
a84d43e50c |
6.29 zhouyuan
Signed-off-by: sora_skyline <zhouyuan90@huawei.com> Change-Id: I5b48d2f1a7fbe1dde89ae4e881a981dbbb8a197c |
||
|
|
47cf369383 |
!19711 merge master into master
修改AI扫描告警 Created-by: littlejerry1 Commit-by: littlejerry1 Merged-by: openharmony_ci Description: **IssueNo**: https://gitcode.com/openharmony/ability_ability_runtime/issues/15540 **Description**: 修改AI扫描告警 **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | ok | | 成员变量进行赋值或创建需要排查并发 | ok | | 谨慎在lambda表达式中使用引用捕获 | ok | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | ok | | map\vector\list\set等stl模板类使用时需要排查并发 | ok | | 谨慎考虑加锁范围 | ok | | 在IPC通信中谨慎使用同步通信方式 | ok | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | ok | | 禁止将外部传入的裸指针在内部直接构造智能指针 | ok | | 禁止多个独立创建的智能指针管理同一地址 | ok | | 禁止在析构函数中抛异步任务 | ok | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | ok | | 禁止在对外接口中未经判空直接使用外部传入的指针 | ok | | 禁止接口返回局部变量引用 | ok | | 禁止在信号函数中加锁 | ok | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | ok | | 禁止将同一个cpp编译在不同的so中 | ok | **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | ok | | json对象在取值之前必须先判断类型,避免类型不匹配 | ok | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | ok | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | ok | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | ok | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | ok | | readParcelable获取的对象使用前需要判空 | ok | | 分配和释放内存的函数需要成对出现 | ok | | 申请内存后异常退出前需要及时进行内存释放 | ok | | 内存申请前必须对内存大小进行合法性校验 | ok | | 内存分配后必须判断是否成功 | ok | | 禁止使用realloc、alloca函数 | ok | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | ok | | 禁止打印内存地址 | ok | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | ok | | 禁止对有符号整数进行位操作符运算 | ok | | 禁止对指针进行逻辑或位运算 | ok | | 循环次数如果收外部数据控制,需要检验其合法性 | ok | | 禁止使用内存操作类危险函数,需要使用安全函数 | ok | | 谨慎使用不可重入函数 | ok | | 必须检查安全函数的返回值,并进行正确处理 | ok | | 禁止仅通过TokenType类型判断绕过权限校验 | ok | **TDD Result**: ok **XTS Result**: ok ### 是否已执行L0用例 - [ ] 已验证 - [NA] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19711 |
||
|
|
f26ade9253 |
!19710 merge 新增批量注册接口/修正权限校验 into master
新增批量注册接口/修正权限校验 Created-by: zhu-feimo Commit-by: 朱菲墨 Merged-by: openharmony_ci Description: **IssueNo**: [#15538](https://gitcode.com/openharmony/ability_ability_runtime/issues/15538) **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用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19710 |
||
|
|
3521753a12 |
functionCall使用共享内存扩大传输容量
Signed-off-by: 朱菲墨 <zhufeimo1@huawei.com> 🤖 AI[0%] 👌 AI Adopted[0%] 🧑 Human[100%] |
||
|
|
8b5ddf56be |
fix warning
Co-Authored-By:Agent Signed-off-by: littlejerry1 <sijunjie@huawei.com> 🤖 AI[0%] 👌 AI Adopted[0%] 🧑 Human[100%] |
||
|
|
143f8bfc8f |
!19698 merge dot_cli0626 into master
clidot Created-by: Luobniz21 Commit-by: Luobniz21 Merged-by: openharmony_ci Description: **IssueNo**: **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用例 - [x] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19698 |
||
|
|
f338187077 |
!19709 merge optimize/insight-intent-cleanup into master
perf: move per-bundle filtering into DbCache GetAllInsightIntentInfoForRegister Created-by: RuiChen_01 Commit-by: RuiChen_01;朱菲墨 Merged-by: openharmony_ci Description: **IssueNo**: **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用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19709 |
||
|
|
80c8dd62f9 |
fix: extract IsQualifiedEntry to reduce FilterGeneric nesting depth
Static analysis flags FilterGeneric at depth 5 (function → for → if Entry → for mode → if mode==). Pull the Entry executeMode check into IsQualifiedEntry helper so FilterGeneric stays at depth 4. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> 🤖 AI[100%] 👌 AI Adopted[100%] 🧑 Human[0%] Co-authored-by: claude (glm-5.2) <ai@local> |
||
|
|
9dd4d7b3a4 |
!19563 merge invokefunction into master
Add invokeFunction Created-by: zivzhen Commit-by: wangzhen Merged-by: openharmony_ci Description: **IssueNo**: **Description**: **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | ok | | 成员变量进行赋值或创建需要排查并发 | ok | | 谨慎在lambda表达式中使用引用捕获 | ok | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | ok | | map\vector\list\set等stl模板类使用时需要排查并发 | ok | | 谨慎考虑加锁范围 | ok | | 在IPC通信中谨慎使用同步通信方式 | ok | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | ok | | 禁止将外部传入的裸指针在内部直接构造智能指针 | ok | | 禁止多个独立创建的智能指针管理同一地址 | ok | | 禁止在析构函数中抛异步任务 | ok | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | ok | | 禁止在对外接口中未经判空直接使用外部传入的指针 | ok | | 禁止接口返回局部变量引用 | ok | | 禁止在信号函数中加锁 | ok | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | ok | | 禁止将同一个cpp编译在不同的so中 | ok | **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | ok | | json对象在取值之前必须先判断类型,避免类型不匹配 | ok | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | ok | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | ok | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | ok | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | ok | | readParcelable获取的对象使用前需要判空 | ok | | 分配和释放内存的函数需要成对出现 | ok | | 申请内存后异常退出前需要及时进行内存释放 | ok | | 内存申请前必须对内存大小进行合法性校验 | ok | | 内存分配后必须判断是否成功 | ok | | 禁止使用realloc、alloca函数 | ok | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | ok | | 禁止打印内存地址 | ok | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | ok | | 禁止对有符号整数进行位操作符运算 | ok | | 禁止对指针进行逻辑或位运算 | ok | | 循环次数如果收外部数据控制,需要检验其合法性 | ok | | 禁止使用内存操作类危险函数,需要使用安全函数 | ok | | 谨慎使用不可重入函数 | ok | | 必须检查安全函数的返回值,并进行正确处理 | ok | | 禁止仅通过TokenType类型判断绕过权限校验 | ok | **TDD Result**: pass **XTS Result**: pass ### 是否已执行L0用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19563 |
||
|
|
746732b358 |
test: remove CliFunctionDataManager_BatchRegisterFunctions_003/004
Drop the two extra BatchRegisterFunctions failure-path cases that came in from the upstream cherry-pick. Keep 001/002 which already cover the happy path. Co-Authored-By: Agent Signed-off-by: RuiChen_01 <chenrui193@huawei.com> 🤖 AI[0%] 👌 AI Adopted[0%] 🧑 Human[0%] |
||
|
|
d17ea5f891 |
fix: complete mock ForRegister + tweak BatchRegister error code
mock_insight_intent_db_cache.{h,cpp} for the thirteenth test lacked
GetAllInsightIntentInfoForRegister (added on the real cache), so test
targets linking the mock hit undefined symbol. Add the mock declaration
and a stub implementation that just delegates to GetAllInsightIntentInfo.
CliFunctionDataManager::BatchRegisterFunctions returns ERR_KVSTORE_ERROR
instead of ERR_INVALID_PARAM when no functions were registered, matching
the rest of the KVStore error reporting.
Co-Authored-By: Agent
Signed-off-by: RuiChen_01 <chenrui193@huawei.com>
🤖 AI[89%] 👌 AI Adopted[89%] 🧑 Human[11%]
Co-authored-by: claude (glm-5.2) <ai@local>
|