T09 · Insecure Skill Coding Practices
- Location
scripts/tcloud_api.py:46- Finding
TLS certificate and hostname verification are disabled when certifi is unavailable
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill needs careful review because it asks for powerful Tencent Cloud credentials, can create or delete cloud roles, has misleading security claims, and includes unrelated batch-publishing materials.
Install only after reviewing the cloud permissions and fixing the security issues. Use a tightly scoped subaccount or temporary credentials, avoid storing long-lived AK/SK values in shell startup files, do not run the batch-publishing materials, require explicit confirmation for IAM or Advisor authorization changes, and treat generated console-login URLs as secrets.
scripts/tcloud_api.py:46TLS certificate and hostname verification are disabled when certifi is unavailable
scripts/tcloud_api.py:90Tencent Cloud authentication material can be transmitted to an arbitrary caller-selected host
scripts/create_role.py:43Created console-login role receives excessive and inconsistently disclosed full-access policies
check_env.py:361Advertised read-only environment check writes persistent configuration and assumes a cloud role
scripts/login_url.py:262Unrestricted redirect target and active temporary credentials are returned in process output
scripts/cleanup.py:271Noninteractive cleanup can delete an unrelated cloud role based only on a common name
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 file is unrelated to the declared skill purpose of cloud architecture discovery and instead focuses on bulk publishing tactics after a supply-chain attack. It normalizes strategies for avoiding platform anti-spam enforcement, which is a strong indicator of deceptive or abusive distribution intent in a package that users would expect to be about Tencent Cloud architecture mapping.
The guide explicitly advises token rotation, pacing adjustments, and content changes to work around anti-spam controls. Those recommendations are not justified by the skill's stated functionality and provide operational guidance for bypassing platform abuse protections, increasing the likelihood of large-scale malicious or deceptive skill publication.
The file content is materially inconsistent with the declared skill purpose: instead of cloud architecture discovery usage, it documents a batch publishing workflow with token rotation, retry logic, and anti-spam tuning. This mismatch is dangerous because it can mislead users into running unrelated operational scripts and suggests the package may contain repurposed or deceptive content that hides its true behavior.
The security note claims AK/SK are not transmitted over the network, but authenticated Tencent Cloud API calls necessarily use those secrets to produce authorization material sent outbound. Misstating this security property can cause users to make unsafe trust decisions about credential exposure, logging, interception, or review requirements.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The skill modifies access-management configuration by creating roles, attaching policies, and storing role-related settings, despite being described primarily as an architecture discovery tool. That discrepancy can cause users and platforms to underestimate the privilege level and risk of the skill.
The manifest markets the skill as architecture discovery/viewing, but the documented behavior includes IAM role creation/deletion and service-authorization writes. This is a significant disclosure failure because users may approve installation or execution under the assumption of read-only cloud inventory access.
The skill instructs users to persist long-term cloud secrets into shell startup files and user-level environment configuration. Storing AK/SK in persistent profile files increases the chance of credential theft through local compromise, accidental disclosure, backups, shell-history mistakes, or later unrelated processes inheriting the secrets.
��变量配置密钥:
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` 文件,描述插件的功能、调用方式和输出格式
The skill is described as a cloud architecture discovery/viewing capability, but this documented operation performs account-level authorization and explicitly enables additional permissions for report interpretation and collaboration. That is a privilege-changing action outside the expected scope of a read-oriented discovery skill, creating a dangerous mismatch that could cause users or agents to grant unnecessary access.
A discovery/mapping skill should ordinarily be limited to read-only inspection, but this API enables Advisor authorization and related permissions, which is not justified by the advertised functionality. If exposed through an agent, this could be abused to expand service access under the guise of inventory or topology discovery.
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 manifest describes a skill for discovering and mapping cloud architecture using Tencent Cloud Smart Advisor API, but this file implements local maintenance of a publish_log.json file. Backing up and resetting publish records is not an obvious implementation detail of cloud architecture discovery and represents behavior outside the stated skill purpose.
The script is packaged with a skill described as discovery-only, yet it performs destructive local cleanup and can delete a remote CAM role. This mismatch violates least surprise and creates a supply-chain style risk: a user invoking tooling associated with architecture discovery could unintentionally remove credentials, configuration, or cloud IAM resources.
The function clean_cloud_role deletes a CAM role named 'advisor' using available AK/SK environment credentials. In the context of a discovery skill, remote IAM deletion is especially dangerous because it exceeds expected read-only behavior and can disrupt access, break automation, or remove security-relevant roles in a user's Tencent Cloud account.
This code creates a CAM role and attaches broad managed policies including QcloudTAGFullAccess and QcloudAdvisorFullAccess, which exceeds the stated discovery-and-mapping functionality of the skill. Because it performs IAM write actions and enables console login, it can silently expand access in the tenant and establish persistent privileged configuration, creating a serious mismatch between declared purpose and actual behavior.
When certifi is unavailable, the fallback SSL context disables hostname verification and certificate validation entirely. That allows a man-in-the-middle attacker to intercept or modify STS responses, exposing long-lived credentials in transit context and enabling issuance of attacker-influenced temporary access artifacts.
Detected: suspicious.exposed_secret_literal, suspicious.insecure_tls_verification