T09 · Insecure Skill Coding Practices
- Location
scripts/tcloud_api.py:44- Finding
TLS Certificate Verification Is Silently Disabled
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is related to Tencent Cloud Advisor, but it asks for powerful cloud access and includes under-scoped behaviors that should be reviewed before installation.
Review this skill carefully before installing. Use only narrowly scoped Tencent Cloud credentials, avoid writing long-lived AK/SK values into shell startup files, and do not run role creation or cleanup unless you understand the exact CAM permissions and deletion behavior. The generic API client and TLS fallback should be fixed before use in sensitive environments.
scripts/tcloud_api.py:44TLS Certificate Verification Is Silently Disabled
scripts/tcloud_api.py:172Generic API Client Sends Cloud Authentication Material to Arbitrary Hosts
scripts/create_role.py:42Console-Login Role Receives Unnecessary Full-Access Policies
SKILL.md:24Users Are Directed to Persist Long-Lived Cloud Credentials in Plaintext
scripts/login_url.py:275Unvalidated Login Redirect Target and Full Temporary Login URL Exposure
check_env.py:329Mandatory “Read-Only” Environment Check Writes Configuration and Assumes a Role
PUBLISH_GUIDE.md:24Unrelated Publication 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:
The file content is unrelated to the declared architecture dashboard/risk review purpose and instead provides operational guidance for bulk skill publishing after an anti-abuse crackdown. This mismatch is dangerous because it suggests the skill package contains hidden, off-purpose instructions that could facilitate platform abuse and supply-chain style distribution of many skills under the guise of a benign tool.
The instructions explicitly describe token rotation, batching, timing, and staged rollout for publishing many skills while minimizing detection, which is unjustified for an architecture review skill. In context, these steps can be used to scale distribution of unwanted or malicious packages and to work around platform anti-abuse mechanisms.
The README documents capabilities that materially exceed the stated skill scope, including passwordless console login, environment inspection, and role-management workflows. Scope expansion is dangerous in an agent skill because users may grant trust and credentials based on the manifest description while the skill actually enables privileged access paths and account changes.
The generic API invocation pattern (tcloud_api.py ... <Action> ... [region]) suggests the skill may support broader Tencent Cloud API access than the narrow dashboard framing implies. That creates a capability-expansion risk where a seemingly limited skill can be repurposed for wider authenticated cloud operations.
The generic API invocation pattern (tcloud_api.py ... <Action> ... [region]) suggests the skill may support broader Tencent Cloud API access than the narrow dashboard framing implies. That creates a capability-expansion risk where a seemingly limited skill can be repurposed for wider authenticated cloud operations.
The generic API invocation pattern (tcloud_api.py ... <Action> ... [region]) suggests the skill may support broader Tencent Cloud API access than the narrow dashboard framing implies. That creates a capability-expansion risk where a seemingly limited skill can be repurposed for wider authenticated cloud operations.
The generic API invocation pattern (tcloud_api.py ... <Action> ... [region]) suggests the skill may support broader Tencent Cloud API access than the narrow dashboard framing implies. That creates a capability-expansion risk where a seemingly limited skill can be repurposed for wider authenticated cloud operations.
The generic API invocation pattern (tcloud_api.py ... <Action> ... [region]) suggests the skill may support broader Tencent Cloud API access than the narrow dashboard framing implies. That creates a capability-expansion risk where a seemingly limited skill can be repurposed for wider authenticated cloud operations.
The generic API invocation pattern (tcloud_api.py ... <Action> ... [region]) suggests the skill may support broader Tencent Cloud API access than the narrow dashboard framing implies. That creates a capability-expansion risk where a seemingly limited skill can be repurposed for wider authenticated cloud operations.
The skill instructs users to permanently store cloud secrets in shell startup files or persistent user environment variables. While not malware in context, this creates credential persistence that increases exposure to local compromise, accidental leakage through shell history/config backups, and misuse by other processes running as the user.
��变量配置密钥:
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 module header explicitly states the script is detection-only and will not modify configuration, yet later code auto-saves role configuration when an existing role is found. Security-sensitive tooling must be truthful about side effects; otherwise operators may run it in restricted or audited environments expecting no persistence.
The script claims to be read-only, but save_config() creates ~/.tencent-cloudq, writes persistent role metadata, and changes filesystem permissions. That mismatch is dangerous because users and higher-level agents may grant trust or execute it under false assumptions, causing unauthorized state changes and persistence on the host.
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 file implements a destructive cleanup utility for local configuration, cache, environment-variable handling, and optional cloud role deletion, which does not align with an architecture dashboard and risk review skill. Capability/description mismatch is dangerous because it can hide privileged or destructive behavior behind an unrelated skill label, increasing the chance a user or reviewer grants trust or execution they otherwise would not.
The script can delete a Tencent Cloud CAM role named "advisor" using available AK/SK credentials, which is a privileged IAM action unrelated to a dashboard viewer/reviewer workflow. In the context of this skill, that creates unnecessary authority and can lead to identity/authorization disruption, service breakage, or abuse if the script is invoked in an environment where credentials are present.
This script creates a CAM role, enables console login, and attaches broad managed policies, which is privileged IAM provisioning behavior unrelated to a stated architecture dashboard/risk review function. In an agent skill context, this is dangerous because it can silently expand access in the user's Tencent Cloud account and establish persistent privileged access beyond what users would expect from a dashboard feature.
This script generates passwordless Tencent Cloud console login links by consuming cloud credentials and assuming roles, which is unrelated to a dashboard/risk-review skill's declared purpose. That mismatch is dangerous because it can covertly expand the skill into a credential-powered access broker, enabling unauthorized or unexpected console access under the guise of benign architecture tooling.
When certifi is unavailable, the SSL context disables hostname checking and certificate verification, making HTTPS requests vulnerable to man-in-the-middle interception. Because this script sends cloud API requests and receives temporary credentials, an attacker on the network path could tamper with responses or capture sensitive authentication material.
The code materially exceeds the skill's stated dashboard/risk-review scope by performing credential-based AssumeRole operations and producing federated console access URLs. In context, this is more dangerous because a user expecting passive analysis tooling may unknowingly run code that creates interactive access paths into their cloud account.
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
This setup script can create a new CAM role and attach policies, which exceeds the stated purpose of an architecture dashboard/risk review skill and materially changes account security posture. Even with a prompt, bundling IAM modification into a monitoring-oriented skill expands blast radius and can normalize over-privileged setup flows, especially when users provide high-privilege API credentials via environment variables.
If certifi is unavailable, the fallback SSL context disables hostname verification and certificate validation entirely before sending signed HTTPS requests. That enables man-in-the-middle interception or modification of requests and responses, potentially exposing signed cloud API traffic and allowing tampering with risk-review results or abuse of privileged cloud credentials in transit.
Detected: suspicious.exposed_secret_literal, suspicious.insecure_tls_verification