Back to skill

Security audit

腾讯云 CloudBase · Tencent CloudBase

Security checks for vulnerabilities and agentic risk

Overview

This CloudBase skill is mostly coherent documentation, but it needs Review because it grants broad cloud-management power and includes unsafe guidance around temporary credentials, role permissions, and destructive local cleanup commands.

Install only if you are comfortable giving the agent CloudBase deployment and management authority. Avoid letting it print temporary credentials into chat, confirm any IAM/CAM role-policy changes yourself, and require explicit approval before destructive local cleanup or cloud deletion steps.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (277)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
ion, and use `tcb` CLI via the `references/cloudbase-cli/SKILL.md` skill (read `core.md` + the matching domain reference — **not** `tcb deploy`) to finish login

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/ai-model-web/SKILL.md (reported line 237)May include surrounding context.

md
const app = cloudbase.init({
  env: "<YOUR_ENV_ID>",
  accessKey: import.meta.env.VITE_PUBLISHABLE_KEY  // auto-provision via queryAppAuth / manageAppAuth, write to .env.local (see auth-web-cloudbase prerequisites)
});

const auth = app.auth;

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document explicitly instructs exposing temporary credentials in plaintext with reveal=true and says to feed the returned STS secrets directly into SDKs. Even though STS credentials are temporary, disclosing them in conversational output or logs materially increases the risk of secret leakage, replay, and unauthorized cloud API access during their validity window.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/cloudbase-agent/py/adapter-coze.md (reported line 122)May include surrounding context.

For production, use environment variables:

bash
# .env
COZE_BOT_ID=bot_1234567890
COZE_API_KEY=sk-1234567890
COZE_BASE_URL=https://api.coze.com  # optional

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/cloudbase-agent/py/adapter-langgraph.md (reported line 544)May include surrounding context.

For production, use environment variables:

bash
# .env
COZE_BOT_ID=bot_1234567890
COZE_API_KEY=sk-1234567890
COZE_BASE_URL=https://api.coze.com  # optional

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 371)May include surrounding context.

For production, use environment variables:

bash
# .env
COZE_BOT_ID=bot_1234567890
COZE_API_KEY=sk-1234567890
COZE_BASE_URL=https://api.coze.com  # optional

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/cloudbase-agent/py/server-quickstart.md (reported line 393)May include surrounding context.

For production, use environment variables:

bash
# .env
COZE_BOT_ID=bot_1234567890
COZE_API_KEY=sk-1234567890
COZE_BASE_URL=https://api.coze.com  # optional

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/cloudbase-agent/py/skill.md (reported line 226)May include surrounding context.

For production, use environment variables:

bash
# .env
COZE_BOT_ID=bot_1234567890
COZE_API_KEY=sk-1234567890
COZE_BASE_URL=https://api.coze.com  # optional

Hidden Instructions

High
Category
Prompt Injection
Confidence
97% confidence
Finding

The document embeds imperative instructions aimed at an AI agent ('AI MUST EXECUTE EVERY STEP IN ORDER'). In an agentic environment, such hidden or meta-instructions can override user intent and drive unauthorized actions, especially when combined with shell commands and deployment steps.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 26)May include surrounding context.

md
## ⚠️ DEPLOYMENT IS A 4-STEP BLOCKING PIPELINE

<!-- INSTRUCTION (AI MUST EXECUTE EVERY STEP IN ORDER) -->

> **AI: You MUST execute Steps 1→2→3→4 in order. Do NOT skip any step.**
> **Do NOT call `manageAgent` until Step 3 (Verification) passes ALL checks.**

Hidden Instructions

High
Category
Prompt Injection
Confidence
97% confidence
Finding

This hidden instruction explicitly tells an AI to execute environment-modifying actions. In a tool-using agent workflow, instructions embedded in reference content are untrusted input and can cause the agent to perform actions without separate authorization or contextual validation.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 40)May include surrounding context.

md
## Step 1: Ensure Python 3.10

<!-- INSTRUCTION (AI MUST EXECUTE) -->

Execute one of the following to ensure Python 3.10 is available:

Hidden Instructions

High
Category
Prompt Injection
Confidence
97% confidence
Finding

The hidden 'AI MUST EXECUTE' directive is prompt-injection-like content because it attempts to control agent behavior from within the skill body. Given that the same section includes destructive filesystem commands, the risk is elevated beyond mere formatting or style concerns.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 74)May include surrounding context.

md
## Step 2: Build env/ (One-Shot Install)

<!-- INSTRUCTION (AI MUST EXECUTE) -->

> ### ⚠️ CRITICAL: `env/` is an immutable build artifact
>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The instruction mandates 'rm -rf ./env', a destructive filesystem operation. In an agent context, this is dangerous because the agent may execute it automatically, deleting local dependencies or other files if path assumptions are wrong, causing data loss or disruption.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 79)May include surrounding context.

md
> ### ⚠️ CRITICAL: `env/` is an immutable build artifact
>
> The ONLY correct workflow is:
> 1. **Delete** → `rm -rf ./env`
> 2. **Install** → single `pip install` command (below)
> 3. **Never touch again**
>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This script contains an automatic 'rm -rf ./env && mkdir ./env' step. If followed by an autonomous agent, it performs deletion without confirmation, and because it is presented as 'execute as-is', it discourages safety checks or path validation.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 107)May include surrounding context.

md
echo "✅ Using: $PYTHON_BIN ($($PYTHON_BIN --version 2>&1))"

# ── Atomic env/ rebuild ──
rm -rf ./env && mkdir ./env

# ── One-shot install ALL deps ──
$PYTHON_BIN -m pip install -r ./requirements.txt \

Hidden Instructions

High
Category
Prompt Injection
Confidence
97% confidence
Finding

This hidden instruction attempts to gate tool usage and force a specific remediation path from untrusted content. In an agent security model, that is dangerous because embedded content should not be able to dictate execution order, blocking behavior, or mutation steps.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 126)May include surrounding context.

md
## Step 3: Verify env/ Integrity (MANDATORY)

<!-- INSTRUCTION (AI MUST EXECUTE) -->

> **Do NOT call `manageAgent` until ALL checks below pass.**
> **If ANY check fails, the ONLY fix is: edit requirements.txt → rm -rf env/ → re-run Step 2.**

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The guide states the 'ONLY fix' is to delete env/ and rebuild, encouraging repeated destructive actions. In a skill consumed by agents, rigid remediation text can trigger unnecessary deletion loops and amplify damage from mistakes or path confusion.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 129)May include surrounding context.

md
<!-- INSTRUCTION (AI MUST EXECUTE) -->

> **Do NOT call `manageAgent` until ALL checks below pass.**
> **If ANY check fails, the ONLY fix is: edit requirements.txt → rm -rf env/ → re-run Step 2.**

### 3a. Verify all top-level packages are present

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

This line reinforces deletion as the default recovery action. While acceptable for a human-operated local build guide, it becomes risky in an agentic setting because the model may convert advisory text into immediate tool actions affecting the filesystem.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 170)May include surrounding context.

md
for f in failed:
        print(f'  ❌ MISSING: {f}')
    print()
    print('Fix: Check requirements.txt spelling, then rm -rf env/ and re-run Step 2')
    sys.exit(1)
else:
    print()

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The repeated recommendation to run 'rm -rf env/' after import failures encourages automatic destructive remediation. In the context of a deployment skill, the operational context makes this more dangerous because agents may have access to project files and execution tools.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 226)May include surrounding context.

md
if failed:
    print(f'\n❌ Import verification failed for: {failed}')
    print('Fix: Ensure these are in requirements.txt, then rm -rf env/ and re-run Step 2')
    sys.exit(1)
else:
    print('\n✅ All imports verified')

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The 'Golden Rule' codifies deletion as the universal fix and says 'Never deviate from this,' which is problematic for tool-using agents. It suppresses safer alternatives and can drive deterministic destructive behavior from untrusted documentation.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 261)May include surrounding context.

md
> **Golden Rule: ANY problem with `env/` has exactly ONE fix:**
> ```
> edit requirements.txt (if needed) → rm -rf env/ → re-run Step 2 script → re-run Step 3
> ```
> **There is NO other fix. Never deviate from this.**

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

This troubleshooting step again instructs deletion of env/ as part of recovery. The danger comes from the agent skill context: embedded shell guidance can be interpreted as actionable commands, leading to unintended file deletion or repeated rebuild cycles.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 269)May include surrounding context.

md
- **Cause**: A package doesn't have a `manylinux2014_x86_64` wheel for Python 3.10
- **Fix**: Pin a version in `requirements.txt` that has a compatible wheel, or check spelling
- **Then**: `rm -rf env/` → re-run Step 2

### Error: `ModuleNotFoundError` at runtime (ANY module)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The text recommends deleting env/ for any ModuleNotFoundError, which is overbroad and destructive. In this skill context, broad 'fixes' that delete directories can be misapplied automatically, causing downtime and loss of local state.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 276)May include surrounding context.

md
- **Cause 1**: The module is missing from `requirements.txt` → add it
- **Cause 2**: `env/` was built with Python 3.11+ → ensure Python 3.10, rebuild
- **Cause 3**: `env/` was built incrementally (multiple pip installs) → rebuild atomically
- **Fix**: `rm -rf env/` → re-run Step 2

### Error: Namespace package submodule missing (e.g., `cloudbase_agent.xxx`)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

This line repeats the destructive rebuild pattern for namespace-package issues. The risk is not malicious payload execution but unsafe tool parameterization and deletion instructions embedded in content that may control an agent.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 281)May include surrounding context.

md
### Error: Namespace package submodule missing (e.g., `cloudbase_agent.xxx`)

- **Cause**: Multiple `pip install` commands into `env/` caused namespace package fragmentation
- **Fix**: `rm -rf env/` → re-run Step 2 (single command installs all packages atomically)

### ⛔ PROHIBITED OPERATIONS (will cause deployment failures)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The summary reiterates the unconditional deletion workflow, reinforcing unsafe automated behavior. Although it is only a recap, repeated emphasis increases the chance an agent will prioritize the destructive command path over safer diagnostics.

Content

Scanner excerpt · references/cloudbase-agent/py/agent-deployment.md (reported line 430)May include surrounding context.

md
| **Python runtime** | Python 3.10 (MUST USE, `runtime="Python3.10"`) |
| **Dependency strategy** | Local pre-packaging to `./env` (**MUST use Python 3.10 interpreter**, `installDependency=false`) |
| **Build workflow** | Step 1 (Python) → Step 2 (build env/) → Step 3 (verify) → Step 4 (deploy) |
| **env/ rebuild rule** | ALWAYS atomic: `rm -rf env/` → single `pip install` — NEVER incremental |
| **Default platform** | HTTP Cloud Functions |
| **Fallback platform** | CloudRun (only for special requirements) |
| **Startup script** | `scf_bootstrap` — set `PYTHONPATH="./env:$PYTHONPATH"`, do NOT `pip install` at startup |

Context Leakage

High
Category
Data Exfiltration
Confidence
75% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

Scanner excerpt · references/cloudbase-agent/py/references/observability.md (reported line 185)May include surrounding context.

async with httpx.AsyncClient() as client: response = await client.get(url, headers=headers)

Extract context from incoming request

context = extract_trace_context(request.headers)

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% 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/cloudbase-agent/py/server-quickstart.md (reported line 291)May include surrounding context.

1. CloudBase Agent Native Endpoint

bash
curl -X POST http://localhost:9000/chatbot/send-message \
  -H "Content-Type: application/json" \
  -d '{
    "conversationId": "conv_123",

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
87% confidence
Finding

This duplicated finding points to the same risky cleanup instruction: a forceful rm -f with globbing over /private/var/folders/*/*/T/cloudapp-*.zip. Even though intended as disk cleanup, the pattern is unnecessarily broad and can lead to deletion of unintended matching files in automated environments.

Content

Scanner excerpt · references/cloudbase-cli/references/app.md (reported line 259)May include surrounding context.

md
**规避**(三选一,推荐 ①+③):
1. 部署时显式传 `--ignore "**/target/**"`(CLI)或 `ignore: ["**/target/**", ...]`(MCP deployApp)
2. 项目根 `cloudbaserc.json` 的 `app.ignore` 加 `**/target/**`(CLI 会合并)
3. 部署完成后删除残留:`rm -f /private/var/folders/*/*/T/cloudapp-*.zip`(部署进程异常时残留不清理会堆积)

**判断**:部署日志显示 "Project directory: xxx" 只代表 framework 检测目录,**不代表打包目录**;怀疑打包过大时先看生成的 zip 大小。