9 Commits

Author SHA1 Message Date
Luobniz21 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>
2026-08-17 10:24:16 +08:00
openharmony_ci 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
2026-08-04 15:54:59 +08:00
wangzhen 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
2026-07-30 16:57:36 +08:00
Luobniz21 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>
2026-07-28 20:10:28 +08:00
wangzhen e0995f7db4 Add cfi/pac config
Co-Authored-By: Agent

Signed-off-by: wangzhen <wangzhen416@huawei.com>

🤖‍ AI[0%] 👌 AI Adopted[0%] 🧑 Human[100%]
2026-07-14 15:29:40 +08:00
Luobniz21 ed9f8f3270 clidot
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:      Fri Jun 26 14:55:51 2026 +0800
#
# On branch dot_cli0626
# Your branch is up to date with 'origin/dot_cli0626'.
#
# Changes to be committed:
#	modified:   cli_tool_framework/services/climgr/BUILD.gn
#	modified:   cli_tool_framework/services/climgr/include/cli_tool_manager_service.h
#	modified:   cli_tool_framework/services/climgr/include/tool_util.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/services/climgr/src/tool_util.cpp
#	new file:   cli_tool_framework/services/common/BUILD.gn
#	new file:   cli_tool_framework/services/common/include/cli_event_report.h
#	new file:   cli_tool_framework/services/common/src/cli_event_report.cpp
#	modified:   cli_tool_framework/test/unittest/BUILD.gn
#	new file:   cli_tool_framework/test/unittest/cli_event_report_test/BUILD.gn
#	new file:   cli_tool_framework/test/unittest/cli_event_report_test/cli_event_report_test.cpp
#	modified:   cli_tool_framework/test/unittest/cli_tool_mgr_service_test/BUILD.gn
#	modified:   cli_tool_framework/test/unittest/cli_tool_mgr_service_test/cli_tool_mgr_service_test.cpp
#	modified:   cli_tool_framework/test/unittest/cli_tool_mgr_service_test/permission_util_mock.cpp
#	modified:   cli_tool_framework/test/unittest/common_mock/climgr/include/tool_util.h
#	modified:   cli_tool_framework/test/unittest/common_mock/climgr/src/cli_mgr_service_mock.cpp
#	modified:   cli_tool_framework/test/unittest/process_manager_test/BUILD.gn
#	modified:   cli_tool_framework/test/unittest/tool_util_test/tool_util_test.cpp
#	modified:   hisysevent.yaml
#
# 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"
#

# 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:      Fri Jun 26 14:55:51 2026 +0800
#
# On branch dot_cli0626
# Your branch is up to date with 'origin/dot_cli0626'.
#
# Changes to be committed:
#	modified:   cli_tool_framework/services/climgr/BUILD.gn
#	modified:   cli_tool_framework/services/climgr/include/cli_tool_manager_service.h
#	modified:   cli_tool_framework/services/climgr/include/tool_util.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/services/climgr/src/tool_util.cpp
#	new file:   cli_tool_framework/services/common/BUILD.gn
#	new file:   cli_tool_framework/services/common/include/cli_event_report.h
#	new file:   cli_tool_framework/services/common/src/cli_event_report.cpp
#	modified:   cli_tool_framework/test/unittest/BUILD.gn
#	new file:   cli_tool_framework/test/unittest/cli_event_report_test/BUILD.gn
#	new file:   cli_tool_framework/test/unittest/cli_event_report_test/cli_event_report_test.cpp
#	modified:   cli_tool_framework/test/unittest/cli_tool_mgr_service_test/BUILD.gn
#	modified:   cli_tool_framework/test/unittest/cli_tool_mgr_service_test/cli_tool_mgr_service_test.cpp
#	modified:   cli_tool_framework/test/unittest/cli_tool_mgr_service_test/permission_util_mock.cpp
#	modified:   cli_tool_framework/test/unittest/common_mock/climgr/include/tool_util.h
#	modified:   cli_tool_framework/test/unittest/common_mock/climgr/src/cli_mgr_service_mock.cpp
#	modified:   cli_tool_framework/test/unittest/process_manager_test/BUILD.gn
#	modified:   cli_tool_framework/test/unittest/tool_util_test/tool_util_test.cpp
#	modified:   hisysevent.yaml
#
# 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"
#
2026-06-27 09:54:20 +08:00
wendel 0606111c9e offline permission check
Signed-off-by: wendel <yuwenze1@huawei.com>
Co-Authored-By: wende
Change-Id: I780322492688e116daf9ceba8850f7d74fa14104
2026-05-21 14:28:10 +08:00
wendel 4a15226523 modify permission
Signed-off-by: wendel <yuwenze1@huawei.com>
Co-Authored-By: wendel
Change-Id: I33f36d65ded46e87c7686d12f663766c88e1aac9
2026-05-15 16:22:18 +08:00
wendel 002d0f525b modify execTool
Signed-off-by: wendel <yuwenze1@huawei.com>
Co-Authored-By: Agent
Change-Id: I1c9887a3b089e76fadabee2a44a95e8f2f7e2014
2026-04-26 11:28:10 +08:00