MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / is_sensitive_tool

Method is_sensitive_tool

client/util/tooldisplay.py:48–66  ·  view source on GitHub ↗

判断工具是否敏感工具,后续需要对日志脱敏,并隐藏工具名 :param task_params: :return: True-敏感;False-非敏感

(task_params)

Source from the content-addressed store, hash-verified

46
47 @staticmethod
48 def is_sensitive_tool(task_params):
49 """
50 判断工具是否敏感工具,后续需要对日志脱敏,并隐藏工具名
51 :param task_params:
52 :return: True-敏感;False-非敏感
53 """
54 if not task_params:
55 return True
56
57 tool_params = task_params.get("checktool")
58 if not tool_params:
59 return True
60
61 show_display_name = tool_params.get('show_display_name')
62 # 不显示display_name,即需要显示虚拟名称,说明是敏感工具
63 if not show_display_name:
64 return True
65 else:
66 return False
67
68 @staticmethod
69 def print_log(is_sensitive, sensitive_word_maps, message):

Callers 2

runMethod · 0.80
__init__Method · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected