Back to skill

Security audit

huawei-cloud-functiongraph-trigger-create

Security checks for vulnerabilities and agentic risk

Overview

The skill creates the advertised cloud triggers, but checks described as read-only can run live functions and leave an extra recurring trigger active.

Review the verification procedure before use. Approve function execution separately, use an isolated test function and synthetic data, and confirm removal of any temporary trigger. Scope credentials to the intended function and avoid granting optional lifecycle permissions unnecessarily. All nine artifact files were inspected, including both scanner coverage gaps; cloud permissions and execution behavior were not tested live.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (17)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied code only removes SDK packages. It contains no trigger-creation operations, timer configuration, or OBS event setup. Although dependency management can support implementation, these uninstall-only commands do not establish that supporting role and instead remove dependencies needed for the declared functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Although presented as test cleanup, the chunk explicitly invokes a destructive trigger-deletion operation rather than creating a trigger. The comment stating that the skill does not delete anything does not change the command's behavior. Listing triggers for verification is a supporting operation, not a separate mismatch.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 419)May include surrounding context.

md
- [IAM Policies](./references/iam-policies.md)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 421)May include surrounding context.

md
- [Acceptance Criteria](./references/acceptance-criteria.md)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/iam-policies.md (reported line 25)May include surrounding context.

md
| 创建触发器 | `POST /v2/{project_id}/fgs/triggers/{function_urn}` | `FunctionGraph:trigger:create` |
| 获取指定触发器的信息 | `GET /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}` | `FunctionGraph:trigger:get` |
| 获取指定函数的所有触发器 | `GET /v2/{project_id}/fgs/triggers/{function_urn}` | `FunctionGraph:trigger: listSpecifiedFunctionTriggers` |
| 删除触发器 | `DELETE /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}` | `FunctionGraph:trigger:delete` |
| 删除指定函数的所有触发器 | `DELETE /v2/{project_id}/fgs/triggers/{function_urn}` | `FunctionGraph:trigger: deleteSpecifiedFunctionTriggers` |
| 获取函数列表 | `GET /v2/{project_id}/fgs/functions` | `FunctionGraph:function:list` |
| 获取函数的metadata | `GET /v2/{project_id}/fgs/functions/{function_urn}/config` | `FunctionGraph:function:getConfig` |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/iam-policies.md (reported line 26)May include surrounding context.

md
| 获取指定触发器的信息 | `GET /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}` | `FunctionGraph:trigger:get` |
| 获取指定函数的所有触发器 | `GET /v2/{project_id}/fgs/triggers/{function_urn}` | `FunctionGraph:trigger: listSpecifiedFunctionTriggers` |
| 删除触发器 | `DELETE /v2/{project_id}/fgs/triggers/{function_urn}/{trigger_type_code}/{trigger_id}` | `FunctionGraph:trigger:delete` |
| 删除指定函数的所有触发器 | `DELETE /v2/{project_id}/fgs/triggers/{function_urn}` | `FunctionGraph:trigger: deleteSpecifiedFunctionTriggers` |
| 获取函数列表 | `GET /v2/{project_id}/fgs/functions` | `FunctionGraph:function:list` |
| 获取函数的metadata | `GET /v2/{project_id}/fgs/functions/{function_urn}/config` | `FunctionGraph:function:getConfig` |

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/sdk-installation-guide.md (reported line 249)May include surrounding context.

bash
# Linux/macOS: update the system CA certificate bundle
sudo apt-get update && sudo apt-get install -y ca-certificates
sudo update-ca-certificates

# If behind a corporate proxy with a private CA, add that CA to the trusted store:

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · SKILL.md (reported line 389)May include surrounding context.

md
1. **Filter aggressively**: Use `--prefix` and `--suffix` so the function runs only for the objects it is meant to process
2. **Keep the function idempotent**: OBS notifications are at-least-once; the same object event can be delivered more than once, so mask/replace operations must produce the same result when repeated
3. **Write results to a different bucket or prefix**: Avoid writing the function output back into the same prefix that triggers it, which would create an infinite invocation loop
4. **Pick precise events**: Use `Put`/`Post` for uploads and `ObjectRemoved` for deletions instead of `ObjectCreated`/`ObjectRemoved` when the function only handles one operation
5. **Watch the runtime**: Large objects may need more memory and a longer timeout than the default configuration

Troubleshooting advice instructs deletion of triggers without warning about configuration loss or interrupted automation.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The solution for TriggerLimitExceeded explicitly instructs deleting unused triggers, rather than merely listing a tool's capabilities. It does not warn that deleting a trigger removes its configuration and can stop scheduled or event-driven execution if the trigger is incorrectly classified as unused.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/sdk-installation-guide.md (reported line 249)May include surrounding context.

bash
# Linux/macOS: update the system CA certificate bundle
sudo apt-get update && sudo apt-get install -y ca-certificates
sudo update-ca-certificates

# If behind a corporate proxy with a private CA, add that CA to the trusted store:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/sdk-installation-guide.md (reported line 249)May include surrounding context.

bash
# Linux/macOS: update the system CA certificate bundle
sudo apt-get update && sudo apt-get install -y ca-certificates
sudo update-ca-certificates

# If behind a corporate proxy with a private CA, add that CA to the trusted store:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/sdk-installation-guide.md (reported line 250)May include surrounding context.

bash
# Linux/macOS: update the system CA certificate bundle
sudo apt-get update && sudo apt-get install -y ca-certificates
sudo update-ca-certificates

# If behind a corporate proxy with a private CA, add that CA to the trusted store:
#   1. Obtain the corporate CA certificate (e.g. corporate-ca.crt)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/sdk-installation-guide.md (reported line 255)May include surrounding context.

If behind a corporate proxy with a private CA, add that CA to the trusted store:

1. Obtain the corporate CA certificate (e.g. corporate-ca.crt)

2. Copy it into the system trust store and refresh

sudo cp corporate-ca.crt /usr/local/share/ca-certificates/ sudo update-ca-certificates

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/sdk-installation-guide.md (reported line 256)May include surrounding context.

1. Obtain the corporate CA certificate (e.g. corporate-ca.crt)

2. Copy it into the system trust store and refresh

sudo cp corporate-ca.crt /usr/local/share/ca-certificates/ sudo update-ca-certificates

text

After the CA chain is trusted, the SDK performs normal TLS verification automatically. If the error persists, check the `HUAWEI_REGION` endpoint and your network/proxy configuration rather than bypassing certificate validation.

Execution tests invoke the deployed function without warning about production side effects or recurring charges.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The tests recommend manually invoking the deployed function and adding a recurring schedule without first checking whether execution is safe. For functions that alter data, send notifications, or initiate billable work, testing can duplicate real operations; the read-only framing makes accidental authorization more likely.

Content

No source excerpt is available for this finding.

The verification procedure creates an active trigger despite explicitly claiming verification is read-only.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

Despite labeling verification read-only, the procedure creates an ACTIVE trigger that invokes the deployed function every minute. An agent relying on that label could introduce recurring production side effects and charges, and manual cleanup does not guarantee the trigger will be removed.

Content

No source excerpt is available for this finding.