huaweicloud-devkit 1.0.2-dev.9 → 1.0.2-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/.agents/plugins/marketplace.json +20 -20
  2. package/LICENSE +201 -201
  3. package/README.md +178 -138
  4. package/README.zh-CN.md +176 -138
  5. package/bin/setup.cjs +10 -8
  6. package/integrations/opencode/commands/huaweicloud-doctor.md +14 -14
  7. package/integrations/opencode/opencode.json +11 -14
  8. package/integrations/opencode/skills/huaweicloud-core/SKILL.md +32 -32
  9. package/package.json +60 -44
  10. package/plugins/huaweicloud-core/.claude-plugin/plugin.json +31 -44
  11. package/plugins/huaweicloud-core/.codex-plugin/plugin.json +30 -43
  12. package/plugins/huaweicloud-core/.cursor-plugin/plugin.json +31 -44
  13. package/plugins/huaweicloud-core/.mcp.json +13 -15
  14. package/plugins/huaweicloud-core/.workbuddy-plugin/plugin.json +31 -44
  15. package/plugins/huaweicloud-core/hooks/hooks.json +26 -26
  16. package/plugins/huaweicloud-core/hooks/huaweicloud-safety.py +136 -136
  17. package/plugins/huaweicloud-core/safety/policy.json +76 -100
  18. package/plugins/huaweicloud-core/safety/rules/cloud-risk-rules.json +227 -199
  19. package/plugins/huaweicloud-core/skills/huawei-apig/SKILL.md +164 -164
  20. package/plugins/huaweicloud-core/skills/huawei-billing/SKILL.md +48 -48
  21. package/plugins/huaweicloud-core/skills/huawei-cbr/SKILL.md +50 -50
  22. package/plugins/huaweicloud-core/skills/huawei-cce/SKILL.md +103 -101
  23. package/plugins/huaweicloud-core/skills/huawei-cloud-eye/SKILL.md +90 -90
  24. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/SKILL.md +191 -190
  25. package/plugins/huaweicloud-core/skills/huawei-cloud-find-skills/scripts/search-skills.mjs +171 -124
  26. package/plugins/huaweicloud-core/skills/huawei-cts/SKILL.md +55 -55
  27. package/plugins/huaweicloud-core/skills/huawei-dds-dcs/SKILL.md +70 -70
  28. package/plugins/huaweicloud-core/skills/huawei-deployment/SKILL.md +57 -56
  29. package/plugins/huaweicloud-core/skills/huawei-dew/SKILL.md +106 -97
  30. package/plugins/huaweicloud-core/skills/huawei-dew/references/csms-usage.md +36 -29
  31. package/plugins/huaweicloud-core/skills/huawei-dew/references/kms-usage.md +29 -23
  32. package/plugins/huaweicloud-core/skills/huawei-ecs/SKILL.md +188 -185
  33. package/plugins/huaweicloud-core/skills/huawei-ecs/references/create-instance.md +144 -133
  34. package/plugins/huaweicloud-core/skills/huawei-ecs/references/evs.md +31 -31
  35. package/plugins/huaweicloud-core/skills/huawei-ecs/references/flavors.md +57 -55
  36. package/plugins/huaweicloud-core/skills/huawei-ecs/references/troubleshooting.md +52 -52
  37. package/plugins/huaweicloud-core/skills/huawei-functiongraph/SKILL.md +132 -131
  38. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/apig-event-format.md +60 -58
  39. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/create-function.md +72 -71
  40. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/deploy-workflow.md +119 -119
  41. package/plugins/huaweicloud-core/skills/huawei-functiongraph/references/triggers.md +142 -142
  42. package/plugins/huaweicloud-core/skills/huawei-gaussdb/SKILL.md +56 -56
  43. package/plugins/huaweicloud-core/skills/huawei-getting-started/SKILL.md +69 -65
  44. package/plugins/huaweicloud-core/skills/huawei-iam/SKILL.md +111 -111
  45. package/plugins/huaweicloud-core/skills/huawei-iam/references/policy-examples.md +148 -122
  46. package/plugins/huaweicloud-core/skills/huawei-iam/references/quick-ref.md +56 -56
  47. package/plugins/huaweicloud-core/skills/huawei-modelarts/SKILL.md +65 -65
  48. package/plugins/huaweicloud-core/skills/huawei-obs/SKILL.md +134 -127
  49. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-create.md +49 -49
  50. package/plugins/huaweicloud-core/skills/huawei-obs/references/bucket-lifecycle.md +31 -26
  51. package/plugins/huaweicloud-core/skills/huawei-obs/references/common-pitfalls.md +101 -100
  52. package/plugins/huaweicloud-core/skills/huawei-obs/references/single-file-share.md +40 -40
  53. package/plugins/huaweicloud-core/skills/huawei-obs/references/static-website.md +56 -56
  54. package/plugins/huaweicloud-core/skills/huawei-rds/SKILL.md +229 -224
  55. package/plugins/huaweicloud-core/skills/huawei-sandbox/SKILL.md +173 -134
  56. package/plugins/huaweicloud-core/skills/huawei-smn-dms/SKILL.md +69 -69
  57. package/plugins/huaweicloud-core/skills/huawei-vpc/SKILL.md +84 -84
  58. package/plugins/huaweicloud-core/skills/huawei-vpc/references/network.md +77 -76
  59. package/plugins/huaweicloud-core/skills/huawei-vpc/references/security-group.md +60 -59
  60. package/plugins/huaweicloud-core/skills/huawei-vpc/references/subnet.md +50 -50
  61. package/plugins/huaweicloud-core/skills/huawei-waf-aad/SKILL.md +63 -63
  62. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/SKILL.md +56 -56
  63. package/plugins/huaweicloud-core/skills/huaweicloud-api-and-sdk/agents/openai.yaml +4 -4
  64. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/SKILL.md +56 -47
  65. package/plugins/huaweicloud-core/skills/huaweicloud-capability-discovery/agents/openai.yaml +4 -4
  66. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/SKILL.md +138 -128
  67. package/plugins/huaweicloud-core/skills/huaweicloud-cli-and-auth/agents/openai.yaml +4 -4
  68. package/plugins/huaweicloud-core/skills/huaweicloud-core/SKILL.md +111 -96
  69. package/plugins/huaweicloud-core/skills/huaweicloud-core/agents/openai.yaml +4 -4
  70. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/report-issue.md +20 -20
  71. package/plugins/huaweicloud-core/skills/huaweicloud-core/references/select.md +30 -28
  72. package/plugins/huaweicloud-core/skills/huaweicloud-safety/SKILL.md +59 -60
  73. package/plugins/huaweicloud-core/skills/huaweicloud-safety/agents/openai.yaml +4 -4
  74. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/SKILL.md +83 -83
  75. package/plugins/huaweicloud-core/skills/huaweicloud-troubleshooting/agents/openai.yaml +4 -4
  76. package/plugins/huaweicloud-core/src/auth/agent-registration.mjs +54 -1
  77. package/plugins/huaweicloud-core/src/auth/credentials.mjs +103 -95
  78. package/plugins/huaweicloud-core/src/auth/service.mjs +63 -63
  79. package/plugins/huaweicloud-core/src/data/icons-manifest.v1.json +3517 -0
  80. package/plugins/huaweicloud-core/src/hcloud-cli.mjs +283 -265
  81. package/plugins/huaweicloud-core/src/icon-library.mjs +171 -0
  82. package/plugins/huaweicloud-core/src/mcp-server.mjs +130 -129
  83. package/plugins/huaweicloud-core/src/proxy/proxy-agent.mjs +68 -0
  84. package/plugins/huaweicloud-core/src/proxy/proxy-config.mjs +94 -0
  85. package/plugins/huaweicloud-core/src/risk-rule-engine.mjs +140 -137
  86. package/plugins/huaweicloud-core/src/safety-policy.mjs +356 -302
  87. package/plugins/huaweicloud-core/src/sandbox/hdkitservice-api.mjs +86 -87
  88. package/plugins/huaweicloud-core/src/sandbox/hwlink-api.mjs +150 -153
  89. package/plugins/huaweicloud-core/src/sandbox/session-manager.mjs +196 -105
  90. package/plugins/huaweicloud-core/src/search-market.mjs +208 -169
  91. package/plugins/huaweicloud-core/src/setup-cli.mjs +2622 -1594
  92. package/plugins/huaweicloud-core/src/tools.mjs +463 -111
  93. package/plugins/huaweicloud-core/src/ws-exec/hwlink-exec-client.js +447 -427
  94. package/plugins/huaweicloud-core/src/ws-exec/hwlink-fair-queue.js +128 -132
  95. package/plugins/huaweicloud-core/src/ws-exec/hwlink-multiplexer.js +215 -227
  96. package/plugins/huaweicloud-core/src/ws-exec/hwlink-packet.js +189 -202
  97. package/plugins/huaweicloud-core/src/ws-exec/hwlink-terminal-channel.js +164 -158
  98. package/plugins/huaweicloud-core/src/ws-exec/index.js +19 -19
  99. package/plugins/huaweicloud-core/src/ws-exec/ws-exec-client.js +338 -338
@@ -1,136 +1,136 @@
1
- #!/usr/bin/env python3
2
- """PreToolUse hook for Huawei Cloud agent safety.
3
-
4
- Blocks the highest-risk leakage paths before an agent tool runs:
5
- - reading local Huawei Cloud credential files
6
- - dumping cloud credential environment variables
7
- - directly retrieving cloud secret values
8
- - running unapproved write operations through hcloud
9
-
10
- The MCP server carries the same policy in Node for platforms that do not support
11
- plugin hooks.
12
- """
13
-
14
- import json
15
- import re
16
- import sys
17
- from pathlib import Path
18
-
19
- DENY_PREFIX = "Huawei Cloud safety hook blocked this action: "
20
- RULES_PATH = Path(__file__).resolve().parents[1] / "safety" / "rules" / "cloud-risk-rules.json"
21
-
22
- CONFIG_FILE_RE = re.compile(r"(\.hcloud|\.huaweicloud|hcloud[/\\](config|credentials)|huaweicloud[/\\](config|credentials))", re.I)
23
- ENV_DUMP_RE = re.compile(r"(env|printenv|Get-ChildItem\s+Env:|gci\s+Env:|dir\s+Env:).*(HUAWEICLOUD|HWC_|HCLOUD|OS_)", re.I)
24
- SECRET_READ_RE = re.compile(r"(ShowSecretVersion|GetSecretValue|secret_string|secret_binary)", re.I)
25
- HCLOUD_RE = re.compile(r"(^|\s)hcloud(\.exe)?\s+", re.I)
26
- WRITE_OPERATION_RE = re.compile(
27
- r"\b(BatchCreate|BatchDelete|Create|Delete|Update|Modify|Resize|Reboot|Stop|Start|Restart|Authorize|Revoke|Add|Remove|Associate|Disassociate|Attach|Detach|Enable|Disable)\w*",
28
- re.I,
29
- )
30
- READ_OPERATION_RE = re.compile(r"\b(List|Show|Get|Describe|NovaList|NovaShow)\w*", re.I)
31
-
32
-
33
- def deny(reason):
34
- json.dump(
35
- {
36
- "hookSpecificOutput": {
37
- "hookEventName": "PreToolUse",
38
- "permissionDecision": "deny",
39
- "permissionDecisionReason": DENY_PREFIX + reason,
40
- }
41
- },
42
- sys.stdout,
43
- )
44
- sys.exit(0)
45
-
46
-
47
- def allow():
48
- sys.exit(0)
49
-
50
-
51
- def command_text(tool_input):
52
- if isinstance(tool_input, str):
53
- return tool_input
54
- if isinstance(tool_input, dict):
55
- values = []
56
- for key in ("command", "cmd", "script", "args", "arguments"):
57
- value = tool_input.get(key)
58
- if isinstance(value, list):
59
- values.append(" ".join(str(item) for item in value))
60
- elif value is not None:
61
- values.append(str(value))
62
- if values:
63
- return "\n".join(values)
64
- return json.dumps(tool_input)
65
- return json.dumps(tool_input)
66
-
67
-
68
- def load_cloud_risk_rules():
69
- try:
70
- with RULES_PATH.open("r", encoding="utf-8") as file_obj:
71
- catalog = json.load(file_obj)
72
- return catalog.get("rules", [])
73
- except Exception:
74
- return []
75
-
76
-
77
- def condition_matches(condition, text):
78
- return re.search(condition.get("regex", r"a^"), text, re.I | re.M | re.S) is not None
79
-
80
-
81
- def rule_matches(rule, text):
82
- match = rule.get("match") or {}
83
- all_conditions = match.get("all")
84
- any_conditions = match.get("any")
85
- none_conditions = match.get("none")
86
-
87
- if isinstance(all_conditions, list):
88
- for condition in all_conditions:
89
- if not condition_matches(condition, text):
90
- return False
91
- if isinstance(any_conditions, list):
92
- if not any(condition_matches(condition, text) for condition in any_conditions):
93
- return False
94
- if isinstance(none_conditions, list):
95
- if any(condition_matches(condition, text) for condition in none_conditions):
96
- return False
97
- return isinstance(all_conditions, list) or isinstance(any_conditions, list)
98
-
99
-
100
- def first_denied_command_rule(text):
101
- for rule in load_cloud_risk_rules():
102
- if "command" not in rule.get("stages", []):
103
- continue
104
- if rule.get("severity") != "deny":
105
- continue
106
- if rule_matches(rule, text):
107
- return rule
108
- return None
109
-
110
-
111
- def main():
112
- try:
113
- data = json.load(sys.stdin)
114
- except Exception:
115
- allow()
116
-
117
- tool_name = data.get("tool_name", "")
118
- text = command_text(data.get("tool_input", {}))
119
-
120
- if CONFIG_FILE_RE.search(text):
121
- deny("reading Huawei Cloud credential/profile files can expose AK/SK or tokens. Use redacted toolkit tools.")
122
- if ENV_DUMP_RE.search(text):
123
- deny("dumping cloud credential environment variables is not allowed.")
124
- if SECRET_READ_RE.search(text):
125
- deny("direct secret value retrieval would put plaintext secrets into the agent context.")
126
- denied_rule = first_denied_command_rule(text)
127
- if denied_rule:
128
- deny(f"{denied_rule.get('message')} Remediation: {denied_rule.get('remediation')}")
129
- if tool_name == "Bash" and HCLOUD_RE.search(text) and WRITE_OPERATION_RE.search(text) and not READ_OPERATION_RE.search(text):
130
- deny("unapproved Huawei Cloud write operations must be planned first and explicitly approved by the user.")
131
-
132
- allow()
133
-
134
-
135
- if __name__ == "__main__":
136
- main()
1
+ #!/usr/bin/env python3
2
+ """PreToolUse hook for Huawei Cloud agent safety.
3
+
4
+ Blocks the highest-risk leakage paths before an agent tool runs:
5
+ - reading local Huawei Cloud credential files
6
+ - dumping cloud credential environment variables
7
+ - directly retrieving cloud secret values
8
+ - running unapproved write operations through hcloud
9
+
10
+ The MCP server carries the same policy in Node for platforms that do not support
11
+ plugin hooks.
12
+ """
13
+
14
+ import json
15
+ import re
16
+ import sys
17
+ from pathlib import Path
18
+
19
+ DENY_PREFIX = "Huawei Cloud safety hook blocked this action: "
20
+ RULES_PATH = Path(__file__).resolve().parents[1] / "safety" / "rules" / "cloud-risk-rules.json"
21
+
22
+ CONFIG_FILE_RE = re.compile(r"(\.hcloud|\.huaweicloud|hcloud[/\\](config|credentials)|huaweicloud[/\\](config|credentials))", re.I)
23
+ ENV_DUMP_RE = re.compile(r"(env|printenv|Get-ChildItem\s+Env:|gci\s+Env:|dir\s+Env:).*(HUAWEICLOUD|HWC_|HCLOUD|OS_)", re.I)
24
+ SECRET_READ_RE = re.compile(r"(ShowSecretVersion|GetSecretValue|secret_string|secret_binary)", re.I)
25
+ HCLOUD_RE = re.compile(r"(^|\s)hcloud(\.exe)?\s+", re.I)
26
+ WRITE_OPERATION_RE = re.compile(
27
+ r"\b(BatchCreate|BatchDelete|Create|Delete|Update|Modify|Resize|Reboot|Stop|Start|Restart|Authorize|Revoke|Add|Remove|Associate|Disassociate|Attach|Detach|Enable|Disable)\w*",
28
+ re.I,
29
+ )
30
+ READ_OPERATION_RE = re.compile(r"\b(List|Show|Get|Describe|NovaList|NovaShow)\w*", re.I)
31
+
32
+
33
+ def deny(reason):
34
+ json.dump(
35
+ {
36
+ "hookSpecificOutput": {
37
+ "hookEventName": "PreToolUse",
38
+ "permissionDecision": "deny",
39
+ "permissionDecisionReason": DENY_PREFIX + reason,
40
+ }
41
+ },
42
+ sys.stdout,
43
+ )
44
+ sys.exit(0)
45
+
46
+
47
+ def allow():
48
+ sys.exit(0)
49
+
50
+
51
+ def command_text(tool_input):
52
+ if isinstance(tool_input, str):
53
+ return tool_input
54
+ if isinstance(tool_input, dict):
55
+ values = []
56
+ for key in ("command", "cmd", "script", "args", "arguments"):
57
+ value = tool_input.get(key)
58
+ if isinstance(value, list):
59
+ values.append(" ".join(str(item) for item in value))
60
+ elif value is not None:
61
+ values.append(str(value))
62
+ if values:
63
+ return "\n".join(values)
64
+ return json.dumps(tool_input)
65
+ return json.dumps(tool_input)
66
+
67
+
68
+ def load_cloud_risk_rules():
69
+ try:
70
+ with RULES_PATH.open("r", encoding="utf-8") as file_obj:
71
+ catalog = json.load(file_obj)
72
+ return catalog.get("rules", [])
73
+ except Exception:
74
+ return []
75
+
76
+
77
+ def condition_matches(condition, text):
78
+ return re.search(condition.get("regex", r"a^"), text, re.I | re.M | re.S) is not None
79
+
80
+
81
+ def rule_matches(rule, text):
82
+ match = rule.get("match") or {}
83
+ all_conditions = match.get("all")
84
+ any_conditions = match.get("any")
85
+ none_conditions = match.get("none")
86
+
87
+ if isinstance(all_conditions, list):
88
+ for condition in all_conditions:
89
+ if not condition_matches(condition, text):
90
+ return False
91
+ if isinstance(any_conditions, list):
92
+ if not any(condition_matches(condition, text) for condition in any_conditions):
93
+ return False
94
+ if isinstance(none_conditions, list):
95
+ if any(condition_matches(condition, text) for condition in none_conditions):
96
+ return False
97
+ return isinstance(all_conditions, list) or isinstance(any_conditions, list)
98
+
99
+
100
+ def first_denied_command_rule(text):
101
+ for rule in load_cloud_risk_rules():
102
+ if "command" not in rule.get("stages", []):
103
+ continue
104
+ if rule.get("severity") != "deny":
105
+ continue
106
+ if rule_matches(rule, text):
107
+ return rule
108
+ return None
109
+
110
+
111
+ def main():
112
+ try:
113
+ data = json.load(sys.stdin)
114
+ except Exception:
115
+ allow()
116
+
117
+ tool_name = data.get("tool_name", "")
118
+ text = command_text(data.get("tool_input", {}))
119
+
120
+ if CONFIG_FILE_RE.search(text):
121
+ deny("reading Huawei Cloud credential/profile files can expose AK/SK or tokens. Use redacted toolkit tools.")
122
+ if ENV_DUMP_RE.search(text):
123
+ deny("dumping cloud credential environment variables is not allowed.")
124
+ if SECRET_READ_RE.search(text):
125
+ deny("direct secret value retrieval would put plaintext secrets into the agent context.")
126
+ denied_rule = first_denied_command_rule(text)
127
+ if denied_rule:
128
+ deny(f"{denied_rule.get('message')} Remediation: {denied_rule.get('remediation')}")
129
+ if tool_name == "Bash" and HCLOUD_RE.search(text) and WRITE_OPERATION_RE.search(text) and not READ_OPERATION_RE.search(text):
130
+ deny("unapproved Huawei Cloud write operations must be planned first and explicitly approved by the user.")
131
+
132
+ allow()
133
+
134
+
135
+ if __name__ == "__main__":
136
+ main()
@@ -1,100 +1,76 @@
1
- {
2
- "version": "0.1.0",
3
- "secretKeyNamePatterns": [
4
- "access[_-]?key",
5
- "secret[_-]?key",
6
- "security[_-]?token",
7
- "x[_-]?auth[_-]?token",
8
- "authorization",
9
- "password",
10
- "passwd",
11
- "token",
12
- "credential",
13
- "private[_-]?key",
14
- "ak",
15
- "sk"
16
- ],
17
- "credentialFilePatterns": [
18
- "\\.hcloud",
19
- "\\.huaweicloud",
20
- "hcloud[/\\\\](config|credentials)",
21
- "huaweicloud[/\\\\](config|credentials)"
22
- ],
23
- "blockedConfigureSubcommands": [
24
- "show",
25
- "get",
26
- "list",
27
- "export",
28
- "init"
29
- ],
30
- "blockedSecretOperations": [
31
- "ShowSecretVersion",
32
- "DownloadSecret",
33
- "GetSecretValue"
34
- ],
35
- "writeOperationPrefixes": [
36
- "Create",
37
- "BatchCreate",
38
- "Delete",
39
- "BatchDelete",
40
- "Update",
41
- "Modify",
42
- "Resize",
43
- "Reboot",
44
- "Stop",
45
- "Start",
46
- "Restart",
47
- "Authorize",
48
- "Revoke",
49
- "Add",
50
- "Remove",
51
- "Associate",
52
- "Disassociate",
53
- "Attach",
54
- "Detach",
55
- "Enable",
56
- "Disable",
57
- "Set",
58
- "Put",
59
- "Upload",
60
- "Install",
61
- "Publish",
62
- "Bind",
63
- "Unbind",
64
- "Invoke",
65
- "Execute",
66
- "Trigger",
67
- "Deploy"
68
- ],
69
- "readOperationPrefixes": [
70
- "List",
71
- "Show",
72
- "Get",
73
- "Describe",
74
- "NovaList",
75
- "NovaShow"
76
- ],
77
- "safeTextReadCommands": [
78
- "rg",
79
- "grep",
80
- "findstr",
81
- "git",
82
- "ls",
83
- "dir",
84
- "Get-ChildItem"
85
- ],
86
- "blockedSandboxCommands": [
87
- "rm\\s+-rf\\s+/",
88
- "mkfs",
89
- "dd\\s+if=",
90
- ":\\(\\)\\{:\\|:&\\};:",
91
- "shutdown",
92
- "reboot",
93
- "init\\s+[06]",
94
- "fdisk"
95
- ],
96
- "sandboxWriteTools": [
97
- "huaweicloud_sandbox_connect",
98
- "huaweicloud_sandbox_credentials"
99
- ]
100
- }
1
+ {
2
+ "version": "0.1.0",
3
+ "secretKeyNamePatterns": [
4
+ "access[_-]?key",
5
+ "secret[_-]?key",
6
+ "security[_-]?token",
7
+ "x[_-]?auth[_-]?token",
8
+ "authorization",
9
+ "password",
10
+ "passwd",
11
+ "token",
12
+ "credential",
13
+ "private[_-]?key",
14
+ "ak",
15
+ "sk"
16
+ ],
17
+ "credentialFilePatterns": [
18
+ "\\.hcloud",
19
+ "\\.huaweicloud",
20
+ "hcloud[/\\\\](config|credentials)",
21
+ "huaweicloud[/\\\\](config|credentials)"
22
+ ],
23
+ "blockedConfigureSubcommands": ["show", "get", "list", "export", "init"],
24
+ "blockedSecretOperations": ["ShowSecretVersion", "DownloadSecret", "GetSecretValue"],
25
+ "writeOperationPrefixes": [
26
+ "Create",
27
+ "BatchCreate",
28
+ "Delete",
29
+ "BatchDelete",
30
+ "Update",
31
+ "Modify",
32
+ "Resize",
33
+ "Reboot",
34
+ "Stop",
35
+ "Start",
36
+ "Restart",
37
+ "Authorize",
38
+ "Revoke",
39
+ "Add",
40
+ "Remove",
41
+ "Associate",
42
+ "Disassociate",
43
+ "Attach",
44
+ "Detach",
45
+ "Enable",
46
+ "Disable",
47
+ "Set",
48
+ "Put",
49
+ "Upload",
50
+ "Install",
51
+ "Publish",
52
+ "Bind",
53
+ "Unbind",
54
+ "Invoke",
55
+ "Execute",
56
+ "Trigger",
57
+ "Deploy"
58
+ ],
59
+ "readOperationPrefixes": ["List", "Show", "Get", "Describe", "NovaList", "NovaShow"],
60
+ "safeTextReadCommands": ["rg", "grep", "findstr", "git", "ls", "dir", "Get-ChildItem"],
61
+ "blockedSandboxCommands": [
62
+ "rm\\s+-rf\\s+/",
63
+ "mkfs",
64
+ "dd\\s+if=",
65
+ ":\\(\\)\\{:\\|:&\\};:",
66
+ "shutdown",
67
+ "reboot",
68
+ "init\\s+[06]",
69
+ "fdisk"
70
+ ],
71
+ "sandboxWriteTools": [
72
+ "huaweicloud_sandbox_connect",
73
+ "huaweicloud_sandbox_credentials",
74
+ "huaweicloud_sandbox_upload_file"
75
+ ]
76
+ }