Back to skill

Security audit

huawei-cloud-ges-graph

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because it exposes cloud credentials and data through insecure connections and does not enforce several promised safeguards.

Keep this version away from production credentials and important graphs until secure transport, destructive-operation controls and OBS dry-run handling are fixed. Use narrowly scoped credentials, disposable test data and restricted storage buckets. The verification example can modify an existing v1 node, and dry-run does not contain OBS operations. Export destinations need appropriate access permissions. Scanner gaps were independently investigated using all bundled files and mocked checks; live cloud behavior was not tested. The evidence supports Review rather than intentional malicious behavior.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
.
Finding

Python disables certificate verification for IAM authentication and OBS transfers

Content
View full analysis

Impact

An intermediary can capture the IAM username/password during password authentication, intercept issued bearer tokens when proxying authentication, read uploaded or downloaded OBS data, and alter downloaded content. The HMAC secret itself is not directly transmitted by signing.

T09 · Insecure Skill Coding Practices

Error
Location
.
Finding

Both clients force bearer tokens and graph operations over plaintext HTTP

Content
View full analysis

Impact

Exposure of reusable IAM bearer tokens and graph data; an active intermediary can replace an authorized query with a destructive operation after local validation. Explicitly supplied obsParameters can also expose their secretKey in transit.

T09 · Insecure Skill Coding Practices

Error
Location
.
Finding

Whole-graph clearing bypasses the documented confirmation gate

Content
View full analysis

Impact

Irreversible deletion of all data in the configured graph without a code-enforced confirmation or deliberate destructive opt-in.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (21)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied command targets https://api.gitcode.com/api/v5/user, not a Huawei Cloud GES endpoint. Its user-information request is materially unrelated to the declared graph database purpose. The token is a placeholder; the snippet does not establish credential theft or other malicious behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The reported unrestricted OBS file-transfer and deletion capabilities exceed the advertised graph-operation scope. If invoked with attacker-influenced arguments, they could disclose unrelated local files, overwrite local files, or destroy unrelated cloud objects using the agent's existing privileges.

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 35)May include surrounding context.

md
- `ges_graph_skill.js` - Node.js SDK for GES graph operations

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 120)May include surrounding context.

md
> - `scripts/ges_graph_skill.py` / `ges_graph_skill.js` 中的 `validateCypher()`

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 156)May include surrounding context.

md
1. Pick a runtime: Python (`ges_graph_skill.py`) or Node.js (`ges_graph_skill.js`). Both expose the same API.

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 173)May include surrounding context.

md
node -e 'const { GESGraphSkill } = require("./scripts/ges_graph_skill.js");

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
## GitCode Authentication (ISSUE-003 / ISSUE-008)

When pushing code or scripts to GitCode (this skill's source repo), note that **GitCode does NOT support Git Basic Auth**. Authenticate with a **Personal Access Token**:

- API: send the token as the `PRIVATE-TOKEN` header (also accepted as `Authorization: <token>`)
- `hcloud` / plain `git push` with username+password Basic Auth returns 401/418 and is not supported

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

API token auth (recommended)

curl -H "PRIVATE-TOKEN: " https://api.gitcode.com/api/v5/user

text
- On a 401/418 response, the message should state: *"GitCode requires a Personal Access Token via the PRIVATE-TOKEN header; Basic Auth is deprecated. Regenerate the token in the GitCode settings and retry."*

## Known Limitations & Alternatives (ISSUE-005/006/007)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/user-guide-authentication.md (reported line 22)May include surrounding context.

md
- **API (GitCode v5)**: `PRIVATE-TOKEN: <token>` header, or `Authorization: Bearer <token>`.
- **Git push over HTTPS**: use `https://oauth2<token>@gitcode.com/...` (or an SSH key). Plain
  `https://***@gitcode.com/...` is rejected.
- Tokens are issued in GitCode account settings → Access Tokens; scope at least `api` for issue/PR automation.

> This does NOT affect GES graph access. GES always uses IAM auth described above.

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

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.

The export workflow sends graph data to OBS without a privacy or data-disclosure warning.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

Task 4 instructs the agent to submit an export job to an OBS destination, rather than merely listing an available API. Although destination paths must be confirmed elsewhere, the skill does not warn that exporting creates a separate cloud-storage copy of potentially sensitive graph data whose accessibility depends on the destination's permissions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

  • Use one of:
    bash
    # API token auth (recommended)
    curl -H "PRIVATE-TOKEN: <token>" https://api.gitcode.com/api/v5/user
    
  • On a 401/418 response, the message should state: "GitCode requires a Personal Access Token via the PRIVATE-TOKEN header; Basic Auth is deprecated. Regenerate the token in the GitCode settings and retry."

The live CRUD verification can overwrite and delete an existing node without warning.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The live verification uses the fixed identifier 'v1' with upsert enabled, then updates and deletes that identifier. On a graph containing an existing matching node, a routine verification can overwrite its properties and delete the node and potentially its relationships without warning.

Content

No source excerpt is available for this finding.

The skill exposes deletion of arbitrary OBS objects, beyond its stated GES graph-management purpose.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

The exported OBS client accepts any bucket and object key and issues a DELETE using configured cloud credentials, without a graph-specific allowlist or explicit destructive-operation opt-in. If the agent invokes this method with unintended or attacker-influenced arguments, it can delete unrelated objects within those credentials' permissions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/ges_graph_skill.py (reported line 343)May include surrounding context.

python
}
            }

        resp = requests.post(url, headers=headers, json=data, timeout=30, verify=False)

        if resp.status_code not in [200, 201]:
            raise Exception(f"密码获取Token失败: {resp.status_code}, {resp.text[:200]}")

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

Disabling certificate verification allows a network attacker to impersonate an HTTPS IAM endpoint and obtain the password-bearing authentication request and returned token. Cloud credentials can grant access beyond the graph itself, making this particularly dangerous in an authenticated administration skill.

Content

Scanner excerpt · scripts/ges_graph_skill.py (reported line 343)May include surrounding context.

python
}
            }

        resp = requests.post(url, headers=headers, json=data, timeout=30, verify=False)

        if resp.status_code not in [200, 201]:
            raise Exception(f"密码获取Token失败: {resp.status_code}, {resp.text[:200]}")

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

The AK/SK authentication request disables server certificate verification, enabling interception or manipulation of the authentication exchange and theft of a returned bearer token. Signing the request does not authenticate the responding server or protect response confidentiality; the secret key itself is not directly transmitted by this code.

Content

Scanner excerpt · scripts/ges_graph_skill.py (reported line 414)May include surrounding context.

python
'X-Identity-Sign': authorization_header
        }

        resp = requests.post(url, data=Body, headers=headers, timeout=30, verify=False)

        if resp.status_code not in [200, 201]:
            raise Exception(f"AKSK获取Token失败: {resp.status_code}, {resp.text[:200]}")

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
99% confidence
Finding

All OBS requests disable TLS certificate verification, exposing uploaded graph data and downloaded content to a network attacker impersonating the storage endpoint. Request signatures do not provide server authentication or prevent malicious response substitution, and globally suppressing TLS warnings makes the defect less visible.

Content

Scanner excerpt · scripts/ges_graph_skill.py (reported line 536)May include surrounding context.

python
url=url,
            headers=request_headers,
            data=body,
            verify=False
        )

        if response.status_code >= 400:

Provides arbitrary OBS object deletion unrelated to GES graph operations.

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

The manifest describes operating a GES graph database, but delete_object accepts any OBS bucket and object key and issues an authenticated DELETE request. Unlike OBS transfers supporting graph import/export, this independently exposed deletion capability has no enforced relationship to graph data or a GES operation; GESClient exposes the OBS client through get_obs_client at L0695–L0697.

Content

No source excerpt is available for this finding.

The documented no-network dry-run mode leaves the exposed OBS client live.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

GES_DRY_RUN/GES_MOCK only intercepts GESClient._request, while get_obs_client exposes a credentialed OBS client whose requests remain live. A caller relying on the documented no-network simulation behavior can therefore upload data, overwrite files through downloads, or delete real objects during testing.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
100% confidence
Finding

GESClient constructs its base URL with plain HTTP, so the X-Auth-Token, graph queries, results, and any OBS credentials included in import/export bodies travel without transport encryption. Although verify=False has no additional effect on HTTP, this request path concretely exposes authenticated graph administration traffic to interception and modification.

Content

Scanner excerpt · scripts/ges_graph_skill.py (reported line 717)May include surrounding context.

python
url = f"{self.base_url}{path}"
        headers = self._get_headers()

        resp = request_with_retry(method, url, headers=headers, **kwargs, verify=False)

        if resp.status_code >= 400:
            raise Exception(f"API请求失败 [{resp.status_code}]: {resp.text}")