diff --git a/common/include/verify_policy.h b/common/include/verify_policy.h index af7f901..f4580a6 100644 --- a/common/include/verify_policy.h +++ b/common/include/verify_policy.h @@ -56,6 +56,7 @@ enum security_scan_table PXY_SECURITY_FTP_URI, PXY_SECURITY_FTP_CONTENT, PXY_SECURITY_FTP_ACCOUNT, + PXY_SECURITY_APP_ID, __SECURITY_TABLE_MAX }; diff --git a/platform/src/verify_policy.cpp b/platform/src/verify_policy.cpp index fd451d8..76be087 100644 --- a/platform/src/verify_policy.cpp +++ b/platform/src/verify_policy.cpp @@ -117,6 +117,7 @@ int protoco_field_type_str2idx(enum verify_policy_type type, const char *action_ table_name[PXY_SECURITY_FTP_URI] = "TSG_FIELD_FTP_URI"; table_name[PXY_SECURITY_FTP_CONTENT] = "TSG_FIELD_FTP_CONTENT"; table_name[PXY_SECURITY_FTP_ACCOUNT] = "TSG_FIELD_FTP_ACCOUNT"; + table_name[PXY_SECURITY_APP_ID] = "TSG_OBJ_APP_ID"; break; case PXY_TABLE_DEFENCE: break; @@ -243,8 +244,8 @@ cJSON *get_query_from_request(const char *data, int thread_id) if(item && item->type==cJSON_String) { policy_query->query_obj[i].protocol_field = protoco_field_type_str2idx(policy_query->type, item->valuestring, buff, &p); - if(policy_query->query_obj[i].protocol_field == __SECURITY_TABLE_MAX || - policy_query->query_obj[i].protocol_field == __SCAN_TABLE_MAX) + if ((policy_query->type == PXY_TABLE_MANIPULATION && policy_query->query_obj[i].protocol_field == __SCAN_TABLE_MAX) + || (policy_query->type == PXY_TABLE_SECURITY && policy_query->query_obj[i].protocol_field == __SECURITY_TABLE_MAX)) { mesa_runtime_log(RLOG_LV_FATAL, MODULE_NAME, "policy table name error, table name = %s", item->valuestring); goto free; diff --git a/scan/src/pangu_http.cpp b/scan/src/pangu_http.cpp index 66f9d81..63ff53d 100644 --- a/scan/src/pangu_http.cpp +++ b/scan/src/pangu_http.cpp @@ -63,7 +63,7 @@ struct pangu_http_ctx size_t n_enforce; struct Maat_rule_t * enforce_rules; int n_read; - struct Maat_hit_path_t hit_path[128]; + struct Maat_hit_path_t hit_path[2048]; int thread_id; }; @@ -549,6 +549,7 @@ int security_policy_init(struct verify_policy * verify, const char* profile_path table_name[PXY_SECURITY_FTP_URI] = "TSG_FIELD_FTP_URI"; table_name[PXY_SECURITY_FTP_CONTENT] = "TSG_FIELD_FTP_CONTENT"; table_name[PXY_SECURITY_FTP_ACCOUNT] = "TSG_FIELD_FTP_ACCOUNT"; + table_name[PXY_SECURITY_APP_ID] = "TSG_OBJ_APP_ID"; for (int i = 0; i < __SECURITY_TABLE_MAX; i++) {