T09 · Insecure Skill Coding Practices
- Location
scripts/tcloud_api.py:46- 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 mostly a Tencent Cloud architecture helper, but it asks for sensitive cloud credentials and includes broad IAM, login-link, and cleanup powers that are under-scoped for a viewing tool.
Review this skill carefully before installing. Use only a least-privilege Tencent Cloud sub-account, avoid storing long-lived AK/SK credentials in shell startup files, do not run role creation or cleanup unless you understand the exact CAM impact, and treat generated console login links as sensitive credentials.
scripts/tcloud_api.py:46TLS Certificate Verification Is Disabled When certifi Is Unavailable
scripts/tcloud_api.py:107Unrestricted API Host Receives Credential-Bearing Authorization Headers
scripts/create_role.py:42Console Role Is Granted Excessive Full-Access Policies
scripts/cleanup.py:269Cleanup Can Delete an Unrelated Pre-Existing CAM Role Without Confirmation
check_env.py:80Mandatory “Read-Only” Environment Check Performs Persistent Writes and Role Assumption
SKILL.md:24Long-Lived Cloud Credentials Are Directed Into Plaintext Shell Startup Files
PUBLISH_GUIDE.md:24Unrelated Publishing Guide Recommends Anti-Abuse Evasion Techniques
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:
This guide explicitly discusses bulk publishing, anti-spam avoidance, and token rotation in response to platform defenses introduced after a supply-chain attack. That behavior is unrelated to the advertised cloud-architecture viewing purpose and instead facilitates scaling distribution while reducing detection, which is a strong indicator of abusive publication infrastructure.
The document recommends operational tactics such as timed intervals, batch sizing, and switching tokens after several publishes to work around anti-spam controls. Guidance focused on evading platform abuse safeguards materially increases the ability to mass-distribute potentially harmful skills and is especially concerning in light of the referenced prior supply-chain attack.
The README's security statement is misleading: AK/SK-authenticated API calls necessarily involve cryptographic use of the secret to produce signed requests sent over the network. Even if the raw secret key is not directly transmitted, the claim can cause users to underestimate credential exposure and trust guarantees, which is dangerous in a security-sensitive cloud skill.
The documentation describes a generic authenticated API wrapper with host, service, action, payload, and optional region parameters, creating the potential to invoke Tencent Cloud APIs beyond the seven listed architecture-related actions. Combined with live credentials from the environment, this expands the attack surface from a narrow viewer into a broader cloud API execution capability.
The documentation describes a generic authenticated API wrapper with host, service, action, payload, and optional region parameters, creating the potential to invoke Tencent Cloud APIs beyond the seven listed architecture-related actions. Combined with live credentials from the environment, this expands the attack surface from a narrow viewer into a broader cloud API execution capability.
The documentation describes a generic authenticated API wrapper with host, service, action, payload, and optional region parameters, creating the potential to invoke Tencent Cloud APIs beyond the seven listed architecture-related actions. Combined with live credentials from the environment, this expands the attack surface from a narrow viewer into a broader cloud API execution capability.
The documentation describes a generic authenticated API wrapper with host, service, action, payload, and optional region parameters, creating the potential to invoke Tencent Cloud APIs beyond the seven listed architecture-related actions. Combined with live credentials from the environment, this expands the attack surface from a narrow viewer into a broader cloud API execution capability.
The documentation describes a generic authenticated API wrapper with host, service, action, payload, and optional region parameters, creating the potential to invoke Tencent Cloud APIs beyond the seven listed architecture-related actions. Combined with live credentials from the environment, this expands the attack surface from a narrow viewer into a broader cloud API execution capability.
The documentation describes a generic authenticated API wrapper with host, service, action, payload, and optional region parameters, creating the potential to invoke Tencent Cloud APIs beyond the seven listed architecture-related actions. Combined with live credentials from the environment, this expands the attack surface from a narrow viewer into a broader cloud API execution capability.
The skill claims secrets are not written to files, yet it explicitly instructs users to append long-lived TENCENTCLOUD_SECRET_ID and TENCENTCLOUD_SECRET_KEY values to shell startup files or persistent user environment storage. Persisting cloud API credentials in plaintext configuration files increases the risk of credential theft, lateral movement, and accidental disclosure through backups, dotfile syncing, or local compromise.
The matched shell commands establish persistence for cloud credentials by appending exports to ~/.bashrc, which resembles persistence behavior flagged by malware heuristics even if the apparent purpose is setup convenience. In this skill context, persisting long-lived API secrets on disk is genuinely dangerous because it creates a durable credential foothold and conflicts with the claim that secrets are not stored.
��变量配置密钥:
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 document exposes an operation that enables Advisor authorization and also turns on report interpretation and cloud architecture collaboration permissions, which are write/admin-affecting capabilities. That exceeds the skill’s stated read-oriented purpose of providing a holistic architecture view, creating a scope mismatch that could lead an agent or user to perform unintended account-level permission changes.
A capability to grant or enable cloud permissions is not justified by a skill whose description is limited to viewing diagrams, directories, and risk assessments. This mismatch is dangerous because it expands the agent’s effective authority beyond user expectations and increases the risk of privilege changes being triggered under the guise of a read-only architecture-view workflow.
The script instructs users to permanently append cloud API secrets to shell startup files such as ~/.bashrc, creating long-lived credential persistence on disk. While presented as setup guidance rather than malware, this increases exposure to local compromise, accidental disclosure, and reuse of powerful credentials beyond the immediate task.
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 is a destructive cleanup utility that removes local configuration, cache, environment-variable cleanup artifacts, and can optionally delete a cloud CAM role, yet the skill is described as providing a read-only holistic architecture view. This mismatch materially increases risk because users or automated runners may trust the skill as observational while it performs state-changing actions on both the workstation and cloud account.
The function can delete a Tencent Cloud CAM role named advisor using live AK/SK credentials from environment variables. In the context of an architecture-view skill, IAM deletion is unjustified and dangerous because it can disrupt access paths, break integrations, or remove security-relevant roles under the guise of a non-destructive viewer.
This script performs IAM write actions by creating a CAM role, enabling console login, and persisting the resulting role configuration, even though the skill is described as providing a read-only holistic architecture view. That mismatch is dangerous because users may authorize or run the skill expecting inventory/visibility behavior, while it actually modifies identity infrastructure and creates a new access path in the account.
The script attaches broad managed policies (QcloudTAGFullAccess and QcloudAdvisorFullAccess) to a newly created role and enables ConsoleLogin, which grants substantially more capability than is justified by a read-oriented architecture visualization skill. In the context of this skill, these permissions expand the blast radius of compromise or misuse and can normalize over-privileged access under a misleading feature description.
When certifi is unavailable, the fallback SSL context disables hostname checking and certificate validation entirely. This allows man-in-the-middle interception or modification of the STS response, potentially exposing temporary credentials or causing the tool to generate login URLs based on attacker-controlled network traffic.
The script reads long-lived cloud credentials from environment variables and uses them to discover account identity and assume roles, which is not justified by a tool advertised as an architecture-view capability. In this context, the code can transform ambient secrets into broader console access, increasing the blast radius if the skill is invoked unexpectedly or by a confused user.
This skill claims to provide a holistic architecture view, but the code generates privileged console login URLs by assuming a role and minting a federated access link. That materially expands capability from read/display into account access enablement, creating a dangerous mismatch between declared purpose and actual behavior.
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