T09 · Insecure Skill Coding Practices
- Location
scripts/tcloud_api.py:43- Finding
TLS Certificate Verification Is Disabled When certifi Is Unavailable
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a real Tencent Cloud Advisor helper, but it asks for powerful cloud credentials and includes broad IAM, login-link, and network behaviors that need careful review before installation.
Install only if you are comfortable giving the skill Tencent Cloud credentials and potential IAM write authority. Use a dedicated least-privilege sub-account or short-lived credentials, avoid putting long-lived AK/SK values in shell startup files, review any role creation before approving it, and treat generated console login links as sensitive temporary credentials.
scripts/tcloud_api.py:43TLS Certificate Verification Is Disabled When certifi Is Unavailable
scripts/tcloud_api.py:82Caller-Controlled API Host and Operation Can Receive Ambient Authentication Material
scripts/create_role.py:36Role Creation Attaches Full Tag and Advisor Access Beyond the Minimum Required Scope
SKILL.md:24Documentation Instructs Users to Persist Long-Lived Cloud Keys in Plaintext Shell Profiles
check_env.py:382Read-Only Environment Check Writes Configuration and Generates a Live Login Session
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
ctx = _get_ssl_context()
with urlopen(req, context=ctx) as resp:
result = json.loads(resp.read().decode("utf-8"))
response_body = result.get("Response", {})
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
try:
ctx = _get_ssl_context()
with urlopen(req, context=ctx, timeout=30) as resp:
response_body = resp.read().decode("utf-8")
except HTTPError as e:
try:
The documented project structure includes write-capable utilities such as role creation, role setup, login URL generation, and cleanup, while the skill metadata frames the skill primarily as a read/query assistant. This mismatch can hide materially more powerful local and cloud actions than users or reviewers expect, which is especially dangerous in an agent skill that may be invoked through natural-language requests.
The security note claims AK/SK are never transmitted over the network, but authenticated Tencent Cloud API calls necessarily use those credentials or derived signatures in remote requests. Misrepresenting credential handling can mislead users into weaker trust decisions and prevent proper risk assessment around secrets exposure and request signing.
The skill's effective scope includes identity discovery, role enumeration, role creation, policy attachment, local configuration writes, and login testing, which exceeds the expectation set by a cloud-advisor query tool. This broadens blast radius and can enable privilege changes in the tenant when users think they are only running read-oriented architecture queries.
The skill's effective scope includes identity discovery, role enumeration, role creation, policy attachment, local configuration writes, and login testing, which exceeds the expectation set by a cloud-advisor query tool. This broadens blast radius and can enable privilege changes in the tenant when users think they are only running read-oriented architecture queries.
The skill's effective scope includes identity discovery, role enumeration, role creation, policy attachment, local configuration writes, and login testing, which exceeds the expectation set by a cloud-advisor query tool. This broadens blast radius and can enable privilege changes in the tenant when users think they are only running read-oriented architecture queries.
The skill's effective scope includes identity discovery, role enumeration, role creation, policy attachment, local configuration writes, and login testing, which exceeds the expectation set by a cloud-advisor query tool. This broadens blast radius and can enable privilege changes in the tenant when users think they are only running read-oriented architecture queries.
The skill's effective scope includes identity discovery, role enumeration, role creation, policy attachment, local configuration writes, and login testing, which exceeds the expectation set by a cloud-advisor query tool. This broadens blast radius and can enable privilege changes in the tenant when users think they are only running read-oriented architecture queries.
The skill instructs users to persist long-lived cloud secrets by appending them to shell startup files or user-level environment storage. While not malware/backdoor behavior, this is still dangerous because it increases credential exposure to local compromise, accidental disclosure, inherited subprocesses, and forensic persistence beyond the intended session.
��变量配置密钥:
TENCENTCLOUD_SECRET_ID — 腾讯云 SecretId(必填)TENCENTCLOUD_SECRET_KEY — 腾讯云 SecretKey(必填)密钥获取地址:https://console.cloud.tencent.com/cam/capi
环境变量必须永久写入 shell 配置文件,确保新会话中仍然生效:
Linux / macOS(写入 ~/.bashrc 或 ~/.zshrc):
echo 'export TENCENTCLOUD_SECRET_ID="your-secret-id"' >> ~/.bashrc
echo 'export TENCENTCLOUD_SECRET_KEY="your-secret-key"' >> ~/.bashrc
source ~/.bashrc
Windows PowerShell(写入用户级环境变量):
[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_ID", "your-secret-id", "User")
[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_KEY", "your-secret-key", "User")
为生成控制台免密登录链接,需要配置 CAM 角色。角色配置分为 检测 和 创建 两个独立步骤,角色创
Referenced artifact was not completely inspected
- 插件必须包含 `SKILL.md` 文件,描述插件的功能、调用方式和输出格式
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
nd("TENCENTCLOUD_SECRET_ID")
if not secret_key:
missing.append("TENCENTCLOUD_SECRET_KEY")
log_fail(f"未配置以下环境变量: {', '.join(missing)}")
log_info("")
log_info(" 请将腾讯云 API 密钥永久写入 shell 配置文件:")
log_info("")
log_info(" Linux / macOS(写入 ~/.bashrc 或 ~/.zshrc):")
log_info(' echo \'export TENCENTCLOUD_SECRET_ID="your-secret-id"\' >> ~/.bashrc')
log_info(' echo \'export TENCENTCLOUD_SECRET_KEY="your-secret-key"\' >> ~/.bashrc')
log_info(" source ~/.bashrc")
log_info("")
log_info(" Windows PowerShell(写入用户级环境变量):")
log_info(' [Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_ID", "your-secret-id", "User")')
log_info(' [Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_KEY", "your-secret-key", "User")')
log_info("")
log_info(" 密钥获取地址: https:
The script performs privileged IAM write actions by creating a CAM role and attaching policies, which is materially broader than the skill's stated purpose of querying advisor, architecture, and risk-assessment data. In an agent-skill context, bundling identity-management changes into a data-query tool creates a dangerous privilege-escalation path if the script is triggered with valid AK/SK, even though the code comments say it should only run with explicit consent.
The script creates a role with ConsoleLogin enabled and attaches broad managed policies, which exceeds what is justified for a user-facing advisor-query capability. This expands the blast radius from simple API reads to broad account capabilities, and in a skill ecosystem could let a compromised or misused workflow persist privileged access beyond the immediate task.
When certifi is unavailable, the fallback SSL context disables hostname checking and certificate validation entirely. That allows a machine-in-the-middle attacker to intercept or modify the outbound STS request and response, potentially exposing temporary credentials or causing the script to trust forged responses during authentication-sensitive operations.
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
if platform.system() == "Windows":
# Windows 10+ 的 cmd/PowerShell 支持 ANSI(需 VT100)
try:
os.system("") # 激活 VT100 模式
return True
except Exception:
return False
If certifi is unavailable, the code disables hostname checking and certificate verification entirely before sending signed API requests. In this skill, the request carries cloud authentication material and privileged management actions, so a man-in-the-middle attacker could intercept or redirect traffic, capture sensitive request metadata, and tamper with API responses.
The README advertises capabilities beyond the stated skill scope, including passwordless console login link generation and environment/role management. Scope expansion in skill documentation is risky because it can cause the agent or user to rely on undocumented privileged behaviors, increasing the chance of unexpected account access or configuration changes.
Generating passwordless console login links grants direct account access and is highly sensitive, yet the README does not prominently warn about the account-access implications or required authorization controls. In the context of a cloud-management skill, such a feature materially increases the blast radius if invoked accidentally, socially engineered, or exposed to the wrong user.
The README instructs users to append long-lived cloud credentials to a shell startup file, creating persistent local exposure without warning about shared accounts, backups, shell history, or filesystem compromise. This is an insecure operational practice for privileged cloud secrets and can lead to credential theft or misuse beyond the skill itself.
The README says users can 'directly chat' and then lists trigger-style examples such as '帮我检查一下...' and '查看我的云架构目录' without defining a constrained invocation pattern, scope, or exclusion conditions. For a markdown file, this creates an ambiguous activation surface because these are ordinary conversational requests rather than narrowly scoped command phrases.
The README states that E2E tests automatically save every prompt and output, which can include secrets, internal architecture details, account identifiers, or other sensitive cloud data. Persisting conversational inputs and outputs by default increases the risk of local data leakage, unintended retention, and secondary exposure through logs or shared workspaces.
Without declared permissions the skill's intent is opaque and cannot be validated.
The skill’s natural-language content is entirely written as Chinese-only user-facing guidance and response templates, with no indication that the user may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.
The document gives inconsistent statements about the role's attached permissions: one section describes a limited/readonly advisor role, while another says it will attach broader TAG and Advisor FullAccess policies. Such contradictions undermine informed consent and can cause the agent to provision more privilege than the user was led to expect.
Detected: suspicious.exposed_secret_literal, suspicious.insecure_tls_verification