mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
!17971 merge master into master
Sensitive word remove Created-by: zyr020212 Commit-by: zyr020212 Merged-by: openharmony_ci Description: **IssueNo**: https://gitcode.com/openharmony/ability_ability_runtime/issues/14113?ref=&did=3712906#tid-3712906 **Description**: Sensitive word remove **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | √| | 成员变量进行赋值或创建需要排查并发 | √ | | 谨慎在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!17971
This commit is contained in:
@@ -47,7 +47,7 @@ constexpr const char* DLP_PARAMS_BUNDLE_NAME = "ohos.dlp.params.bundleName";
|
||||
constexpr const char* DLP_PARAMS_MODULE_NAME = "ohos.dlp.params.moduleName";
|
||||
constexpr const char* DLP_PARAMS_ABILITY_NAME = "ohos.dlp.params.abilityName";
|
||||
#endif // WITH_DLP
|
||||
constexpr const char* MARKET_BUNDLE_NAME = "com.huawei.hmsapp.appgallery";
|
||||
constexpr const char* MARKET_BUNDLE_NAME = "com.hmsapp.appgallery";
|
||||
constexpr const char* MARKET_CROWD_TEST_BUNDLE_PARAM = "crowd_test_bundle_name";
|
||||
constexpr const char* BUNDLE_NAME_SELECTOR_DIALOG = "com.ohos.amsdialog";
|
||||
constexpr const char* JUMP_INTERCEPTOR_DIALOG_CALLER_PKG = "interceptor_callerPkg";
|
||||
|
||||
@@ -73,7 +73,7 @@ const int COMMAND_WINDOW_TIMEOUT_MULTIPLE = 5;
|
||||
#endif
|
||||
constexpr const int32_t LOAD_TIMEOUT_MAX = 30;
|
||||
const int32_t AUTO_DISCONNECT_INFINITY = -1;
|
||||
constexpr const char* FROZEN_WHITE_DIALOG = "com.huawei.hmos.huaweicast";
|
||||
constexpr const char* FROZEN_WHITE_DIALOG = "com.hmos.cast";
|
||||
constexpr char BUNDLE_NAME_DIALOG[] = "com.ohos.amsdialog";
|
||||
constexpr char ABILITY_NAME_ASSERT_FAULT_DIALOG[] = "AssertFaultDialog";
|
||||
constexpr const char* WANT_PARAMS_APP_RESTART_FLAG = "ohos.aafwk.app.restart";
|
||||
@@ -83,7 +83,7 @@ constexpr int32_t HALF_TIMEOUT = 2;
|
||||
constexpr uint32_t PROCESS_MODE_RUN_WITH_MAIN_PROCESS =
|
||||
1 << static_cast<uint32_t>(AppExecFwk::ExtensionProcessMode::RUN_WITH_MAIN_PROCESS);
|
||||
|
||||
const std::string XIAOYI_BUNDLE_NAME = "com.huawei.hmos.vassistant";
|
||||
const std::string XIAOYI_BUNDLE_NAME = "com.hmos.vassistant";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
namespace {
|
||||
const std::string XIAOYI_BUNDLE_NAME = "com.huawei.hmos.vassistant";
|
||||
const std::string XIAOYI_BUNDLE_NAME = "com.hmos.vassistant";
|
||||
constexpr int BUNDLE_NAME_LIST_MAX_SIZE = 128;
|
||||
constexpr int OBSERVER_SINGLE_COUNT_LOG = 40;
|
||||
constexpr int OBSERVER_SINGLE_STEP_LOG = 10;
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ ErrCode AppControlProxy::GetAppRunningControlRule(
|
||||
return ERR_OK;
|
||||
}
|
||||
Want want;
|
||||
ElementName element("", "com.huawei.hmos.appgallery", "MainAbility");
|
||||
ElementName element("", "com.hmos.appgallery", "MainAbility");
|
||||
want.SetElement(element);
|
||||
controlRuleResult.controlWant = std::make_shared<Want>(want);
|
||||
controlRuleResult.controlMessage = "the test app is not available";
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ using namespace testing::ext;
|
||||
using namespace OHOS::AppExecFwk;
|
||||
|
||||
namespace {
|
||||
const std::string VASSISTANT_BUNDLE_NAME = "com.huawei.hmos.vassistant";
|
||||
const std::string VASSISTANT_B2 = "com.huawei.hmos.vassistant.test";
|
||||
const std::string VASSISTANT_BUNDLE_NAME = "com.hmos.vassistant";
|
||||
const std::string VASSISTANT_B2 = "com.hmos.vassistant.test";
|
||||
constexpr size_t LOAD_TIMEOUT = 0;
|
||||
constexpr size_t ACTIVE_TIMEOUT = 1;
|
||||
constexpr size_t INACTIVE_TIMEOUT = 2;
|
||||
|
||||
+2
-2
@@ -83,8 +83,8 @@ constexpr const char* BUNDLE_NAME_LAUNCHER = "com.ohos.launcher";
|
||||
constexpr const char* BUNDLE_NAME_SCENEBOARD = "com.ohos.sceneboard";
|
||||
constexpr const char* LAUNCHER_ABILITY_NAME = "com.ohos.launcher.MainAbility";
|
||||
constexpr const char* SCENEBOARD_ABILITY_NAME = "com.ohos.sceneboard.MainAbility";
|
||||
constexpr const char* BUNDLE_NAME_TEST = "com.huawei.hmos.passwordvault";
|
||||
constexpr const char* BUNDLE_NAME_SMART_TEST = "com.huawei.hms.textautofill";
|
||||
constexpr const char* BUNDLE_NAME_TEST = "com.hmos.passwordvault";
|
||||
constexpr const char* BUNDLE_NAME_SMART_TEST = "com.hms.textautofill";
|
||||
const std::string APP_INSTANCE_KEY("ohos.extra.param.key.appInstance");
|
||||
const std::string CREATE_APP_INSTANCE_KEY("ohos.extra.param.key.createAppInstance");
|
||||
constexpr const char* CALLER_REQUEST_CODE = "ohos.extra.param.key.callerRequestCode";
|
||||
|
||||
@@ -61,7 +61,7 @@ const std::string DEBUG_APP = "debugApp";
|
||||
#ifdef WITH_DLP
|
||||
const std::string DLP_BUNDLE_NAME = "com.ohos.dlpmanager";
|
||||
#endif // WITH_DLP
|
||||
const std::string SHELL_ASSISTANT_BUNDLENAME = "com.huawei.shell_assistant";
|
||||
const std::string SHELL_ASSISTANT_BUNDLENAME = "com.shell_assistant";
|
||||
const std::string SHOW_ON_LOCK_SCREEN = "ShowOnLockScreen";
|
||||
const std::string URI_PERMISSION_TABLE_NAME = "uri_permission";
|
||||
constexpr const char* UIEXTENSION_LAUNCH_TIMESTAMP_HIGH = "ohos.ability.params.uiExtensionLaunchTimestampHigh";
|
||||
|
||||
@@ -267,7 +267,7 @@ HWTEST_F(AppRunningManagerTest, AppRunningManager_UpdateConfiguration_0100, Test
|
||||
appRunningManager->appRunningRecordMap_.emplace(++recordId, nullptr);
|
||||
appRunningRecord->SetState(ApplicationState::APP_STATE_READY);
|
||||
appRunningManager->appRunningRecordMap_.emplace(++recordId, appRunningRecord);
|
||||
appInfo->name = "com.huawei.shell_assistant";
|
||||
appInfo->name = "com.shell_assistant";
|
||||
appRunningRecord = std::make_shared<AppRunningRecord>(appInfo, recordId, processName);
|
||||
appRunningManager->appRunningRecordMap_.emplace(++recordId, appRunningRecord);
|
||||
EXPECT_EQ(appRunningManager->appRunningRecordMap_.size(), recordId);
|
||||
|
||||
@@ -19,7 +19,7 @@ ohos_unittest("modal_system_app_freeze_uiextension_test") {
|
||||
|
||||
defines = [
|
||||
"APP_NO_RESPONSE_DIALOG=1",
|
||||
"APP_NO_RESPONSE_BUNDLENAME=\"com.huawei.hmos.abnormal\"",
|
||||
"APP_NO_RESPONSE_BUNDLENAME=\"com.hmos.abnormal\"",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
|
||||
@@ -110,7 +110,7 @@ HWTEST_F(StartOtherAppInterceptorTest, CheckAncoShellCall_001, TestSize.Level1)
|
||||
auto interceptor = std::make_shared<StartOtherAppInterceptor>();
|
||||
AppExecFwk::ApplicationInfo applicationInfo;
|
||||
Want want;
|
||||
ElementName element("", "com.huawei.shell_assistant", "MainAbility");
|
||||
ElementName element("", "com.shell_assistant", "MainAbility");
|
||||
want.SetElement(element);
|
||||
bool res = interceptor->CheckAncoShellCall(applicationInfo, want);
|
||||
EXPECT_FALSE(res);
|
||||
|
||||
Reference in New Issue
Block a user